pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
36,256,630 | 0 | Angular ng-options doesn show all elements <p>I am working in some app with AngularJS and I am using the <code>ng-options</code> directive, but I have one problem. When I select the <strong>"Provincia"</strong>, the <strong>"Cantón"</strong> select only shows the last element in the array. </p> <p>Anyone knows what is ... |
26,935,126 | 0 | <p>You could get rid of all your <code>if/elseif</code> loops:</p> <pre><code>n = size(Y); colour = {'y','m','c','r','g','b','k','r','b','g'}; shape = {'c','c','c','c','c','c','c','s','s','s'}; for ii = 1:n(2) subplot scatter(X(1,ii), X(2,ii), 12, colour{Y(ii)}, shape{Y(ii)}, 'filled') hold on end </code></pre> |
3,016,399 | 0 | Qt - How to post a banner on the dialog? <p>I have a directroy where I have several pictures and gif animations. I want to post that pictures and animations on a QDialog in an infinite loop (by cyclically changing pictures in 2 minutes interval) and on that pictures and animations I want to set a link so that when you ... |
12,873,142 | 0 | invalid application of 'sizeof' to incomplete type 'struct array[]' <p>I am trying to organize my project by splitting commands up into separate files for easier maintenance. The issue I am having is trying to iterate over the array of commands defined at compile time. I have created a dumbed down example that reproduc... |
24,958,778 | 0 | <p>Just use:</p> <pre><code>- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return indexPath.row != THE_ROW_YOU_WANT_TO_STOP; } </code></pre> |
20,660,956 | 0 | how to avoid getting ^M in file? <p>I don't know why it appears in my file when using vim. Sometimes not in the vim, but in the output of 'git diff', why?</p> <p>what command can help me check if file under some dir have '^M' problem, and fix all of them?</p> |
26,559,162 | 0 | Is the AllowHtml attribute secure <p>I have a MVC model field that the user enters some html source code into. Currently, I am getting the following error:</p> <blockquote> <p>A potentially dangerous Request.Form value was detected from the client</p> </blockquote> <p>I have had a look at the following resource: <a hre... |
3,757,888 | 0 | <p>This returns the sequence you look for:</p> <pre><code>var result = MyList .Select(s => s.Split('-').OrderBy(s1 => s1)) .Select(a => string.Join("-", a.ToArray())) .Distinct(); foreach (var str in result) { Console.WriteLine(str); } </code></pre> <p>In short: split each string on the <code>-</code> charact... |
32,615,703 | 0 | <p>A couple suggestions:</p> <p>1 ) Instead of this: </p> <p>Command="{Binding ViewModel.GetQuoteQuestionsCommand, Mode=OneWay}" /></p> <p>try: Command="{Binding ViewModel.GetQuoteQuestionsCommand}" /></p> <p>2) Don't "roll your own" RelayCommand. Use an MVVM library such as MvvmLight and use the RelayCommand provided... |
26,913,734 | 0 | Hitting Max number of files and blobs for Google App Engine <p>When trying to deploy my application:</p> <pre><code>appcfg.py update --oauth2 . </code></pre> <p>I'm getting:</p> <pre><code>PM Rolling back the update. Error 400: --- begin server output --- Max number of files and blobs is 10000. --- end server output --... |
15,242,260 | 0 | Error in installing ATF in eclipse <p>In eclipse JUNO->install new software-><a href="http://download.eclipse.org/tools/atf/updates/0.3.0" rel="nofollow">http://download.eclipse.org/tools/atf/updates/0.3.0</a></p> <p>but it gives me this error</p> <p><strong>Cannot complete the install because one or more required item... |
28,638,165 | 0 | <p>It sounds like an encoding issue. You're probably saving down as a different encoding to the original document, and different from what the target application is expecting. Hence the change in file size.</p> <p>It's possible to change the encoding used for the save as described by dbc above:</p> <blockquote> <p>Cre... |
28,083,040 | 0 | Does MPandroid CHart Library supports Stackbar charts? <p>I reasrched a lot about compound graphs in MPanroidCHart library. By compound graph i mean having multiple types of graph series in single plot.</p> <p>I tried other libraries too like androidplot , achartengine library.. Although they provide compound graphs bu... |
20,393,637 | 0 | SQL - Display all empty rows with Count() Group By <p>These are my tables:</p> <pre><code>Categories table ================ id (fk) category_name Items table =========== id (pk) item_name category_id (pk) </code></pre> <p>One <strong>category</strong> has many <strong>Items</strong></p> <p>One <strong>item</strong> hav... |
38,134,865 | 0 | Copying specific struct members to another structure <p>so I have a file from which I have to load a number of tracks, find tracks longer than 3:30 and find the average bpm of those tracks. </p> <p>Here's the code I have.</p> <p>Main file:</p> <pre><code>#include <stdio.h> #include "functions.h" int main(void) { ... |
10,516,027 | 0 | <p>Variable <code>FORMAT</code> expressions are non-standard and are <strong>not</strong> supported by gfortran (<a href="http://gcc.gnu.org/onlinedocs/gfortran/Variable-FORMAT-expressions.html" rel="nofollow">link</a> to the documentation).</p> <p>I know your pain - I've also struggled with this problem many times be... |
7,258,295 | 0 | Blank Multipart email <p>I'm using PHP to send out a multipart/mixed message (plain text, html and attachments). However, whilst it works for most accounts, Yahoo, GMail and Sky seem to show blank emails. Where as everything else seems to display the email. ANY HELP WOULD BE GREATLY APPRECIATED!</p> <p>My headers are <... |
3,920,941 | 0 | <p>When data became too big to fit memory, the only way is use extended memory (HDD). Here you can partition and store on disk, load small part each onto memory and search.</p> <p>Or you should use a algobrithm that use less memory and more processor. <br>1.Search the file, search all num, and create a relative 2-d ma... |
11,759,993 | 0 | <p>A <code>List<Enum></code> is not a <code>List<Locations></code> nor a <code>List<Int32></code>. Use a generic method to handle the list:</p> <pre><code> public static void PackEnumList<T>(IEnumerable<T> list) where T : IConvertible { foreach (var value in list) int numeric = value.ToIn... |
31,657,878 | 0 | <p>I think you basically have the right idea. You should listen for collaborator leave/join events and update what is being tracked appropriately. As you say, its OK for multiple people to make the changes for leave, as they will do the same thing.</p> <p>The <a href="https://github.com/googledrive/realtime-playground... |
9,890,517 | 0 | How to dump sinatra rack test exceptions to console? <p>While I develop, I would like to see sinatra app exceptions when running tests, cosider example:</p> <pre><code>require 'sinatra/base' class ExceptionWeb < Sinatra::Base enable :raise_errors enable :dump_errors configure do enable :dump_errors end get "/" do ra... |
40,587,641 | 0 | How can I start/stop a stop watch with only the spacebar? <p>I want to start/stop a stop watch only using the spacebar. I already made the KeyListeners, and that they only get activated when you press/release the spacebar.</p> <p>What I tried so far:</p> <p>I tried creating a stopwatch class, which SHOULD calculate the... |
35,794,073 | 0 | Regex to match Tags NOT surrounded by Tags <p>I have the following example:</p> <pre><code><p>skljklf askjas</p> <li>dsjd sjg</li> <li>skdkgds</li> <li>skask las</li> <p>skklgs aklgas</p> <ul><li>saks </li><li>isksa</li></ul>... |
12,001,562 | 0 | iPhone App; identify file type from url <p>for an iphone app i am downloading files using url....</p> <p>from this type of url:: <a href="http://xxxxxxxxxxxxxxxxxxx.com/xxxxxxx//xxx/ipad.html?operation=getFile&contentId=61768b16-6b44-4d0b-bdcf-d10107d1f328" rel="nofollow">http://xxxxxxxxxxxxxxxxxxx.com/xxxxxxx//xxx... |
39,821,404 | 0 | <p>Let's see what actually (i + 7) % 10 do:</p> <pre><code>0 = 7 1 = 8 2 = 9 3 = 0 4 = 1 5 = 2 6 = 3 7 = 4 8 = 5 9 = 6 </code></pre> <p>As you can see there's definitely quite obvious pattern. So in order to decode our original digit back we have to do</p> <pre><code>(i + 3) % 10 </code></pre> |
19,942,426 | 0 | <p>Use <code>RegExpTxt.test(Fname.value)</code> instead of <code>RegExpTxt(Fname.value)</code></p> <p>Javascript should end up being:</p> <pre><code>function form_onchange(){ var Fname = document.getElementById('Fname'); var RegExpTxt = /^([a-zA-Z ]){2,30}$/; if (!RegExpTxt.test(Fname.value)) { alert('Please provide a... |
19,502,896 | 0 | <p>I loaded this exact file onto my WAMP server locally and everything worked perfectly fine: You might want to change this at the bottom of the page: src="http://code.jquery.com/jquery.js" There is nothing wrong with your code and the HTML5 shiv and respond.js has nothing to do with your menu not working...</p> <p>Yo... |
37,233,302 | 0 | <p>You are misunderstanding <code>in</code> and <code>out</code> parameters.</p> <p>This:</p> <pre><code>CallableStatement cStmt = dbConnection.prepareCall(sql); cStmt.registerOutParameter(1, Types.DECIMAL); cStmt.execute(); </code></pre> <p>Is declaring that your ratio parameter is an output from the procedure, but i... |
33,874,881 | 0 | <p>I don't know why you want to keep the unidirectional relation here, because making it bidirectional would make your life much easier.</p> <p>First, <code>CascadeType.ALL</code> on the parent mapping in your example means that if you delete the subfolder, its parent will be deleted also. And this will propagate all ... |
31,297,501 | 0 | Swift! Create a segue only if the button is pressed! Tab Bar Controller <p>Alright, so for about a few days now, I'm stuck on this problem. I have a Tab Bar Controller and I have a View Controller where users of the app either create of enter their passwords, lets call it the <strong>"Pass View"</strong>. </p> <p>The p... |
17,561,216 | 0 | Strip everything in string before the second “-” character that occurs? <p>I found solution for oposite:"Strip everything in string after the second “-” character that occurs?"</p> <pre><code>$newstr = substr($str, 0, strpos($str, '-', strpos($str, '-')+2)); </code></pre> <p>Now, I need solution for "BEFORE" the second... |
8,676,801 | 0 | <p>Try this...</p> <pre><code>String s3 = s1 + s2 if(s3.equals("onetwo")) { ... </code></pre> <p><code>==</code> compares if they refer to the same object, and the result of <code>s1+s2</code> isn't in this case, and the <code>.equals()</code> method on string compares that the values are the same. In general, you onl... |
13,493,713 | 0 | <p><strong>Use</strong>:</p> <pre><code>/*/Result/*/Flight [count(*/*)=count(/*/Request/*/FlightId) and not(*/*/FlightNumber[not(. = /*/Request/*/FlightId)]) ] </code></pre> <p><strong>Here is the complete transformation:</strong></p> <pre><code><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Tr... |
11,366,593 | 0 | How can I test the Visual C++ Redistributable? <p>Our company is preparing for a company-wide upgrade to Windows 7 64-bit. The people running the upgrade project have assembled a list of applications that need to be installed on every machine, and myself and my colleagues are being tasked with testing all these apps in... |
32,405,867 | 0 | <p>Here's the answer, a simple sub-select:</p> <p>declare @t1 table (Id int not null primary key) declare @t2 table (Id int not null primary key, Table1Id int not null, SomeValue int not null)</p> <p>INSERT @t1 VALUES (100), (101), (102), (103), (104), (105), (106), (107), (108), (109), (110), (111), (112), (113)</p> ... |
31,291,447 | 0 | <p>Use <code>addClass()</code> and <code>removeClass()</code> then store the styles in there:</p> <p>CSS</p> <pre><code>.my-checkbox-class { // styles } </code></pre> <p>JQuery</p> <pre><code>$('.single-checkbox:checked').addClass('my-checkbox-class'); $('.single-checkbox:checked').removeClass('my-checkbox-class'); </... |
28,298,844 | 0 | How to change bitmap height and width programmatically in android? <p>I want to resize the bitmap height & width into same as the user device width & height.So please help me if u know the code.Thank You !</p> <p>This is my code:</p> <pre><code> Bitmap bm = BitmapFactory.decodeResource(getResources(),R.drawable... |
8,255,816 | 0 | <p><a href="http://www-01.ibm.com/software/awdtools/xlcpp/" rel="nofollow">IBM's xlC++</a> compiler has a basic <a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/xlc_compiler_s_c_11_support50?lang=en" rel="nofollow">C++11 feature support page</a>.</p> |
34,396,674 | 0 | <p>Unfortunately, this seems to be a task, where you cannot get away using separate queries. However, I would use <code>union</code> to combine the results of the queries, rather than joins, or subqueries in the select list, or separate queries.</p> <ol> <li>With union there is only 1 roundtrip between the client and ... |
20,721,399 | 0 | Group by a Substring mysql not working <p>I want to use GROUP BY clause on a query in case IFF it's column TYPE contains [Sale], for that purpose I put the query below,</p> <pre><code>SELECT PAYABLE_TYPE AS TYPE, CASE WHEN (SUBSTRING(PAYABLE_TYPE, 1,6) = '[Sale]') THEN PAYABLE_TYPE END AS T, PAYABLE_PARTICULAR AS PARTI... |
38,904,343 | 0 | <p>You need <code>@temp = 0</code> at the beginning of each block of code.</p> <p>After executing your code with the modification</p> <pre><code>list = [{"name"=>"Germany", "id"=>1}, {"name"=>"USA", "id"=>2}, {"name"=>"USA", "id"=>3}, {"name"=>"France", "id"=>4}, {"name"=>"France", "id"=>... |
2,297,810 | 0 | <p>You would expose it as an <code>IEnumerable<T></code>, but not just returning it directly:</p> <pre><code>public IEnumerable<object> Objects { get { return obs.Select(o => o); } } </code></pre> <p>Since you indicated you only wanted <em>traversal</em> of the list, this is all you need.</p> <p>One mig... |
29,263,645 | 0 | MS Access shared on SharePoint with multiple users and linked tables <p>I have an Access Database (2010) that uses a linked table from a SharePoint (2013) list of names. It does not edit the information on the SharePoint list, but rather pulls the names from SP to populate the name field in the new records in Access. T... |
36,227,521 | 0 | <p>There is no <strong>Children</strong> property on Parent, there is a Child property. But the Binding attribute says Children. Change the attribute to...</p> <pre><code>public ActionResult Edit([Bind(Include="ParentId,ZmiennaParent1, Child")] Parent parent) </code></pre> |
24,717,590 | 0 | <p>This removes the list of services:</p> <pre><code>tasklist /v|find /v /i " services " </code></pre> |
6,430,142 | 0 | <p>UNIX timestamps are in seconds. Multiply by 1000.</p> |
29,805,037 | 0 | <p>There are couple of things you could do easily. First point is</p> <ul> <li><p>you could use <strong>Positive integer field</strong> in Django, if you want only positive integer in this model</p></li> <li><p>if you want to do the custom way, please raise an exception or use the assert statement for it. Then in the ... |
7,410,046 | 0 | <p>Check this link: <a href="http://eclipse.dzone.com/news/create-new-eclipse-workspace-w" rel="nofollow">Create New Eclipse Workspace - With All Your Old Settings</a> or this stackoverflow <a href="http://stackoverflow.com/questions/2988653/how-to-save-settings-of-eclipse">post</a></p> |
993,380 | 0 | <p>You only have to use this-> if you have a symbol with the same name in two potential namespaces. Take for example:</p> <pre><code>class A { public: void setMyVar(int); void doStuff(); private: int myVar; } void A::setMyVar(int myVar) { this->myVar = myVar; // <- Interesting point in the code } void A::doStuff... |
2,261,911 | 0 | I'm trying to read data from my SQL Server Compact database, but I keep getting the same error <p>I'm querying a <a href="http://en.wikipedia.org/wiki/SQL_Server_Compact" rel="nofollow noreferrer">SQL Server Compact</a> database with "SELECT * FROM User", and I get an error parsing the query:</p> <blockquote> <p>Token ... |
15,840,152 | 0 | <p>The corners.png file is definitely required. Here is the asset from that example site: <a href="http://search.missouristate.edu/map/mobile/examples/corners.png" rel="nofollow">http://search.missouristate.edu/map/mobile/examples/corners.png</a></p> |
29,672,440 | 0 | <pre><code>$string = "<strong>Blabla1</strong> Blaabla2<br /> Blaabla3 <strong>Blaabla4</strong> Blaabla5 Blaabla6<br /><br /> Blaabla7 <span style='color:#B22222;'>Blaabla8</span> Blaabla9"; $matches = preg_split('/(<br.*?>|<span.*>)+\K|\s/sim', $strin... |
22,347,894 | 0 | <p>XML is just a structure that represents Data. DTD is the definition of you xml structure. Non of these are generating ids for you. </p> <p>However XSLT's generate-id() will be suitable for you. You can learn more from w3c <a href="http://www.w3schools.com/xsl/func_generateid.asp" rel="nofollow">http://www.w3schools... |
2,764,481 | 0 | <p>By calling both the _breadcrumb method with x.father and assigning x = x.father in the beginning of the while loop you jump over one father. Try exchanging </p> <pre><code>self.crumb = self._breadcrumb(father) </code></pre> <p>with</p> <pre><code>self.crumb = self._breadcrumb(self) </code></pre> <p>By defining _bre... |
32,924,740 | 0 | Found this strange behaviour of Handlers in android <p>I just wrote a code which adds several views, each using a handler. These are added using a for-loop. These add just correctly. Then I tried to add a button AFTER the for loop without using handler. This time the button was shown on the top of the layout i.e BEFORE... |
23,424,215 | 0 | <p>No need for kooking further. <strong>indexOf</strong> does the trick. For one element:</p> <pre><code>"test" indexOf "es" res4: Int = 1 </code></pre> <p>For more elements:</p> <pre><code>scala> List("beer" , "root beer", "bavarian beer" , "a beer bong" ) map (_ indexOf "beer") res6: List[Int] = List(0, 5, 9, 2) ... |
38,234,610 | 0 | How to inject ngRoute into Jasmine / Karma AngularJS unit test? <p>I'm trying to get a basic unit test example working. It all works fine with this app.js</p> <pre><code>var whapp = angular.module('whapp', []) .filter('reverse',[function(){ return function(string){ return string.split('').reverse().join(''); } }]); </c... |
28,458,746 | 0 | How to get all records from a nested activerecord collection <p>I have an ActiveRecord query that i need help with.</p> <p>Lets say we have a user and he has multiple libraries. In each library, there are many collections. In each collection, he has many books.</p> <p>How do I get a list of all his books?</p> <p>I know... |
9,307,528 | 0 | <p>This is very normal, since each time you are closing the form and opening it again you are having a new instance from the form MyPropsX, so the best way would be to save your properties in any kind of a database (sql, access, textfiles,...)</p> |
32,939,058 | 0 | <p>Are you using the SQL Server Management Studio? You can have many databases on one connection. To create a new database, simply right click on the "Databases" object and select "New Database" The new database will not interfere with the existing one.</p> |
11,267,639 | 0 | <p>There's no official or centralized django-html5-boilerplate package, but based on your problem, I'm guessing you're using <a href="https://github.com/mike360/django-html5-boilerplate" rel="nofollow">the one created by mike360 on github</a></p> <p>If that's the case, in <a href="https://github.com/mike360/django-htm... |
40,861,684 | 0 | <p>Assuming the strings are all in column A:</p> <p>As you will only want to split where there are 2 or more characters, just to start you off. In <strong>Column C</strong> is the formula (this is only in column C):</p> <pre><code>=IF(LEN(A1)>1,CONCATENATE(LEFT($A1,1),"_",MID($A1,2,1),"_"),"") </code></pre> <p>In <... |
1,812,405 | 0 | <p>A VM is a big task to consider. Have you considered basing your VM on something like <a href="http://llvm.org/" rel="nofollow noreferrer">LLVM</a>? </p> <p>LLVM will provide a good base to start from and there are plenty of <a href="http://llvm.org/ProjectsWithLLVM/" rel="nofollow noreferrer">example projects</a> w... |
25,045,902 | 0 | <p>You can't set the <code>window.screen</code> values in the <code>LoadStarted</code> event, but you can in the <code>Intialized</code> event. So, instead, the code would look like this:</p> <pre><code>tab.onInitialized = function () { tab.evaluate(function () { window.screen = { width: 1920, height: 1080 }; }); }; <... |
16,637,340 | 0 | javascript: create range from cursor position at time a to cursor position at time b <p>I get the cursor position at time a. Then I get the cursor position at time b. I want to make a range from the cursor position at time a to the cursor position at time b. Time a and b are start and end of ctr-v (paste).</p> <p>I get... |
23,845,436 | 0 | <p>On Button Click You can use one of the following :</p> <ul> <li><pre><code>editText.setTextColor(Color.RED); </code></pre></li> <li><pre><code>editText.setTextColor(Color.parseColor("#FFFFFF")); </code></pre></li> <li><pre><code>editText.setTextColor(Color.rgb(200,0,0)); </code></pre></li> <li><pre><code>editText.s... |
36,592,670 | 0 | <p>You can also try this pure CSS method:</p> <pre><code>font-size: calc(100% - 0.3em); </code></pre> |
18,552,693 | 0 | <p>No, it checks everything in database. Cookies would be too dangerous (users can modify their rights) </p> <p>You can cache data with Cache class in Laravel 4 to compensate too many queries to your database. </p> |
37,481,603 | 0 | <p>I solve it running as administrator cmd. Cleaning the cache <code> npm cache clean -f </code> And then try to install the package again</p> |
36,593,715 | 0 | <p>From <a href="https://bitbucket.org/anthony_tuininga/cx_freeze/issues/32/cant-compile-cx_freeze-in-ubuntu-1304">cx_freeze/issues</a></p> <h1>Download</h1> <p>You need to <a href="https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=4.3.4">download the source code</a></p> <h1>For python 3.3 an... |
11,209,093 | 0 | <p>This is a typical reason why accessors/properties are good to avoid if possible. Try to get rid of exposing the entity's "raw" data and put the logic inside the entity itself - then you have your null check in one place.</p> <pre><code>txtRequiredDate.setText(todoEntity.formattedRequiredDate()) </code></pre> <p>...... |
13,888,288 | 0 | <p>The lifetime of an automatic object ends at the end of the block where it is declared.</p> <p>Accessing an object outside of its lifetime is undefined behavior in C.</p> <blockquote> <p>(C99, 6.2.4p2) "If an object is referred to outside of its lifetime, the behavior is undefined. The value of a pointer becomes ind... |
32,653,879 | 0 | <p>From: <a href="http://stackoverflow.com/questions/13581473/why-does-the-objectstatemanager-property-not-exist-in-my-db-context">Why does the ObjectStateManager property not exist in my db context?</a> </p> <pre><code>var manager = ((IObjectContextAdapter)db).ObjectContext.ObjectStateManager; </code></pre> |
8,829,690 | 0 | Rendering Issues with DirectShow and USB Video Sources <p>We are trying to get DirectShow work with USB video capture devices like <a href="http://www.mygica.com/pa/igrabber.asp" rel="nofollow">this</a>. The code simply adds the capture source's filter (capFilter) in the capture graph and then connects it to VMR9 rende... |
31,407,689 | 0 | <p>How are you calling this void function? The return paths include setting a <code>ViewBag</code> property with an error message along with modifying the response. It smells of bad design. </p> <p>I'd create a hyperlink that links to a <code>@Url.Action</code> for something like this. Note that you'd need to return a... |
21,494,582 | 0 | <pre><code><select> <option selected="selected" class="Country">Country Name</option> <option value="1">India</option> <option value="2">us</option> </select> </code></pre> <p> </p> <pre><code>.country { display:none; } </style> </code></pre> |
36,579,174 | 0 | Is not reusing created SOAP client object <p>Can anyone tell me why the SOAP client is not being re-used? It keeps getting initialized where it should have been reused from the last call.</p> <p>When I print out the SOAP client object after it was initialized it is there but it is forgotten at the next call.</p> <p>So ... |
39,680,169 | 0 | Error on VS 2013 for WP Silverlight 8.1 applications <p>I explain my error in this video: <a href="https://www.youtube.com/watch?v=kOXZxmIrYDQ" rel="nofollow">error</a></p> <p>I'm doing this because I tried to ask a question for my error in past and I didn't get any answers. (<a href="http://stackoverflow.com/questions... |
2,667,345 | 0 | <p>This looks correct.</p> <p>Note that <code>MailMessage</code> does not override <code>ToString</code>, so your logs will simply say <code>[MailMessage] Send cancelled</code>.<br> You might want to use the <code>Subject</code> proeprty (or some other property) instead.</p> |
5,470,994 | 0 | <p>That could be a div the styled during events and as other suggested make it contentEditable. With regards to textarea I have read similar question <a href="http://stackoverflow.com/questions/142527/highlight-text-inside-of-a-textarea">here</a>. Check it if it's what your looking for.</p> |
692,853 | 0 | Which collection for storing unique strings? <p>I'm looking for a collection just like <code>Dictionary(OF Key, Value)</code> but I don't actually need a key and value. Key itself is enough. So something like <code>Collection(Key)</code>. It shouldn't accept duplicate keys.</p> <p>I've looked up couple of collections i... |
22,166,654 | 0 | Interactive drawing with Fabric.js <p>I am trying to do an interactive drawing using Fabric.js. Now I can draw a rectangle by using mouse. But after I finish drawing the rectangle, I can not select it unless I resize it once by using the left top controller after drawing. I wonder what break the event system.</p> <p>He... |
8,425,436 | 0 | <p>This is a bit of a long shot, but you could investigate <a href="http://hg.codeflow.org/genshi2js/summary" rel="nofollow">genshi2js</a>. It claims to compile a subset of genshi templates into javascript functions (similar to Google's soy templates). Unfortunately it seems to be an abandoned project. The main link f... |
36,735,588 | 0 | <p>You can achieve this solution very easy by Jquery. the following code very useful to you.</p> <pre><code>$().ready(function() { $('#right_arrow_id').click(function() { return !$('#firstboxid_here option:selected').clone(true).appendTo('#second_box_id_here'); }); </code></pre> <p>for removing options from second box... |
18,442,406 | 0 | Android GCM doesnt register device <p>Code:</p> <pre><code>String msg = ""; try { if (gcm == null) { gcm = GoogleCloudMessaging .getInstance(OrfografApplication.this); } String senderId = Constants.GCM_SENDER_ID; GCM_REGISTRATION_ID = gcm.register(Constants.GCM_SENDER_ID); msg = "Device registered, registration id=" + ... |
25,646,249 | 0 | <p>If you are getting special character in <code>kati</code> array then you can use tab library and use</p> <p><code>c:out</code> as</p> <pre><code><c:out value=${yourArrayvalue} escapeXml='true'/> </code></pre> <p>so you will get desired output</p> |
19,765,500 | 0 | <p>Try this:</p> <pre><code>var element = root.GetElementsByTagName("Intelejen")[0]; if (element != null) txt10.Text = element.InnerText </code></pre> <p>Explanation: <code>root.GetElementsByTagName("Intelejen")[0]</code> returns null if no element is found. That is why <code>InnerText</code> throws a null exception</... |
35,202,071 | 0 | <p>I prefer this approach, which is a bit short and sweet:</p> <pre><code>result <- rasters[!sapply(rasters, is.null)] </code></pre> |
1,595,014 | 0 | How to return a verbatim string from ConfigurationManager.AppSetting["settingname"].ToString() <p>I am using the <code>ConfigurationManager.AppSetting["blah"].ToString()</code> method to get the path to the folder that contains the files I'm needing. But I'm throwing an <code>UnsupportedFormatException</code> on the pa... |
5,407,453 | 0 | JSF 2 Lifecycle <p>I have this code for BookModel.java:</p> <pre><code>@Entity @Table(name = "BOOK") @NamedNativeQuery(name = "BookModel.findBookTitle", query = "SELECT @rownum:=@rownum+1 'no', m.title, m.author, REPLACE(SUBSTRING_INDEX(m.content, ' ', 30), '<br>', ' '), m.viewed, m.hashid FROM book m, (SELECT @r... |
18,405,597 | 0 | <p><code>int</code> does not round -- it finds the floor (truncates the fractional part).</p> <pre><code>>>> n = 8.92138 >>> '%.42f' % n # what n really is '8.921379999999999199644662439823150634765625' >>> 100000 * n # result is slightly lower than 892138 892137.9999999999 >>> int(... |
31,027,115 | 0 | <p>When dealing with optionals you should be conditionally unwrapping them with an if statement.</p> <pre><code>var yourOptional: String? if let unwrapped = yourOptional { // Do something with the variable } else { // It was nil } </code></pre> |
11,805,251 | 0 | Add HTML elements dynamically with JavaScript inside DIV with specific ID <p>Ok, poeple, I need your help. I've found some code here on Stackoverflow (can't find that link) which generate HTML code dynamically via JS. Here is code:</p> <pre><code>function create(htmlStr) { var frag = document.createDocumentFragment(), ... |
37,041,146 | 0 | <p>You need to use a (derived) table of values. Here is a solution using <code>left join</code> instead of <code>not in</code>:</p> <pre><code>select n.n from (select 1 as n union all select 2 union all select 4 union all select 5 union all select 6 union all select 7 ) n left join tablename t on t.id = n.n where t.id... |
21,799,138 | 0 | Django/HTML - what "value", "id" and "name" fields stand for? <p>I've gone through all the official Django tutorial, but I can't seem to figure out a template section of it. I have the following form</p> <pre><code><form action="{% url 'polls:vote' poll.id %}" method="post"> {% csrf_token %} {% for choice in poll... |
21,423,604 | 0 | <p>Without reading all to much of your stuff,</p> <pre><code>def check_dict(first, second): for key in first: for keyTwo in second: if type(first[key]) == dict and type(second[keyTwo]) == dict: return check_dict(first[key], second[keyTwo]) if not first[key] == second[keyTwo]: return false </code></pre> <p>Don't have a... |
2,272,689 | 0 | <p>Generally there are several different ways to start service:</p> <ol> <li><a href="http://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)" rel="nofollow noreferrer">startService()</a> - after that you need to explicitly stop service with stopService()</li> <li>[bind... |
8,088,091 | 0 | <p>According to the spec the <code><p></code> element cannot contain <code>"block-level elements (including P itself)"</code>. My guess is Chrome is just trying to be helpful here.</p> <p>Source: <a href="http://www.w3.org/TR/html401/struct/text.html#h-9.3.1" rel="nofollow">http://www.w3.org/TR/html401/struct/te... |
1,326,575 | 0 | <p>A module contains IL and many of them are linked together to create an assembly, which is usually housed in a PE like a .exe or a .dll.</p> <p>A PE can contain native (non managed) code as well.</p> <p><a href="http://en.wikipedia.org/wiki/Portable_Executable" rel="nofollow noreferrer">This is a good intro to the c... |
6,731,527 | 0 | <p>Just <code>return false</code> from the cancel handler.</p> <p>Otherwise the click event bubbles, and since the button is nested inside the <code>li</code> element that opens the form, both elements receive the click.</p> <p>The <em>cancel</em> button tries to <code>hide</code> it and then the <code>li</code> re-op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.