pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
35,335,359 | 0 | <p>Check the updated fiddle here: <a href="http://jsfiddle.net/yrzxj3x2/3/" rel="nofollow">http://jsfiddle.net/yrzxj3x2/3/</a></p> <p>You have to tell the x axis to be of type 'timeseries' and defining the format doesn't hurt. This is the bit that enabled timeseries on your chart:</p> <pre><code>axis: { x: { type: 'ti... |
19,066,036 | 0 | <p>I personally would do <code>FILE *pipe = popen("md5sum filename");</code> [or something to that effect] - it is likely to be as fast as anything else, since 1GB of a file will take a little while to read, and the calculation is unlikely to be using much of your CPU time - most of the time will be waiting for the di... |
24,732,604 | 0 | <pre><code> function addBox() { var rect = new fabric.Rect({ width: 1000, height: 600, top: 300, left: 500, fill: ' ', draggable: false }); rect.lockMovementX = true; rect.lockMovementY = true; rect.lockUniScaling = true; rect.lockRotation = true; canvas.add(rect); } make your fill null and if you want to have a borde... |
10,216,635 | 0 | <p>Assuming that identifyArrayCollection is an ArrayCollection containing some Objects and speedsArrayCollection is an ArrayCollection defined as variable of the Object type that are contained in the identifyArrayCollection </p> <p>you should do:</p> <pre><code>for (var x:Number = 0; x < identifyArrayCollection.len... |
40,274,288 | 0 | how to remove existing image in jQuery.filer <p>I'm using a great plugin: <a href="https://github.com/CreativeDream/jquery.filer" rel="nofollow">https://github.com/CreativeDream/jquery.filer</a></p> <p>Only uploaded file can be Deleted, but added image file can Not be removed from server</p> <pre><code> files: [{ name:... |
18,106,098 | 0 | <p>You might find this particular episode helpful:</p> <p><a href="http://railscasts.com/episodes/88-dynamic-select-menus" rel="nofollow">http://railscasts.com/episodes/88-dynamic-select-menus</a></p> |
36,678,676 | 0 | How to draw a heat map of New York city community based on certain data using R? <p>For a project I am currently working on, I have to draw a heat map of New York city community based on certain input using R. I googled for this topic and found that in R, there is a package called "map" will allow you to draw a heat ma... |
40,814,370 | 0 | <p>You need to <strong><em>persisting the song data to the device</em></strong>.</p> <p>The Android framework offers several options and strategies for persistence:</p> <ul> <li><strong>Shared Preferences</strong> - Easily save basic data as key-value pairs in a private persisted dictionary.</li> <li><strong>Local Fil... |
14,773,407 | 0 | What does this piece of Perl code do in laymans terms? <p>Found this inside a loop. I've read up about splice but it just confused me more. I'm not familiar with Perl, but am trying to translate an algorithm to another language.</p> <pre><code>my $sill = splice(@list,int(rand(@list)),1); last unless ($sill); </code></p... |
36,197,056 | 0 | read data from excel file c# to mongodb database <p>My application needs to read data from an excel file and stocks it in MongoDB database. I am using .Net and c# for development.I am using Excel 2007 , MongoDB 3.2 and visual studio 2015 version. Any idea to access excel file, i need your help please.</p> <p>This is my... |
28,482,002 | 0 | DJANGO : How to create admin view with a model containt order_by? <p>My model is</p> <pre><code>Class Document(models.Model): Contrat = Contrat.objects.order_by('Contrat_text').distinct('Contrat_text') isContrat = models.BooleanField(('Contrat'), default=True) isCdC = models.BooleanField(('Cahier des Charges'), default... |
8,750,828 | 0 | drupal 6: using ahah for forms with markup types <pre><code>function MyModule_menu() { $items['blah'] = array( 'title' = 'blah', 'page callback' => 'blah_page', 'type' => MENU_NORMAL_ITEM ); $items['clickPath'] = array( 'title' => 'A title', 'page callback' => 'clickPath_page', 'type' => MENU_CALLBACK, )... |
30,926,439 | 0 | <p>You're looking for an outer join. This variant of your first query should do the trick:</p> <pre><code>SELECT DISTINCT ent.Entity_Id, ent.Profile_Pic_Url, ent.First_Name, ent.Last_Name, ent.Last_CheckIn_Place, comments.Content, friends.Category FROM checkin_comments AS comments JOIN entity AS ent ON comments.Entity... |
19,585,016 | 0 | <p>Ah. I missed the g thing.</p> <pre><code>:%s/\\/\//g </code></pre> <p>This command does the trick.</p> <p>I will wait for better answers from vim geeks. I am sure there must be a better way.</p> |
37,432,366 | 0 | <p>Because last step of unwrapping will fail? You will have <code>List(elements)</code>, and second version of <code>flatten</code> requires providing <code>List</code> in <code>List</code>.</p> |
11,582,641 | 0 | Jersey Servlet - Best way to set root uri content? <p>I am using JAX-RS to develop a RESTful api for an application. I'm deploying it in Tomcat. It's deployed at myhost:8080/api. Resources are at .../api/{resourceName}, etc.</p> <p>I'd like to have it so that people who visit /api see our html based api documentation. ... |
10,494,506 | 0 | <p>Well - it returns the query because you told it to do so!</p> <p>Look at your code: you have commented out the line that would actually <strong>execute</strong> the dynamic SQL (<code>EXEC sp_executsql .....</code>), and instead you're returning the query (<code>@QRY</code>) as a string:</p> <pre><code>--EXEC sp_ex... |
28,284,556 | 0 | <p>Change the JS code to only act on the first link not all sub links like below </p> <pre><code> $('.link>a').on("click", function(e){ e.preventDefault(); $(this).parent('.link').siblings().children('.dropdown').fadeOut(); $(this).siblings('.dropdown').fadeToggle(); }); $(document).mouseup(function (e) { var conta... |
25,216,718 | 0 | <p>Read carefully <a href="http://man7.org/linux/man-pages/man2/mknod.2.html" rel="nofollow">mknod(2)</a> man page (e.g. type <code>man 2 mknod</code> in a terminal).</p> <blockquote> <pre><code> The mode argument specifies both the permissions to use and the type of node to be created. It should be a combination (usi... |
37,073,107 | 0 | Confirm before leave directive <p>This directive uses SweetAlert just as replacement of confirm() js function. <a href="https://jsfiddle.net/alfredopacino/njccccsh/" rel="nofollow">https://jsfiddle.net/alfredopacino/njccccsh/</a></p> <pre><code>app.directive('confirmLeave',function(){ return { restrict:"A", controller:... |
36,198,961 | 0 | how do i bar plot a complete x axis and not just the last value <p>I am bar plotting probabilities as a function of successes in binomial trials. I am getting in my figure the expected Y values but only the last x value, which should span from 0 to 10. Here is my code:</p> <pre><code>close all; clc; p = 0.2; figure; fo... |
16,961,138 | 0 | Does Android support cross application file access <p>Does android support cross application file access i mean Lets say Application A created a file called "abcd.txt", can we access the file "abcd.txt" from another application B like how it can be possible in windows and not possible in iOS. please help.</p> |
7,907,889 | 0 | How to use random class in multi threaded application correct <p>I need to use random class to generate random numbers in a multi threaded application inside public static function. How can i achieve it. Currently the function below is working very well but it is not very fast when compared to random class. So i need t... |
256,214 | 0 | <p>SNMP has quite a significant CPU hit on the devices in question compared to telnet; I'd recommend telnet wherever possible. (As stated in a previous answer, the IOS XR XML API would be nice, but as far as I know IOS XR is only deployed on high-end carrier grade routers).</p> <p>In terms of existing configuration ma... |
21,505,513 | 0 | <p>Try this</p> <pre><code>class Item extends Eloquent { public function owner() { return $this->belongsTo('User','ownerID'); } } </code></pre> |
16,911,323 | 0 | <p>Here I'm only matching the numbers and period character. This code should return the numbers you're looking for. It uses your data string from your example.</p> <pre><code><? preg_match_all('!Gold\s+([0-9.]+)\s+([0-9.]+)!i',$data,$matches); //New York $ny_bid = $matches[1][0]; $ny_ask = $matches[2][0]; print("NY... |
2,691,977 | 0 | How do I Show/Hide a Grid Row and Grid Splitter based on a Toggle Button? <p>Currently I have a toggle button that is bound to a boolean property (DualLayout) in my code behind. When the boolean is set to True, then I want my second row in my grid (and grid splitter) to hide and have the first row take up the entire sp... |
8,567,908 | 0 | Lightweight Excel(xls/xlsx) php library needed <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/3930975/alternative-for-php-excel">Alternative for PHP_excel</a> </p> </blockquote> <p>A friend would like to use a Php Excel library to read/write files on formats xls and... |
14,971,223 | 0 | Could not connect to Postgresql on Mac OS X after Installation <p>So I installed Postgresql onto my Mac and whenever I run anything like <code>psql</code> or <code>createdb cool_database_name</code> I get the following error.</p> <pre><code>psql: could not connect to server: No such file or directory Is the server runn... |
29,308,309 | 0 | <p>There must be a nicer solution, but this is the one that quickly popped into mind:</p> <pre><code>set source = range(Rows(1).address & "," & Rows(emptyrow).address).SpecialCells(xlCellTypeVisible) </code></pre> <p>Disgusting, but works (if I understood what you needed correctly).</p> <p>Edit: found another ... |
27,133,555 | 0 | Patterns for dealing with variadic arguments in JavaScript <p>I usually do something like the following when dealing with variadic arguments in JavaScript:</p> <pre><code>var f = function() { var args = Array.prototype.slice.call(arguments, 0); // ... return something; }; </code></pre> <p>But what about doing instead:<... |
33,026,996 | 0 | IAB, onActivityResult() and the strange message "startActivity called from non-Activity context" <p>I am using OpenIAB to support in app purchasing in my app (OpenIAB uses google code to implement IAP for Google Play Store). The problem is that, sometimes, when i call launchPurchaseFlow(), the method onActivityResult()... |
39,670,300 | 0 | <p>There are two issues that need to be fixed.</p> <p>1) Coincidently in=5 is set only during the neg edge of clock. This is because clk cycle is #10 and the tb code changes "in" value every #5 .As the counter checks the value of in at posedge it misses the in = 5. The in time period needs to #10 or the TB can wait fo... |
11,476,031 | 0 | <p>There must be a problem with your version/install.</p> <p>Graphviz 2.28 on a windows system produces this output (11605x635px !):</p> <p><img src="https://i.stack.imgur.com/3XS0n.png" alt="graphviz output"></p> <p>Try <code>dot -version</code> to see version number and information about installed plugins & conf... |
17,617,438 | 0 | <p>Here's one more article doing a detailed comparison between Wowza and AMS</p> <p><a href="http://www.webnethosting.net/wowza-media-servers-vs-adobe-flash-media-servers/" rel="nofollow">http://www.webnethosting.net/wowza-media-servers-vs-adobe-flash-media-servers/</a></p> |
9,471,982 | 0 | From which version of Android api can I develop a scrollable app widget? <p>I like the scrollable Calendar App Widget (see picture), and I want to develop a similar scrollable widget for my application. But I'm not sure from which version of Android api (or platform) can I develop a scrollable app widget? Any ideas? Th... |
13,313,079 | 0 | Cocoa - Pasing JSON crash on null <p>What is the best way to prevent my app from crash?</p> <p>I'm using a JSON service that sometimes get NULL fields. What is the best way to prevent it?</p> <p>Right now, I've to do this on every field:</p> <pre><code>if(![[[[Dictionary objectForKey:@"option"] objectForKey:@"option"] ... |
5,883,839 | 0 | <p>This will search all the div's on the page for the text contained in <code>platformString</code> and wrap them in tags.</p> <pre><code>var platformString = "replaceMe"; $('div').html(function() { return $(this).html().replace(new RegExp(platformString, "ig"), '<strong>$&</strong>')); }); </code></pr... |
30,342,605 | 0 | <p>This can be done using formulas by a two step approach:</p> <p>a) split the number (assuming it is in in cell <strong>A1</strong>) into pieces <code>=CONCATENATE(LEFT(A1;4);"-";MID(A1;5;2);"-";RIGHT(A1;2))</code> This gives you your date as a STRING in a cell.</p> <p>b) Combine this with VALUE, like <code>=VALUE(CO... |
33,120,905 | 0 | Alfresco lucene query with PARENT search all children recursively? <p>I'm doing a lucene search using PARENT. But returns me 0 results, and it's not ok. My query is like this:</p> <pre><code>TYPE:"{mymodel}exp" AND PARENT:"workspace://SpacesStore/30da316f-9d2a-4e37-a28b-89d86bff6582" AND =@myexp\:num_exp:"Exp 433" </co... |
1,530,872 | 0 | Jquery UI Datepicker <p>I'd like to change the Default <code>altFormat</code>, but I can't seem to get it to work. </p> <pre><code>$("#myFav").datepicker({ dateFormat: 'yy-mm-dd' }); $("#myFav").datepicker('option', 'dateFormat', 'yy-mm-dd'); </code></pre> <p>I thought altFormat would work just the same? </p> |
40,809,997 | 0 | <p>You can fix this by creating local variables:</p> <pre><code>@IBAction func playButtonPressed(_ sender: Any) { var index = 0.0 var i = 0 var j = 0 while i < sites.count { while j < sites[i].count { let day = i let site = j DispatchQueue.main.asyncAfter(deadline: .now() + 1.0 * index) { self.plot(day: day, sit... |
33,461,644 | 0 | <p>I think I will go in a different direction entirely by <a href="https://github.com/MobileChromeApps/mobile-chrome-apps" rel="nofollow">using the cca (Chrome Cordova App) toolchain to develop Mobile Chrome Apps</a>.</p> <p><a href="https://github.com/GoogleChrome/chrome-app-samples#mobile-support" rel="nofollow">Her... |
3,320,065 | 0 | <p>Lesson one in Joel's test should be: <em>Do you regularly critically revisit the software team quality tests?</em></p> <p>While I like Joel and the list is a good list, it's only a starting point and without proper knowledge of how to apply any part that that test tells you to apply, you won't get far by just intro... |
24,668,164 | 0 | <p>Your short-hand property of background overrides the background, so you need to do like this:</p> <pre><code>body{ color:red; background: url("image.jpg") no-repeat;//now it works which doesn't support rgba background: rgba(255,255,255,.85); } </code></pre> |
18,934,896 | 0 | <p><code>Pattern.matches</code> would try to match the pattern exactly..</p> <p>So it would return <code>true</code> only if you have a <strong>single</strong> non space character as input.</p> <p>Its like using <code>\A[^ ]\z</code></p> <p>where <code>\A</code> is the beginning of input and <code>\z</code> is end of ... |
22,177,393 | 0 | <p>The issue was in the dependencies of the gradle.build file. </p> <p>Changed the following lines in gradle.build from:</p> <pre><code>dependencies { groovy 'org.codehaus.groovy:groovy:2.2.2' ... </code></pre> <p>to:</p> <pre><code>dependencies { groovy 'org.codehaus.groovy:groovy-all:2.2.2' ... </code></pre> <p>This... |
26,997,250 | 0 | <p>have you thought of using method overloads instead? generally spoken i would try to avoid switch case blocks, with view exceptions, since they are often a smell that inheritance, overloads, etc. could solve the problem in a nicer way.</p> <p>BR</p> |
18,038,605 | 0 | <p>The purest way I can think of to do this is with IPC. Python has very good support for IPC between two processes when one process spawns another, but not in your scenario. There are python modules for ipc such as <code>sysv_ipc</code> and <code>posix_ipc</code>. But if you are going to have your main application bu... |
29,615,692 | 0 | How to know what routes go on between two points? <p>Ok guys, i'm dealing with this situation in my Android App. I have:</p> <ul> <li>Two points (origin and destination).</li> <li>A set of routes or paths in which can pass a car.</li> </ul> <p>So.. my question is: how can I know what of these routes is the most nearest... |
34,618,953 | 0 | <p>Please make sure Signup is an Activity declared in the Android Manifest. As a convention, append Activity at the end of the class name to indicate that it is indeed an Activity, for instance, SignUpActivity.</p> |
39,764,388 | 0 | <p>If you are using wordpress then you should use the session_start(); in wp-config.php file so please first put in you wp-config.php at top and then check.</p> |
13,267,145 | 0 | What is the best way of extending spring application context? <p>I need to extend spring applicatioContext xml file with new beans definitions and then add references to them to list, which is a property of one bean: Basic applicationContext xml file: </p> <pre><code><bean id="myBean" class="com.example.MyBean"> ... |
31,127,528 | 0 | <p>Big thanks to Reto Koradi, if anyone wants to leave an answer I will mark it as correct. </p> <p>The casting was incorrect. Needs to be in LITTLE_ENDIAN order:</p> <pre><code>ByteBuffer transformedBuffer = ((ByteBuffer) mappedBuffer); transformedBuffer.order(ByteOrder.LITTLE_ENDIAN); Log.d(TAG, String.format("pre-r... |
34,597,454 | 0 | <p>I am not sure what you want to accomplish. If you want to pre-compute a (non-changing) value and distribute it to all task managers (I assume you need access those value in some operators), you can simple give those value via constructor parameters to your UDFs or use Flink's broadcast variables: <a href="https://c... |
5,645,052 | 0 | android SimpleCursorAdapter no item msg <p>I have used to following code to display the favorite item listing. It has a deletion functionality through context menu.</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { ......................... ......................... wordDataHelper = new WordDat... |
14,216,554 | 0 | <p>The problem is that you are binding your event handler to the element before it exists because it is still being ajax'ed.</p> <p>Try including a callback function in <code>Guardian_news</code> and executing it once the ajax is complete - then bind your events within that callback.</p> <p>EDIT: something like this:<... |
31,699,954 | 0 | Search for string but with minus substring <p>I want to search for strings from a list but I do not want that value returned if the string contains the substring "banner". How would I do this?</p> <p>Thus far this is my formula for finding the string </p> <pre><code>=INDIRECT("A"&(MATCH("*"&RIGHT(D11,10)&"*... |
31,671,175 | 0 | KSOAP2 complex request property not being seen <p>I'm having a problem sending a complex SOAP request to a third-party company server (server can have no changes) from an android device. I'm using KSOAP2 library and one of the properties is missing (server is giving an error which occurs when <code>klausimai</code> is ... |
21,548,428 | 0 | Getting Server Error while calling Servlet from Java Application <p>Here is my Java Class by which I am calling simple servlet and passing the data, I am<br> using URL and HttpURlConnection class.What should be path of url for the servlet</p> <pre><code>public class TestJava { public static void main(String[] args) { t... |
38,761,803 | 0 | <p>No, currently that's not possible since you can either use the default mongo data engine <em>or</em> switch it with the Eve-Sqlalchemy engine.</p> |
6,117,774 | 0 | <p>MSDN has a whole section on the Media Player SDK - and <a href="http://msdn.microsoft.com/en-us/library/dd562289%28v=VS.85%29.aspx" rel="nofollow">this page</a> in particular should be of considerable use to you, I hope.</p> |
15,495,487 | 0 | <p>Just looking at it, I'm pretty sure your code works. Well I know this does.</p> <pre><code><img id="pic" src="https://www.google.com.au/images/srpr/logo4w.png"/> <input type="button" value ="Yahoo" onclick="change('http://l.yimg.com/ao/i/mp/properties/frontpage/eclipse/img/y7-logo_default.v1.png')" /> &... |
39,740,765 | 0 | <p><code>tostring</code> is being passed an address, and so gives you the string representation of that address. You need <code>ffi.string</code> instead.</p> <pre><code>local str = ffi.string(ffi.C.getString(5)) </code></pre> <p>Now <code>str</code> is a Lua string containing what was returned by your Pascal code.</p... |
22,302,785 | 0 | <p>use this code:</p> <pre><code> public class KeyboardInput extends Thread{ Scanner sc= new Scanner(System.in); @Override public void run() { while(true) { sc.hasNext(); } } } </code></pre> <p>Then just call this when you want to start the input:</p> <pre><code>Thread t1= new Thread(new KeyboardInput); t1.start(); </... |
30,330,509 | 0 | Change color of links in NUnit Test Runner in Resharper <p>I prefer to use the dark theme in Visual Studio, but one source of annoyance is the links in Resharper's nUnit Test Runner. I've looked everywhere, but I can't seem to find the option to change to get them to display properly.</p> <p>Specifically, this the Unit... |
33,967,306 | 0 | <p>Do you mean you want to loop through them?</p> <p>If that's the case I'd probably use a multidimentional array (or arraylist)..</p> <pre><code>JButton[][] bttns = new JButton[5][16](); for(int i = 0; i < bttns.length; i++) { for(int i2 = 0; i2 < bttns[0].length; i2++) { bttns[i][i2].setText( String.valueOf(sh... |
11,564,053 | 0 | C++ Referencing an Object from a global static function <p>I have a globally declared static function that needs to reference an object, but when I do so, I get an "undeclared identifier" error.</p> <p>Here is a sample of my code</p> <pre><code>#pragma once #include "stdafx.h" #include <vector> #include "Trigger.... |
8,824,737 | 0 | <p>Check <a href="http://stackoverflow.com/questions/307004/changing-the-cursor-in-wpf-sometimes-works-sometimes-doesnt">this question</a>, especially the answer with the <code>OverrideCursor</code> class.</p> |
3,013,917 | 0 | <p>With Following guide, you can access iPod media</p> <p><a href="http://developer.apple.com/iphone/library/documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html" rel="nofollow noreferrer">http://developer.apple.com/iphone/library/documentation/Audio/Conceptual/iPodLibraryAccess_Guide/... |
1,069,662 | 0 | <p>I figured out a workaround... Since I am not making any changes to the DocumentLibrary list schema, i can just reference that list and only need a ListInstance element that references the DocumentLibrary feature and list TemplateType. So my Elements will now look like this:</p> <pre><code> <ListInstance FeatureI... |
35,650,909 | 0 | <p>There is no option to directly assign php variables to javascript. To do this you need to assign assign it to html elements like,</p> <pre><code><input type="hidden" id ="amazon" value="<?php echo $is_amazon; ?>"> </code></pre> <p>We can get the value in jquery from this html element by using this code,... |
40,046,142 | 0 | <p>You can create your own CSS file. Then your have imported the CSS file on client side.</p> <p>You need to write following CSS in that file.</p> <pre><code>.wrapper { position: initial; //You can use !important in case it doesn't overwrite the CSS. } </code></pre> <blockquote> <p>Note: Pleae make sure your file load... |
34,995,926 | 0 | How to validate input array with a same name in laravel controller <p>I have a problem when a i try to insert record into table like this .</p> <pre><code>$data = array(); foreach($input['user_id'] as $key => $user_id) { $data[$key]['user_id'] = $user_id; } foreach($input['start_on'] as $key => $start_on) { $data... |
24,498,380 | 0 | duplicate folder & contents, rename folder, pre-pend folder name to contents <p>Im hoping someone could help in building a small applescript. So far i havent found a solution that does exactly what i need.</p> <p>I have single folder with multiple files inside it. What i wish to do is to Duplicate that folder(with its ... |
27,849,224 | 0 | <p>No - you will need to process the file "manually". Read it into a string, go looking for the first non-blank, then go looking for the next blank, then use internal io to read the relevant bits, etc.</p> <p>As you have found, list directed io (using <code>*</code> as the format specifier) has some surprising feature... |
32,681,207 | 0 | Redirect .aspx URL's to non .aspx URL's - using htaccess <p>I recently moved my website from a ASP/IIS server to a LINUX/APACHE:</p> <p>Most of my new URL's looks the same, but without .aspx extension.</p> <p>OLD: <code>http://example.com/yankees-news.aspx</code><br> NEW: <code>http://example.com/yankees-news</code></p... |
29,098,447 | 0 | <p>The solution is to use <code>Stream.collect</code>. To create a Collector using its builder pattern is already given as solution. The alternative is the other overloaded <code>collect</code> being a tiny bit more primitive.</p> <pre><code> List<String> strings = Arrays.asList("a", "b", null, "c", null, "d", "... |
23,036,069 | 0 | <p>Just set this style:</p> <pre><code>.thumbnail:hover img { border: solid 5px green; margin: -5px; } </code></pre> <p>The margin is to avoid the "changing position" effect</p> <p><a href="http://jsfiddle.net/hbgqh/" rel="nofollow">demo</a></p> |
11,273,343 | 0 | <p>To decode the content using PHP, use this : </p> <pre> $decoded_string = urldecode('put encoded string here'); </pre> |
8,230,438 | 0 | download file from absolute uri to stream to SaveFileDialog <p>I've gotten as far as putting a file into a stream from a url. However puttin savefiledialog inside the event OpenReadCompleted gives an exception because the savefiledialog needs to be fired from an user iniated event. Putting the savefiledialog NOT inside... |
38,128,598 | 0 | Strange SIGPIPE in loop <p>After dealing with a very strange error in a C++ program I was writing, I decided to write the following test code, confirming my suspicion. In the original program, calling <code>send()</code> and <code>this_thread::sleep_for()</code> (with any amount of time) in a loop 16 times caused send ... |
40,682,585 | 0 | <p>I'd avoid it. My biggest issue with it is that sometimes you're returning a list, and sometimes you're returning an object. I'd make it work on a list <em>or</em> an object, and then have the user deal with either wrapping the object, of calling the function in a list comprehension.<br> If you really do need to hav... |
38,582,304 | 0 | How to Rotate an element Counterclockwise <p>I know we can rotate an element anticlockwise by using negative sign</p> <p><code>transform : rotate(-20deg);</code></p> <p>But this is only for x-axis. I want to rotate element along the y-axis. i tried </p> <p><code>transform : rotateY(-20deg);</code></p> <p>this doesn't w... |
34,501,567 | 0 | Proxy a websocket to hide the IP <p>I have a sub domain routed through cloudflare. They don't cover websockets unless it enterprise or maybe business depending on traffic.</p> <p>So now when users visit the external site, it connects to my sub domain via a websocket with the url of my site being passed in their url.</p... |
9,090,832 | 0 | <p>Add some class("children") to the <code>ul</code> container which contain all the child <code>li</code> and try this code.</p> <pre><code>$('#one').live('click', function(){ $('ul.children li:not(.uno)').slideUp(); $('ul.children li.uno').slideToggle(); return false; }); $('#two').live('click', function(){ $('ul.ch... |
38,910,227 | 1 | How to prevent lxml from adding a default doctype <p>lxml seems to add a default doctype when one is missing in the html document.</p> <p>See this demo code:</p> <pre><code>import lxml.etree import lxml.html def beautify(html): parser = lxml.etree.HTMLParser( strip_cdata=True, remove_blank_text=True ) d = lxml.html.fro... |
1,213,448 | 1 | Is it possible to utilize a python module that isnt installed into the python directories in linux? <p>I have a python application that depends on the uuid module, but on the server where I need to run it, uuid is not installed. I do not have root on the server so I cannot place the uuid .pys in the /usr/lib/python2.4/... |
21,554,839 | 0 | The menu is not displayed in mac os 10.9.1 <p>In my application used "Application is agent(UIElement)" = YES.</p> <p>I use it to hide the second process. But first process need show.</p> <p>For show process I used code:</p> <pre><code>// display dock icon TransformProcessType(&psn, kProcessTransformToForegroundAppl... |
20,523,365 | 0 | <p>The problem is that the "enddate" from your database isn't a number, it's a string.</p> <p>You should convert it to numbers:</p> <pre><code>$now = time(); $sql="SELECT enddate FROM campaigns WHERE id=".$data['camp']; $query = mysqli_query($db, $sql); while($result = mysqli_fetch_assoc($query)){ $db = strtotime($res... |
19,671,043 | 0 | <p>I've got exactly the same question. The problem as I see it is that the view login_form is designed to cater for everything (forgotten passwords, captchas, etc) in one. What I'm trying to create is a system where there is the quick login, and then if needed, another view to deal with registration, forgotten passwor... |
15,383,017 | 0 | <pre><code>var products = (from p in db.GetAll() select new ProductViewModel{ ID = p.Id, .... }); </code></pre> |
27,011,654 | 0 | Android ArrayList: check an element exists of another ArrayList <p>I have two <code>ArrayList</code>.</p> <pre><code>private ArrayList<Friend> friendsList = new ArrayList<Friend>(); private ArrayList<Friend> myFriendsList = new ArrayList<Friend>(); </code></pre> <p>First one contains all <code>F... |
6,942,445 | 0 | <p>I have had mixed results using TemplateBinding on custom dependency properties. Because of this, I have used RelativeSource TemplatedParent which seems to work in every situation.</p> <pre><code><EasingColorKeyFrame KeyTime="0:0:.5" Value="{Binding HeaderColor, RelativeSource={RelativeSource TemplatedParent}}" /... |
16,720,560 | 0 | <p>If you want to check if a variable (say v) has been defined and is not null:</p> <pre><code>if (typeof v !== 'undefined' && v !== null) { // Do some operation } </code></pre> <p>If you want to check for all falsy values such as: <code>undefined</code>, <code>null</code>, <code>''</code>, <code>0</code>, <co... |
32,275,172 | 0 | <p>Use the <code>content</code> property in <code>::after</code> or <code>::before</code> pseudo-element to add additional text.</p> <p>You can also position it elsewhere with <code>absolute</code> and <code>top</code>/<code>bottom</code>,<code>left</code>/<code>right</code> properties.</p> <pre><code>#site-title::aft... |
36,328,466 | 0 | <p>After have run the command: npm install orientjs</p> <p>Save this code in a file.js:</p> <pre><code>var OrientDB = require('orientjs'); var server = OrientDB({ host: 'localhost', port: 2424, username: 'root', password: 'root' }); var db = server.use({ name: 'GratefulDeadConcerts', username: 'root', password: 'root'... |
4,691,794 | 0 | <p>You also can set NavigateUrl property in code-behind file, in Page_Load event handler, for instance. It will work.</p> <p>In the code-behind class:</p> <pre><code> protected void Page_Load(object sender, EventArgs e) { HyperLink2.NavigateUrl = "~/Default.aspx?customer=&CompanyName=" + Server.UrlEncode("abc#"); ... |
32,920,954 | 0 | <p>The simplest solution is to use</p> <pre><code>new Loadable(); </code></pre> <p>if the class is know at compile time and you expect it to be available at runtime. Note: this will throw a <code>NoClassDefError</code> at runtime if it is not available.</p> <p>If you are not sure it will be available a runtime, you mi... |
24,370,558 | 0 | <p>You want to inspect the <a href="http://msdn.microsoft.com/en-us/library/system.environment.commandline%28v=vs.110%29.aspx" rel="nofollow">Environment.CommandLine</a> Property</p> <blockquote> <p>This property provides access to the program name and any arguments specified on the command line when the current proce... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.