pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
20,941,128
0
How to feed a custom ImageSource to Image in XAML <p>One way to set an ImageSource for Image in XAML is like this:</p> <pre><code>&lt;Image Width="75" Height="75"&gt; &lt;Image.Source&gt; &lt;BitmapImage UriSource={Binding Uri} DecodePixelWidth="75" DecodePixelHeight="75" /&gt; &lt;Image.Source&gt; &lt;/Image&gt; </cod...
21,388,832
0
Oracle TIMESTAMP and Mybatis issue <p>I'm using mybatis in my web application.</p> <p>I'm executing the below select query:</p> <pre><code>&lt;select id="retrieveSearchResultReferrals" resultType="hashmap" parameterType="map"&gt; select * from table(xxxx.test_abc_pk.retrieveDA(#{searchString})) &lt;/select&gt; </code><...
32,363,968
0
Updates/Deletes in levelDB <p>The sorted SSTable data structure that levelDB uses is immutable. If so, how are records updated/deleted in levelDB ? Is this process done periodically ? </p>
15,377,246
0
<p>Renderer is an OpenGL method. OpenGL ES doesn't inherently support text. This leaves the following options:</p> <ol> <li>Use a texture, draw to it using Android's Canvas class.</li> <li>Use a library. This will most likely also draw to a texture as well.</li> <li>Create the text with polygons.</li> </ol> <p>Since y...
2,349,647
0
<p>Try this:</p> <pre><code> for (int x=0;x&lt;4;x++) flag[x]=guess[x]==answer[x]?1:0; for (int slot = 0;slot &lt; 4;slot++) { if (guess[slot] == answer[slot]) black++; else for (int s=0;s &lt; 4;s++) if (!flag[s] &amp;&amp; guess[slot] == answer[s]) { white++; flag[s]=1; break; } } </code></pre>
39,399,353
0
<p>Call the function and save the result in a variable:</p> <pre><code>$result = GetProductsByCategory($categoryID); </code></pre> <p>then inside the function:</p> <pre><code>$productsResult = $conn-&gt;query($sql); return $productsResult; </code></pre> <p>then your while loop should use this returned result (i.e., <c...
6,078,693
0
<p>After much work, thanks to cainmi's suggestion I have come up with a solution. My .htaccess for the protected directory looks like this</p> <pre><code>RewriteEngine On RewriteBase /php-wrapper/auth RewriteRule ^(.*) /php-wrapper/wrapper.php?topage=https://%{SERVER_NAME}/php-wrapper/auth/$1 </code></pre> <p>This pas...
9,041,553
0
<p>Similar to Charlie Martin, you can do something like this:</p> <pre><code>static unigned __int64 _foo_id = 0; foo::foo() { ++_foo_id; if (_foo_id == MAGIC_BAD_ALLOC_ID) DebugBreak(); std::werr &lt;&lt; L"foo::foo @ " &lt;&lt; _foo_id &lt;&lt; std::endl; } foo::~foo() { --_foo_id; std::werr &lt;&lt; L"foo::~foo @ " ...
6,792,025
0
How to get and store Username and password when app is launched for the first time? <p>I have a tabbar app and I want to add login window that will show just for the first time the app is launched. and want username and password to be hard coded in the app. can anyone help me with this please.</p>
35,717,158
0
<p>I would recommend this </p> <pre><code>#element { display: table; /* IE8+ and all other modern browsers */ } </code></pre>
19,394,325
0
<p>Observations,</p> <p>Count_List() should count each element on list, your version only counts starting at the second item on the list. And it should always return an int,</p> <pre><code>int Count_List(Library *Head) { int count = 0; Library *Tmp = Head; if(!Tmp) return(count); while(Tmp != NULL) { count++; Tmp = Tm...
7,926,799
0
Calculating difference between 2 Zend_Date objects <p>I have 2 Zend_Date objects:</p> <pre><code>$d1 = new Zend_Date('2011-11-14 12:20:30'); $d2 = new Zend_Date('2012-11-16 13:40:10'); </code></pre> <p>And I need to calculate difference. My output should be like this:</p> <pre><code>Years: 1, Months: 0, Days: 2, Hours:...
27,559,124
0
Double command execution with instanceof and HashMap <p>I'm really flummoxed by this one. After having some problems managing separate HashMaps for each child class, I decided to try using instanceof to make things simpler with a HashMap of the Parent class that will include any number of each of the child classes. I c...
34,477,879
0
<p>The following worked to fix the issue:</p> <pre><code>url = urllib.unquote(str(res.url)).decode('utf-8', 'ignore') </code></pre> <p><code>res.url</code> was a unicode string, but didn't seem to work well with <code>urllib.unquote</code>. So the solution was to first convert it to a string (like how it was in the py...
17,398,407
0
<p>Thanks to art-divin, and to Jean-Baptiste for providing the answer via email. Below is the code that repositions a button matrix on rotation. The code for creating the button matrix remains the same.</p> <pre><code>- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTim...
24,412,694
0
JWplayer raising Could not load plugins: File not found Error <p>I saw many answers for <strong>Could not load plugins:File not found</strong>. but it's bit different.</p> <p>I am using jwplayer for my rails app and i am playing videos in bootstrap modal.</p> <p>After page load if i click video to play in bootstrap it ...
6,569,236
0
On line Table editor for MS SQL Server / Access? <p>I'm searching for a on line database table editor for SQL or Access that allows editing of records. Does it exist a .net application? Can someone help me?</p>
23,339,553
0
<pre><code>//try this way, hope this will help you... String value = "5571.329849243164"; Toast.makeText(MyActivity.this,""+Math.round(Double.parseDouble(value)),Toast.LENGTH_SHORT).show(); </code></pre>
5,686,666
0
<p>Yes you can, see here:</p> <p><a href="https://github.com/blog/128-let-there-be-renaming">Rename github repo</a></p> <p>If I understand you correctly you want to rename your git repository eg xyz.git to xyz1.git and then have all the git repositories that link to that repo link to the new name automatically?</p> <p...
18,876,602
0
<p>I am still at education so do know how good is my solution , but i did not crash so hope it is correct</p> <p>and it is quite similar to @muthu 's code</p> <p>I had used JPA-eclipselink and Struts2</p> <p>Action Class</p> <pre><code>String checkLogin = "SELECT user FROM UserEntity user WHERE user.username = :userna...
30,828,666
0
getting back additional info when webscraping with cheerio js <p>I am working with cheerio.js to make a simple web scraper. For some reason it does not respond to certain html tags. One div I cannot target is <b>the div with the class of 'dataTables_scrollBody'</b> on the website that I am scraping: <a href="http://www...
39,391,922
0
Generate a .sparql file in order to backup rdf graphs <p>Is there a way to use SPARQL to dump all RDF graphs from a triplestore (Virtuoso) to a <code>.sparql</code> file containing all <code>INSERT</code> queries to rebuild the graphs?</p> <p>Like the <code>mysqldump</code> command?</p>
11,732,940
0
<p>Create a button in your XML layout and the add the attribute <code>android:onClick="takeAPicture"</code> then in your main activity create a method with the same name from the <code>onClick</code> attribute. </p> <pre><code>public void takeAPicture(View view){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPT...
35,086,266
0
<p>You will need a new method which all it does it simply check if the radio button is there or not.</p> <pre><code>public static boolean isPrivateRadioButtonExist() { return driver.findElements(By.id("type-radio-private")).size() != 0; } </code></pre> <p>Then, in your base test class, call this method to determine if...
17,549,505
0
Struggling with regular expression <p>I'm struggling to find the regular expression I can use to classify data that matches a certain pattern:</p> <p>Here's a few examples:</p> <pre><code>pli:06e9b616-5712-d0e9-1bc2-000012e61393 pli:6fdd187d-cbdc-3028-4a8d-000020f3449a pli:0472def9-ccf3-e4e9-ca05-00005fecf9f8 </code></...
31,235,362
0
<p>You could create a class to map your patients to;</p> <pre><code>private static class Patient { @JsonProperty("name") private String name; @JsonProperty("age") private int age; public Patient() { } public String getName() { return name; } public int getAge() { return age; } } </code></pre> <p>Then read your json in...
12,559,954
0
<p>With Java 7, it's as simple as:</p> <pre><code>final String EoL = System.getProperty("line.separator"); List&lt;String&gt; lines = Files.readAllLines(Paths.get(fileName), Charset.defaultCharset()); StringBuilder sb = new StringBuilder(); for (String line : lines) { sb.append(line).append(EoL); } final String conten...
14,555,399
0
How do I handle the timezones for every Chat message <p>I am creating a web chat application using ASP.NET. I have got the chat system to work as messages are sent and relayed back to the clients. But there was something I noticed but never thought it would be a problem. I am from England and the chat application is si...
35,956,306
0
<p>Add a parentheses after the stored procedure name, with an equal amount of question marks to match the amount of parameters you wish you fill in.</p> <p>Eg.</p> <pre><code>{call MyProc(?,?,?)} </code></pre>
32,251,714
0
Cannot derive user name for bundle org.demo.anthony.mybundle.core [446] and sub service null <p>I have a bundle that was working completely fine in AEM 6. I just upgraded to AEM 6.1 and when I deploy the bundle, I'm getting the error below:</p> <blockquote> <p>javax.jcr.LoginException: Cannot derive user name for bundl...
3,649,673
0
What indices should be created to optimize sql query with multiple OR conditions <p>I have a query like this:</p> <pre><code>SELECT * FROM T WHERE A = @A AND (B=@B OR C=@C OR D=@D OR @E=E) ORDER BY F </code></pre> <p>What indices should I add to improve query performance? Also I'll need to implement paging so this quer...
35,901,074
0
<p>Here is a working version with some changes from your original code. As pointed out in the other answer, there are a few errors in your code. In addition, I changed textOutput to htmlOutput. In server.R, I put all code inside the <code>observeEvent</code> environment.</p> <p>In general, your method in your R script...
10,162,774
0
<p>Yeah, that's right. If you define a function inside a function, it will be private to that function. You need to create a global var</p> <pre><code>var recordjourney; $(document).ready(function(){ ... recordjourney = { var journey = ... etc </code></pre> <p>Although, of course, given that you are using JQuery I'd d...
40,688,288
0
<p>So after two days of research I cant find a proper solution to this issue i managed to bypass it by setting the cell frame in <em>layoutAttributesForElementsInRect</em> like this:</p> <pre><code> UICollectionViewCell* cell = [self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:[attributesForEle...
24,465,190
0
NSDictionary loading a NSURL with URLByResolvingBookmarkData <p>I'm trying right now the Bookmark Data solution and I retraive a NSURL but it doen't work.The NSURL is correctly formatted but when i use it to create a dictionary or a string these are nil. The code I'm using is this:</p> <pre><code>- (NSData *)bookmarkFr...
17,464,184
0
adding the text box values using javascript <p>I have a Grid view which contains various text boxes. I need to add all the text box values and display the result in a separate Text Box. I need to use java script for this. Please help me out.</p>
29,104,583
0
<p>I prefer to avoid select, activate and selection in deference to direct addressing. The paste special, values can also be handled more efficiently by direct cell value transfer.</p> <pre><code>'make sure that the worksheet vars are set correctly set wsOrigen2 = &lt;other workbook&gt;.Sheets("Sheet1") set wsDestino ...
38,353,975
0
<p>Would you be okay using something like this? It also helps to have more views on Youtube.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code> #laptop-panel { position: relat...
36,351,677
0
<p>Ok I don't know for your error but you're handling exception the wrong way. Here is how you should do it (not to mention the SQL injection here) :</p> <pre><code>Try ' Your code here Catch e as Exception MsgBox.show(e.Message, "An Error occured") End Try </code></pre> <p>NB : I post this here because it's too lon g...
38,059,533
0
Why doesn't DbgPrintEx support floating-point numbers? <p>According to <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff543634(v=vs.85).aspx" rel="nofollow">the documentation</a></p> <blockquote> <p>The <code>DbgPrintEx</code> routine does not support any of the floating point types <em>(%f, %e, %E,...
5,754,195
0
How to integrate twitter app in my iphone? <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4012349/how-to-connect-to-twitter-from-iphone">How to connect to Twitter from iPhone?</a> </p> </blockquote> <p>hi, can anybody please explain how to integrate the twitter app ...
39,353,984
0
<p>I'll focus my answer on this part of your question:</p> <blockquote> <p>How can I make sure that my DateTime -> NodaTime outputs are consistent, regardless of current location?</p> </blockquote> <p>Several places in your code, you call <code>.ToUniversalTime()</code> on a <code>DateTime</code> object. When you do t...
23,310,002
0
Match everything before last section of url <p>I want to match everything in a URL up to the last section.</p> <p>So I want to match: <code>http://www.test.com/one/two/</code> in all of the following cases:</p> <pre><code>http://www.test.com/one/two/three http://www.test.com/one/two/three/ http://www.test.com/one/two/t...
15,616,949
0
<blockquote> <p>I am unable to find a convincing answer as to why the information from the -g option is insufficient for de-compilation, but sufficient for debugging?</p> </blockquote> <p>The debugging information basically contains only mapping between the addresses in the generated code and the source files line num...
25,186,754
0
Magento Fatal error: Class 'Mage_Order_Helper_Data' not found <p>I must be over-thinking this issue, but I can't seem to resolve it. I need to overwrite the <strong>sendNewOrderEmail</strong> function of <strong>Mage_Sales_Model_Order</strong>. When I do this I lose my transactional email templates in the drop-down in ...
4,496,251
0
What's a good way to integrate FB and Twitter into my commenting system (PHP) <p>There are so many options out there for integration. </p> <p>At the moment I have comments that are posted on my articles, where a user types in their name and the comment. This is then sent to a moderation queue and displayed when approve...
362,296
0
<p>Edited after reading Frans Bouma's answer, since my answer has been accepted and therefore moved to the top. Thanks, Frans.</p> <p>GUIDs do make a good unique value, however due to their complex nature they're not really human-readable, which can make support difficult. If you're going to use GUIDs you might want t...
20,751,202
0
Nested foreach statements... how to break out of child and continue parent if a match is found <p>I have an application that is passing a list of system printers to a PHP application. I am trying to set it up to ignore the printers that are basically just "software" printers. As you can see from the code below(which is...
21,159,987
0
<p>Your are starting activity <code>B</code> for result from activity <code>A</code></p> <pre><code>public void onClick(View v) { Intent intent = new Intent(A.this, B.class); startActivityForResult(intent,1); setResult(RESULT_OK); finish(); } </code></pre> <p>So activity <code>A</code> is expecting result to delivered...
32,354,663
0
<p>You can get the notes from Feed end point.</p> <p>Get the feed.</p> <p><a href="https://graph.facebook.com/v2.0/YOURPAGEID/feed?access_token=TOKEN&amp;limit=250" rel="nofollow">https://graph.facebook.com/v2.0/YOURPAGEID/feed?access_token=TOKEN&amp;limit=250</a></p> <p>Find your note on your feed and use its ID.</p>...
39,191,502
0
php links added to code <p>This code is from view-source in Chrome:</p> <pre><code>&lt;div class='pedSpouse'&gt;Relation med &lt;a class='familylink' file='157' pers='24351162'&gt;&lt;strong&gt;KARL EMRIK Jakobsson&lt;/strong&gt; f. 1897&lt;/div&gt;&lt;/div&gt;&lt;div&gt; &lt;img id='pedMore' src='cmn/prg/pics/hpil.png...
20,955,706
0
JCL ICEMAN how many sort files are needed? <p>I am working with JCL and there is what is called an <strong><em>ICEMAN</em></strong> which is which is invoked when the IBM SORT utility DFSORT is used. DFSORT can be used to SORT, COPY or MERGE files, amongst other things. In the example below there the output is from a S...
35,941,072
0
<p>If you want to save for example usersettings you could create <a href="https://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx" rel="nofollow">Settings </a>in your Properties.</p> <p>You can get them like this:</p> <pre><code>string anyProperty = WindowsFormsApplication1.Properties.Settings.Default.TestSett...
36,693,052
0
Migrate large WordPress site <p>I need to export the current WordPress website data to my local machine. I know how to do this but i have a small problem and that's about the large amount of images in the <code>wp-content</code> folder. I only want to have the original images so i can generate the new sizes myself. Is ...
40,565,441
0
<p>You do not use arctan or <code>atan</code> to find an angle (except where explicitly demanded), but the argument function <code>arg(x+i*y)</code> usually found under <code>atan2(y,x)</code>.</p> <p>The angle around the origin between two points <code>a</code> and <code>b</code> can be found as </p> <pre><code>arg( ...
38,000,800
0
NodeJS, Passport & Passport-Local <p>So I'm running into an issue authenticating using a local strategy. If I pass invalid credentials or anything unsuccessful, I get the appropriate error. However, if they authentication is successful, then I'm presented with a 404 error.</p> <p>I've dug around, and the best idea I ra...
8,821,665
0
<p>Try this for your jsfiddle:</p> <pre><code>function toggleMe(me) { var alreadyOpen = me.is(':visible'); jQuery('div[class^="content-"]').hide('fast'); if (!alreadyOpen) { me.show('slow'); } } jQuery('.expand-one').click(function() { toggleMe(jQuery('.content-one')); var img = $(this).find('img'), src = img.attr("sr...
41,058,819
0
Photography or Continue Engineering <p>I'am a student of mechanical engineering,2 year in diploma.After 2 year I realize I'am not interested in engineering I love to capture nature photo I want to became photographer should I leave diploma and start photography course</p>
13,726,426
0
Web API Self hosting from a test assembly <p>I'm currently evaluating WebAPI and NancyFx for a new project about to start. I've managed to get Nancy to self host from a test assembly (by itself it uses asp.net hosting). </p> <p>Is there any way to do the same with Web API? I would like to keep the web api project hoste...
5,475,103
0
<p>You're passing a list of entities to your <code>render_template</code> function instead of passing a dict. Try something like <code>utils.render_template(self, 'persons.html', {'persons': persons})</code></p>
35,847,078
0
<p>Reflection is rarely the correct answer to anything. Consider having your enum classes implement a common interface, like <a href="http://docs.oracle.com/javase/8/docs/api/java/nio/file/StandardCopyOption.html" rel="nofollow">StandardCopyOption</a> and <a href="http://docs.oracle.com/javase/8/docs/api/java/time/Mon...
35,731,732
0
<p>Webjobs look for a Main function signature as an entry point by default. It's like your regular Console Aplication. If you put any <code>Console.Write</code> lines, it will output too.</p> <pre><code>public class Program { public static void Main(string[] args) { //your code... } } </code></pre> <p>Go to your <stro...
16,407,957
0
<p>In addition to what cygin points out (parameters seem reversed), <code>revStr</code> calls itself with a <em>smaller</em> value for <code>e</code>. But your description sounds like <code>e</code> is supposed to be less than or equal <code>k</code>. So then wouldn't you want to pass a <em>larger</em> value for <code...
6,413,593
0
<p>None of those are even remotely good ideas, although the first one is passable with some modifications. <code>reinterpret_cast</code> doesn't work the way you think it does, and I'm not sure what exactly you're trying to achieve with placement new. Store a smart pointer of some sort in the first one to avoid the ob...
14,474,378
0
<p>It is bad practice to use null as id for your question I would use something like this</p> <pre><code>select * from post p1 where not exists (select 1 from comment c1 where c1.post_id = p1.id) union select * from post p2 where exists (select 1 from comment c1 where c1.post_id = p1.id and c2.user_id &lt;&gt; 124) </...
5,837,033
0
<p>Your logic seams correct to me. But I wonder about a possible problem with registering for a <code>UIKeyboardWillHideNotification</code> every time your <code>viewWillAppear</code>. Try to register only once in <code>viewDidLoad</code> and unsubscribe in <code>dealloc</code>. I am thinking that maybe when you regis...
26,239,435
0
<p>You need to use System.out.format. </p> <p>You can control the lengths of fields like this:</p> <pre><code>System.out.format("%32s%10d%16s", string1, int1, string2); </code></pre> <p>This pads string1, int1, and string2 to 32, 10, and 16 characters, respectively.</p> <p>See the Javadocs for java.util.Formatter for ...
12,532,514
0
<p>I'm thinking that since <code>window.location</code> is a host object, it does not obey "native" JS object semantics, and that's why you're having problems doing the same thing for <code>location</code> as you did with <code>foo</code>.</p> <p><a href="http://jibbering.com/faq/#nativeObject" rel="nofollow">http://j...
34,280,807
0
My executable ruby gems don't work as expected <p>I followed this tutorial <a href="http://guides.rubygems.org/make-your-own-gem" rel="nofollow">http://guides.rubygems.org/make-your-own-gem</a> to figure out how to create ruby gems but I'm having trouble figuring out how to create an executable. </p> <p>I originally th...
35,533,513
0
Highlight Google map marker when Image comes in Viewport of DIV scroll <p>Below is Image listing done using ng-repeat.</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="data" ng-repeat = "image in i...
37,174,975
0
<p>I had a similar problem and I solved it so:</p> <p>When adding Refresh Controller on View Controller it is necessary to write the following code:</p> <pre><code>dispatch_async(dispatch_get_main_queue()) { self.refreshControl.beginRefreshing() self.refreshControl.endRefreshing() } </code></pre>
23,170,845
0
Copy to ouput directory doesn't work like I thought <p>This question is probably asked thousand times, but no answer helped me. I added a XML file to my project and wanted it to be copied into the output directory when I debug/build the project. So I set "Copy to ouput directory" to "Copy always", but Visual Studio/Com...
16,978,547
0
<p>There are a few of things I can see to improve this</p> <ul> <li>Before looping, check if the substring is 0 length, if so return false (dont check every iteration)</li> <li>Remove <strong>ALL</strong> <code>== true</code>'s its basically comparing a boolean against a boolean</li> <li>Use <a href="http://msdn.micro...
34,894,570
0
Pure virtual function which must set variable <p>recently i have read some about pure virtual function concept in c++ and i wonder, given following code:</p> <pre><code>class First { public: virtual void init() = 0; protected: bool initialized; }; class Second : public First { public: void init() { ((*someting*) ? (ini...
30,109,348
0
<p>If you are using Chrome, you should use the "Timeline" to record the memory usage. Launch the timeline, then wait for the page to refresh a few times, and then stop the timeline and have a look at the results. If you see the line keeping increasing, that means your objects in memory (or the DOM nodes) are never rel...
13,300,071
0
<p>You should not place the outlet in the Application Delegate. Your app should contain a root view controller (created automatically if you're using a single view application template), which should handle anything related to the application's initial view. Once you have one, open the storyboard in the editor. Open a...
3,390,711
0
Start new activity from onClickListener <p>I have an EditText area that is not showing due to the keyboard covering it when the focus is on the EditText area. What I want to do is use a button to call an activity that will display a editable text area that overlays the main display and returns the value to the main act...
17,871,222
0
<p>I assume you are running Ubuntu as production server. On your server you need to edit your <code>sudoers</code> file:</p> <p>First type <code>select-editor</code> and select nano (or another editor you feel confortable with)</p> <p>Then at the bottom of the file, before the <code>include</code> line, add this line:...
6,325,379
0
<p>Use a server-side language like PHP w/MySQL to write a text file or XML file that Flash can understand. in turn, when sending variables use ActionScript to send the variables to a PHP form parser that loads it to the server.</p> <p>I don't have any examples to show you right now, but that would certainly be a worka...
26,790,364
0
<p>In C++, there is no type "string". Try to use container class std::string with <code>&lt;string&gt;</code> header.</p>
16,870,247
1
Is there an open source spider/crawler that supports build-in javascript execution <p>Nowadays most of web pages contain javascript, but I don't find any open source spider that supports build-in javascript execution.</p> <p>Is there such one crawler?</p>
24,671,557
0
<p>Try using <code>GNU Parallel</code> like this... it will split <code>file.xml</code> into chunks of 1MB (or thereabouts on nearest new line) and pass each chunk to one CPU core to run <code>grep</code>, so not only should it work, but it should work faster too:</p> <pre><code>parallel --pipe grep -o xmltag &lt; fil...
3,823,662
0
Changing Inherited Types in Entity Framework <p>I see there is a similar question asked here but I don't think it was very clear so I'm creating another : <a href="http://stackoverflow.com/questions/1239504/entity-framework-inheritance-change-object-type">http://stackoverflow.com/questions/1239504/entity-framework-inhe...
25,695,061
0
<p>change <code>.profileList</code> to this:</p> <pre><code>.profileList { display: inline-block; width: 50%; vertical-align:top; } </code></pre> <p>when you use <code>inline-block</code>, you need to give it the desired vertical align, since the default is <code>baseline</code></p>
16,893,364
0
<p>Using matplotlib to export to TIFF will use PIL anyway. As far as I know, matplotlib has native support only for PNG, and uses PIL to convert to other file formats. So when you are using matplotlib to export to TIFF, you can use PIL immediately.</p>
8,196,392
0
<p>the checkbox isen't centerd it has just a width of 200px because you set the width of all input elements to 200px.</p> <p>so thats why you should specify your input which you wana be 200px width: <code>input[type="text"]</code></p> <p>Example: <a href="http://jsfiddle.net/sY9Fa/1/" rel="nofollow">http://jsfiddle.ne...
26,508,675
0
<p>One problem that I saw : It won't work if you choose : <code>GridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;</code></p>
27,040,980
0
<p>The one underlined in red is App Display Name which may be in localized.strings as set in the info.plist. The blue underlined name is the product name, as set in the build settings.</p>
10,473,155
0
<p>Rather than using a timer to remove a user, I would use a more conventional approach of having an expiration time for the user (or perhaps their password). That is, when they first register, assign an expiration for 15 minutes after the present time (e.g. in a column <code>ExpirationDate</code> in the user table). ...
4,854,835
0
<p>My suspicion is that your Linux VM may be thrashing to swap space.</p> <p>Virtual machines are often limited in their allotted RAM. Have you checked whether it's run out? The 'top' command is useful for this. </p> <p>If you're not familiar with 'top', the upper part of its screen shows general memory and CPU use st...
19,123,554
0
<p>Go to <code>config.php</code> and replace <code>localhost</code> in :</p> <pre><code>$CFG-&gt;wwwroot = 'http://localhost'; </code></pre> <p>With your server's external IP. </p>
26,493,128
0
clearInterval isn't functioning properly <p>This is my code that auto adds a certain amount "points" or gold every second depending a varable but when that variable variable changes which is done by a button that runs this command to stop the set Interval isn't functioning. Please help me figure this out.</p> <pre><cod...
32,197,731
0
Is it possible define one-to-many relation in Sql Server and just define and use one side of this relation in entity code first <p>If I defined one-to-many relation foreign-key constraints in Sql Server, Is it possible just define and use it in code-first class definitions in one side? For example suppose I have Librar...
31,419,952
1
Adding 2 data frame in python pandas <p>I want to combine 2 seperate data frame of the following shape in Python Pandas:</p> <pre><code>Df1= A B 1 1 2 2 3 4 3 5 6 Df2 = C D 1 a b 2 c d 3 e f </code></pre> <p>I want to have as follows:</p> <pre><code>df = A B C D 1 1 2 a b 2 3 4 c d 3 5 6 e f </code></pre> <p>I am using...
31,588,927
0
<blockquote> <p>I got to thinking about when I should await things</p> </blockquote> <p>It's better to always await the result from asynch calls.</p> <p>If you don't await, you <strong>fire &amp; forget</strong>, you don't receive response on your end in both success and error cases.</p>
31,832,599
0
Future failure in Clojure <p>In Scala a future can fail and this can be found out asynchronously:</p> <pre><code>f onComplete { case Success(_) =&gt; println("Great!") case Failure(t) =&gt; println("An error has occurred: " + t.getMessage) } </code></pre> <p>How would you 'translate' this into Clojure? My reading leads...
4,668,515
0
Problem in eclipse configuring tomcat <p>I have trouble when I want to configure eclipse. This error appears, but I dont know where is my problem. I copied <code>apache-tomcat-7.0.5</code> folder in <code>E:\Java</code> folder, where is java installed.</p> <blockquote> <p>Tomcat requires a Java SDK in order to compile ...
13,324,734
0
<p>Try this:</p> <pre><code>button(:id =&gt; 'submitEnrollmentCmdButtonId').click </code></pre>
33,675,403
1
pandas python inserting part of a column to a column based on conditions pandas python <p>i have a large dataset that i want to work with , but here i am using a mock dataset:</p> <pre><code>data = {'Block': [1, 1, 1, 1, 1, 1,1,1,1], 'Concentration': [100, 100, 100, 33, 33, 33, 0,0,0], 'Name' : ['A', 'A', 'A', 'A', 'A'...
34,223,229
0
<p>Your current approach is very inefficient - it's O(N * M) <em>and</em> it creates a list on each iteration.</p> <p>Using a join would be more efficient - I would still use a <code>foreach</code> loop, but separate the querying part from the update part:</p> <pre><code>var pairsToUpdate = from original in vmlist joi...