text stringlengths 74 309k |
|---|
{"title":"Gravatar: How do I know if a user has a real picture","tags":["c#","gravatar"],"question_text":"I have gotten the gravatar service working on my site. But I would like to know if the user has uploaded their picture or not. Is there a way to know this?","answer_text":"When constructing the URL, use the paramet... |
{"title":"Delayed Job not processed in rspec","tags":["ruby-on-rails","rspec","delayed-job"],"question_text":"I am trying to run rspecs for a custom delayed job (GetPage::GetPageJob), but I have a problem.\nWhen I run them, the jobs are well enqueued (that is to say, well inserted in the delayed_jobs table), but they a... |
{"title":"CSS3 Flexbox: display: box vs. flexbox vs. flex","tags":["css","css3","flexbox"],"question_text":"I became yesterday a website in the school which use the css3 flexbox statement. I never used that before. So i google it a bit. And found a lot of different styles of the flexbox statements.\nSome guys write\n`d... |
{"title":"Install tkinter for Python","tags":["python","linux","tkinter","install"],"question_text":"I am trying to import Tkinter. However, I get an error stating that Tkinter has not been installed:\nImportError: No module named _tkinter, please install the python-tk package\nI could probably install it using synapti... |
{"title":"servicestack REST API and CORS","tags":["c#","api","rest","servicestack","cors"],"question_text":"Anyone know if the servicestack framework can be used to create CORS REST services?\nI've been banging my haed against the WCF REST stuff for days now - utterly useless.\nThanks","answer_text":"Using the CorsFeat... |
{"title":"BigDecimal multiply by zero","tags":["java","bigdecimal","numerical-analysis","rounding-error"],"question_text":"I am performing a simple multiplication with BigDecimal and I have found some strange behaviour when multiplying by zero (multiplying by zero is correct in this use-case).\nBasic maths tells me tha... |
{"title":"Find the element before and after a specific element","tags":["jquery","traversal"],"question_text":"I have a list with links I use with tabs. It looks like this:\n`<ul>\n <li><a href=\"#\">First tab<\/a><\/li>\n <li><a href=\"#\">Second tab<\/a><\/li>\n <li class=\"active\"><a href=\"#\">Active tab<\/a><\/li... |
{"title":"Is there a way to quickly capitalize the variable name in Eclipse","tags":["eclipse"],"question_text":"Any refactoring tool like this?","answer_text":"Windows\nAfter you press\nAlt\n+\nShift\n+\nR\nas mentioned by kostja, you can select the text you want to change, then\nCtrl\n+\nShift\n+\nY\nfor lowercase, o... |
{"title":"Catch an exception thrown by an async method","tags":["c#","asynchronous","exception-handling","async-await","task-parallel-library"],"question_text":"Using the async ctp from Microsoft for .NET,\nis it possible to catch an exception thrown by an async method in the calling method?\n`public async void Foo()\n... |
{"title":"UITableViewHeaderFooterView: Unable to change background color","tags":["iphone","ios","xcode","uitableview"],"question_text":"I'm trying to change the background color of UITableViewHeaderFooterView. Although the view is appearing, the background color remains the default color. I'm getting a log from xcode ... |
{"title":"Why doesn't [01-12] range work as expected?","tags":["regex"],"question_text":"I'm trying to use the range pattern\n`[01-12]`\nin regex to match two digit mm, but this doesn't work as expected.","answer_text":"You seem to have misunderstood how character classes definition works in regex.\nTo match any of the... |
{"title":"How to convert a negative number to positive?","tags":["python","numbers","absolute-value"],"question_text":"How can I convert a negative number to positive in Python? (And keep a positive one.)","answer_text":"`>>> n = -42\n>>> -n # if you know n is negative\n42\n>>> abs(n) # for any n\n42`\nDon't forget to ... |
{"title":"Why is Ruby unable to verify an SSL certificate?","tags":["ruby","api","openssl","certificate"],"question_text":"This is my first time trying to use the XMLRPC::Client library to interact with a remote API and I keep receiving this error:\n`warning: peer certificate won't be verified in this SSL session`\nSea... |
{"title":"How to launch GUI Emacs from command line in OSX?","tags":["osx","emacs","command-line"],"question_text":"How do I launch GUI Emacs from the command line in OSX?\nI have downloaded and installed Emacs from\nhttp:\/\/emacsformacosx.com\/\n.\nI'll accept an answer fulfilling all of the following criteria:\nThe ... |
{"title":"How to Solve java.lang.NoClassDefFoundError?","tags":["java","exception","packages","noclassdeffounderror"],"question_text":"I'm pretty new to Java, and I've just started learning about packages in Java. I've tried both the example in Oracle's\nJava Tutorials\n. They both compile fine, but at run-time, both c... |
{"title":"Can I comment out a line on a .git\/config file?","tags":["git","proxy","config"],"question_text":"I have a http.proxy line on my repository config file that I would like to 'turn on and off' easily without having to remember and type again the whole configuration every time I'm behind or free from this proxi... |
{"title":"Issue with window.close and chrome","tags":["javascript","google-chrome","chrome-ios"],"question_text":"Im trying to close a child window with javascript and in firefox everything works fine but in chrome the window doesnt close\nhere is what im using\n`$(document).ready(function() {\n if (window.opener && !w... |
{"title":"mysql query order by multiple items","tags":["mysql","sql-order-by"],"question_text":"is is possible to order by multiple rows?\nI want my users to be sorted by last_activity, but at the same time, i want the users with pictures to appear before the ones without\nSomething like this:\n`SELECT some_cols\nFROM ... |
{"title":"Can I set LARGEADDRESSAWARE from within Visual Studio?","tags":["c#",".net","visual-studio","msbuild"],"question_text":"I have a .net assembly that needs to be 32-Bit and needs to be \/LARGEADDRESSAWARE.\nI know how to do this with EditBin, but I wonder if there is a built-in way in Visual Studio 2010? Or alt... |
{"title":"How do I auto-reload a Chrome extension I'm developing?","tags":["javascript","google-chrome","google-chrome-extension"],"question_text":"I'd like for my chrome extension to reload every time I save a file in the extension folder, without having to explicitly click \"reload\" in chrome:\/\/extensions\/. Is th... |
{"title":"c# compare two generic values","tags":["c#","generics"],"question_text":"Possible Duplicate:\nCan\u00e2\u0080\u0099t operator == be applied to generic types in C#?\nI've coded something like this:\n`public bool IsDataChanged()\n{ \n T value1 = GetValue2;\n T value2 = GetValue1();\n return (valueInDB != valueF... |
{"title":"How to set a Fragment tag by code?","tags":["android","android-3.0-honeycomb","android-fragments"],"question_text":"I haven't found something like\n`setTag(String tagName)`\nmethod in the\n`Fragment`\nclass. The only way to set a\n`Fragment`\ntag that I have found is by doing a\n`FragmentTransaction`\nand pas... |
{"title":"What's the best way to develop a sideswipe menu like the one in Facebook's new iOS app?","tags":["objective-c","ios","cocoa-touch"],"question_text":"It appears that side-swipe menus are becoming a more common interface element as more information gets crammed into each iPhone app. Facebook has included it in ... |
{"title":"Can I declare \/ use some variable in LINQ? Or can I write following LINQ clearer?","tags":["c#","linq"],"question_text":"Can I declare \/ use some variable in\nLINQ\n?\nFor example, can I write following LINQ clearer?\n`var q = from PropertyDescriptor t in TypeDescriptor.GetProperties(instance)\n where (t.Co... |
{"title":"Combined area of overlapping circles","tags":["algorithm","geometry","area"],"question_text":"I recently came across a problem where I had four circles (midpoints and radius) and had to calculate the area of the union of these circles.\nExample image:\nFor two circles it's quite easy,\nI can just calculate th... |
{"title":"Get rid of Vim's highlight after searching text","tags":["vim"],"question_text":"In VIM, after finding text with \"\/\" command, that text remains highlighted.\nWhat is the command to remove that? I don't want to remove highlighting capability at all, but don't want to have all those bright text spots once I'... |
{"title":"Android: Use a SWITCH statement with setOnClickListener\/onClick for more than 1 button?","tags":["android","button","listener"],"question_text":"Let's say I have a few buttons in a LinearLayout, 2 of them are:\n`mycards_button = ((Button)this.findViewById(R.id.Button_MyCards));\nexit_button = ((Button)this.f... |
{"title":"Allow all remote connections, MySQL","tags":["mysql"],"question_text":"I had been using SQL Server and am now using MySQL for a project. With SQL Server, our developers can connect to the remote database on their local machines if they know the host, username, password. With MySQL, though, to give a developer... |
{"title":"Why are methods in Ruby documentation preceded by a hash sign?","tags":["ruby","documentation"],"question_text":"This is something that has been bugging me for a while. When I see any Ruby method printed in text, it usually appears as:\n`Class#method`\nor\n`#method`\nNow, I would use:\n`Class.method`\nWhy are... |
{"title":"VERR_VMX_MSR_VMXON_DISABLED when starting an image from Oracle virtual box","tags":["virtualbox"],"question_text":"I'm getting this error while loading a Puppet image from a Oracle virtual box. How can I fix it?\n`Failed to open a session for the virtual machine learn-puppet-centos-6.4-pe-3.1.0.\nVT-x is disa... |
{"title":"When must we use NVARCHAR\/NCHAR instead of VARCHAR\/CHAR in SQL Server?","tags":["sql-server","unicode","collation","nvarchar"],"question_text":"Is there a rule when we must use the Unicode types?\nI have seen that most of the European languages (German, Italian, English, ...) are fine in the same database i... |
{"title":"Git gist - Markdown does not work","tags":["git","markdown","gist"],"question_text":"I am not able to get Markdown work in a gist. My post is available\nhere\n.\nNotice that the same Markdown works when I add a comment.\nWhat did I miss?","answer_text":"Github uses file extension to recognize file type. In or... |
{"title":"How to compare 2 files fast using .NET?","tags":["c#","file","compare","checksum"],"question_text":"Typical approaches\nrecommend reading the binary via FileStream and comparing it byte-by-byte.\nWould a checksum comparison such as CRC be faster?\nAre there any .NET libraries that can generate a checksum for ... |
{"title":"HorizontalScrollView inside SwipeRefreshLayout","tags":["android","horizontalscrollview","swiperefreshlayout"],"question_text":"I implemented the new\n`SwipeRefreshLayout`\ncomponent in my application and it works well with any vertical views, like\n`ListView`\n,\n`GridView`\nand\n`ScrollView`\n.\nIt behaves ... |
{"title":"To pass a parameter to event listener in AS3 the simple way... does it exist?","tags":["actionscript-3","flash","events","parameters","addeventlistener"],"question_text":"Expected \/ pseudo example:\n`stage.addEventListener(MouseEvent.CLICK, onClick.someWayToPassParameters(true, 123, 4.56, \"string\"));\nfunc... |
{"title":"Install eclipse JDT on top of CDT","tags":["eclipse","cdt","eclipse-jdt"],"question_text":"I have the eclipse CDT installed, and I would like to install Java development functionality (JDT) on top of my CDT installation. I've been Googling from an hour but I can't figure out how to do this. Any ideas? What pl... |
{"title":"xcode 5.1: libCordova.a architecture problems","tags":["ios","xcode","cordova","xcode5.1"],"question_text":"Yesterday (3\/10\/14) when iOS 7.1 was released I also upgraded to Xcode 5.1 and found that my PhoneGap\/Cordova project would no longer compile to my iPhone 5s. I also upgraded Cordova to the most rece... |
{"title":"Custom event listener on Android app","tags":["android","events","event-handling","listener","addeventlistener"],"question_text":"I need to set up a simple event listener to refresh a\n`ListView`\nonce in a while. The problem is I don't know how could I generate an event.\nI know that for events like key or b... |
{"title":"How to get certain commit from GitHub project","tags":["git","github"],"question_text":"I need to download the Facebook API from\nGitHub\n. Normally, I just click on the 'Downloads\" tab to download the latest source code. In this case, I need an older commit:\n91f256424531030a454548693c3a6ca49ca3f35a\n, but ... |
{"title":"what should be the values of GOPATH and GOROOT?","tags":["go"],"question_text":"I'm trying to install doozer like this\n`$ goinstall github.com\/ha\/doozer`\nI get these errors.\n`goinstall: os: go\/build: package could not be found locally\ngoinstall: fmt: go\/build: package could not be found locally\ngoins... |
{"title":"How to get a Char from an ASCII Character Code in c#","tags":["c#","character-encoding","ascii","escaping"],"question_text":"Im trying to parse a file in c# that has field (string) arrays separated by ascii character codes 0, 1 and 2 (in Visual Basic 6 you can generate these by using Chr(0) or Chr(1) etc.)\nI... |
{"title":"Debugging doesn't start","tags":["c#","visual-studio-2010","debugging","build",".net-2.0"],"question_text":"When I hit F5 (debugging mode) nothing happens. Building works correctly, exe file I can launch properly, but can't start debug. Why?","answer_text":"I had the same problem and all the tricks didnt do i... |
{"title":"Git on Windows: What do the crlf settings mean?","tags":["windows","linux","git","newline","core.autocrlf"],"question_text":"I don't understand the complexities related to CrLf settings in git:\n`core.autocrlf`\n,\n`core.safecrlf`\nI'm developing a cross-platform project in a team and would like both Windows ... |
{"title":"How to access the DOM element that correlates to a D3 SVG object?","tags":["dom","svg","visualization","data-visualization","d3.js"],"question_text":"I'm trying to learn D3 by experimenting with one of their\nbasic bubblecharts\n. First task: figure out how to drag an bubble and have it become the topmost obj... |
{"title":"Numpy array, how to select indices satisfying multiple conditions?","tags":["python","numpy"],"question_text":"Suppose I have a numpy array\n`x = [5, 2, 3, 1, 4, 5]`\n,\n`y = ['f', 'o', 'o', 'b', 'a', 'r']`\n. I want to select the elements in\n`y`\ncorresponding to elements in\n`x`\nthat are greater than 1 an... |
{"title":"Given an integer, how do I find the next largest power of two using bit-twiddling?","tags":["language-agnostic","bit-manipulation"],"question_text":"If I have a integer number\n`n`\n, how can I find the next number\n`k > n`\nsuch that\n`k = 2^i`\n, with some\n`i`\nelement of\n`n`\nby bitwise shifting or logic... |
{"title":"Detect that the Internet connection is offline?","tags":["javascript","ajax","offline","connectivity"],"question_text":"How to detect that the Internet connection is offline in JavaScript?","answer_text":"You can determine that the connection is lost by making\nfailed XHR requests\n.\nThe standard approach is... |
{"title":"Android GCM: same sender id for more application","tags":["android","google-cloud-messaging"],"question_text":"Is it possible to use same sender id for more applications? Now I have 18 application (different language and some functionality) which use same backend. Now I am implementing push notifications with... |
{"title":"Java AES and using my own Key","tags":["java","key","aes"],"question_text":"I want to encrypt a string using AES with my own key. But I'm having trouble with the bit length of the key. Can you review my code and see what I need to fix\/change.\n`public static void main(String[] args) throws Exception {\n Stri... |
{"title":"Why can't a \"Class\" variable be passed to instanceof?","tags":["java","class","instanceof"],"question_text":"could anyone tell me why this code won't compile?\n`public boolean isOf(Class clazz, Object obj){\n if(obj instanceof clazz){\n return true;\n }else{\n return false;\n }\n }`\nWhy I can't pass a clas... |
{"title":"What's the difference between span and array_view in the gsl library?","tags":["c++","c++14","array-view","cpp-core-guidelines"],"question_text":"In several recent conference presentation I've heard Bjarne Stroustrup and others mention new coding guidelines for C++ and some types supporting them.\nSpecificall... |
{"title":"Can you attach Amazon EBS to multiple instances?","tags":["linux","file","amazon-ec2","amazon-web-services"],"question_text":"We currently use multiple webservers accessing one mysql server and fileserver. Looking at moving to the cloud, can I use this same setup and attach the EBS to multiple machine instanc... |
{"title":"Google Map event bounds_changed triggered multiple times when dragging","tags":["javascript","google-maps","javascript-events"],"question_text":"I have a google map with markers. I want my markers to be refreshed when the map is moved\/zoomed...\nGoogle recommend to use the event\n`bounds_changed`\nfor that, ... |
{"title":"Regular Expressions and GWT","tags":["java","regex","gwt"],"question_text":"My questions is: Is there a good solution to use regular expression in GWT?\nI'm not satisfied with the use of String.split(regex) for example. GWT translates the Code to JS and then uses the regex as a JS regex. But I cannot use some... |
{"title":"CSS selector based on element text?","tags":["css","css-selectors"],"question_text":"Possible Duplicate:\nCSS 3 content selector?\nIs there a way to select an element in css based on element text?\nie:\n`li[text=*foo]\n<li>foo<\/li>\n<li>bar<\/li>`\nThat probably doesn't work..\nI expect the answer is no, but... |
{"title":"How to create our own Listener interface in android?","tags":["android"],"question_text":"Could someone help me to create user defined listener interface with some code snippets?","answer_text":"`public interface MyListener {\n \/\/ you can define any parameter as per your requirement\n public void callback(V... |
{"title":"How do I unset an element's CSS attribute using jQuery?","tags":["jquery","css"],"question_text":"If I set a CSS value on a specific element using:\n`$('#element').css('background-color', '#ccc');`\nI want to be able to unset that element-specific value and use the cascaded value, along the lines of:\n`$('#el... |
{"title":"Weird error NSAssert","tags":["objective-c","nsassert"],"question_text":"I can't figure out why I get\n`use of undeclared identifier _cmd did you mean rcmd`\non the line where NSAssert is.\n`#import <Foundation\/Foundation.h>\nint main (int argc, const char * argv[])\n{\n NSAutoreleasePool * pool = [[NSAutore... |
{"title":"Should I use std::function or a function pointer in C++?","tags":["c++","function","c++11","callback","std"],"question_text":"When implementing a callback function in C++, should I still use the C-style function pointer:\n`void (*callbackFunc)(int);`\nOr should I make use of std::function:\n`std::function< vo... |
{"title":"UILabel auto resize on basis of text to be shown","tags":["ios","objective-c","uilabel","uitextview"],"question_text":"I'm working on an application, in which I'm required to autoresize the text area on basis of text to be displayed.\nFirstly, I'm not sure for this either I should use\n`UILabel`\n(Logically i... |
{"title":"Detect history back using angular","tags":["javascript","jquery","angularjs"],"question_text":"Is it possible to detect that a user entered a page through using the history back button in his browser? Preferably I want to detect this action using angular.js.\nI do not want to use angular routing. It should al... |
{"title":"Clojure def vs defn for a function with no arguments","tags":["clojure"],"question_text":"I have written a program in clojure but some of the functions have no arguments. What would be the advantages of coding such functions as a \"def\" instead of a \"defn\" with no arguments?","answer_text":"`user=> (def t0... |
{"title":"android 5.0 material design tabs","tags":["android","android-tabs","android-5.0-lollipop"],"question_text":"What is the best and easy way to implement material design style tabs just like in the latest Google NewsStand app? That is exactly what I'm looking for but don't know where to start. Any help\/directio... |
{"title":"How to handle POST request in node.js","tags":["javascript","html5","node.js","javascript-events"],"question_text":"Hi I'm a newbie to Nodejs Currently I'm trying to handel the post request using node.js\nI have written a java script file with a name server.js which display a form on the browser. I want to us... |
{"title":"What does \".\/\" (dot slash) refer to in terms of an HTML file path location?","tags":["javascript","html","path"],"question_text":"I know\n`..\/`\nmeans go up a path, but what does\n`.\/`\nmean exactly?\nI was recently going through a tutorial and it seems to be referring to just a file in the same location... |
{"title":"embed a you tube video","tags":["video","github","youtube","embed","markdown"],"question_text":"I am fairly new to markup (though it's extremely easy to pickup). I am working on a package and am trying to get the wiki pages looking nice as a help manual. I can insert a youtube video link into the wiki page pr... |
{"title":"How can I strip commas and periods from a string?","tags":["php","regex","preg-replace"],"question_text":"I have string containing something like this:\n`\"Favourite bands: coldplay, guns & roses, etc.,\"`\nHow can I remove commas and periods using\n`preg_replace`\n?","answer_text":"You could use\n`preg_repla... |
{"title":"file exists by file name pattern","tags":["c#",".net-2.0",".net"],"question_text":"I am using:\n`File.Exists(filepath)`\nWhat I would like to do is swop this out for a pattern, because the first part of the filename changes.\nFor example: the file could be\n`01_peach.xml\n02_peach.xml\n03_peach.xml`\nHow can ... |
{"title":"Clearing intent","tags":["android","android-intent"],"question_text":"My Android app is getting called by an intent that is passing information (pendingintent in statusbar).\nWhen I hit the home button and reopen my app by holding the home button it calls the intent again and the same extras are still there.\... |
{"title":"Should Github be used as a CDN for javascript libraries?","tags":["javascript","performance","hosting"],"question_text":"Serving javascript libraries from a CDN instead of your own server comes with tremendous advantages. Less work for your server, possibility for the CDN to have a copy closer to the user tha... |
{"title":"Difference between @Delegate, @Mixin and Traits in Groovy?","tags":["design-patterns","groovy","delegates","mixins","traits"],"question_text":"Would someone explain when I would want to use\nGroovy Traits\nvs. Mixins (@Mixin) vs. Delegates (@Delegate)? Maybe some trade-offs and design concerns would help.\nTh... |
{"title":"dynamic vs var","tags":["c#","visual-studio-2010",".net-4.0"],"question_text":"Possible Duplicate:\nWhat\u2019s the difference between dynamic(C# 4) and var?\nWhat is the difference between dynamic and var keyword in .NET 4.0 (VS 2010). As per MSDN, the definition of dynamic is -\nDynamic lookup allows you to... |
{"title":"Azure SQL Database Web vs Business Edition","tags":["azure","sql-azure"],"question_text":"Is there any difference between the Web Edition and Business Edition of Azure SQL Database other than the maximum supported database sizes? I'm assuming the naming has some significance but all of the information I find ... |
{"title":"Which is fastest in PHP- MySQL or MySQLi?","tags":["php","mysql","mysqli"],"question_text":"I'd like to know if anyone has any first-hand experience with this dichotomy. A few blogs say the mysql extension is faster than mysqli. Is this true?\nAnd I'm only asking about speed. I know mysqli has features that a... |
{"title":"How do I get bootstrap-datepicker to work with Bootstrap 3?","tags":["twitter-bootstrap","datepicker","twitter-bootstrap-3"],"question_text":"I use the version of\nbootstrap-datepicker\nmaintained by\neternicode\n( Andrew Rowls ).\nOn\n`Bootstrap 2`\nit worked, but now it doesn't work with the\n`Bootstrap 3`\... |
{"title":"How to estimate download time remaining (accurately)?","tags":["algorithm","download","estimation"],"question_text":"Sure you could divide the remaining file size by the current download speed, but if your download speed fluctuates (and it will), this doesn't produce a very nice result. What's a better algori... |
{"title":"Ruby objects and JSON serialization (without Rails)","tags":["ruby","json","serialization","jsonserializer"],"question_text":"I'm trying to understand the JSON serialization landscape in Ruby. I'm new to Ruby.\nIs there any good JSON serialization options if you are not working with Rails?\nThat seems to be w... |
{"title":"Get selected row item in DataGrid WPF","tags":["wpf","datagrid","selecteditem"],"question_text":"I have a\n`DataGrid`\n, bound to Database table, I need to get the content of selected row in DataGrid, for example, I want to show in\n`MessageBox`\ncontent of selected row.\nExample of\n`DataGrid`\n:\nSo if I se... |
{"title":"What is a simple command line program or script to backup SQL server databases?","tags":["sql-server","command-line","scripting","backup"],"question_text":"I've been too lax with performing DB backups on our internal servers.\nIs there a simple command line program that I can use to backup certain databases i... |
{"title":"how to call parent constructor?","tags":["javascript","inheritance"],"question_text":"Let's say I have the following code snippet.\n`function test(id) { alert(id); }\ntestChild.prototype = new test();\nfunction testChild(){}\nvar instance = new testChild('hi');`\nIs it possible to get\n`alert('hi')`\n? I get\... |
{"title":"ReplacableToken_ when using web.config transform?","tags":["web-config"],"question_text":"I have a web.config with 2 transforms - for debug and release.\nweb.config:\n`<connectionStrings>\n <clear \/>\n <add name=\"StrName\" connectionString=\"data source=.\\sqlexpress;User Id=sa;Password=pass;Database=Social... |
{"title":"Gradient colors in Internet Explorer","tags":["html","css","internet-explorer","background","gradient"],"question_text":"I know that Internet Explorer has some proprietary extensions so that you can do things like create divs with a gradient background. I can't remember the element name or it's usage. Does an... |
{"title":"Jekyll - Automatically highlight current tab in menu bar","tags":["jekyll"],"question_text":"I am using github to host a static site and Jekyll to generate it.\nI have a menu bar (as\n`<ul>`\n) and would like the\n`<li>`\ncorresponding to the current page to be assigned a different class for CSS highlighting.... |
{"title":"Why does this polymorphic C# code print what it does?","tags":["c#",".net","oop","inheritance","polymorphism"],"question_text":"I was recently given the following piece of code as a sort-of puzzle to help understand\n`Polymorphism`\nand\n`Inheritance`\nin OOP - C#.\n`\/\/ No compiling!\npublic class A\n{\n pu... |
{"title":"Clear text in EditText when entered","tags":["android","android-edittext"],"question_text":"I'm trying to set and onclicklistener so that when I click within the edittext element it will clear its current contents. Is there something wrong here? When I compile this code I get a force quit and ActivityManager:... |
{"title":"Test PHP headers with PHPunit","tags":["php","unit-testing","phpunit","output-buffering"],"question_text":"I'm trying to use PHPunit to test a class that outputs some custom headers.\nThe problem is that on my machine this:\n`<?php\nclass HeadersTest extends PHPUnit_Framework_TestCase {\n public function test... |
{"title":"how to change background image of button when clicked\/focused?","tags":["android","button"],"question_text":"I want to change the background image of a button when clicked or focused.\nThis is my code:\n`Button tiny = (Button)findViewById(R.id.tiny);\ntiny.setOnClickListener(new OnClickListener() {\n @Overri... |
{"title":"Mongoose.js: Find user by username LIKE value","tags":["javascript","node.js","mongodb","find","mongoose"],"question_text":"I like to to go find a user in mongoDb by looking for a user called value.\nThe problem with:\n`username: 'peter'`\nis that i dont find it if the username is \"Peter\", or \"PeTER\".. or... |
{"title":"Vim search and replace selected text","tags":["search","vim","select","replace"],"question_text":"Let's say we have a text, and I enter visual mode and select some text. How do I quickly do a search for the highlighted text and replace it with something else?","answer_text":"Try execute the following or put i... |
{"title":"F#: let mutable vs. ref","tags":["f#","mutable"],"question_text":"First, I acknowledge the possibility that this question could be a duplicate; just let me know.\nI'm curious what the general \"best practice\" is for those situations when mutability is desired. F# seems to offer two facilities for this: the\n... |
{"title":"plotting histograms whose bar heights sum to 1 in matplotlib","tags":["python","graph","numpy","matplotlib","scipy"],"question_text":"I'd like to plot a normalized histogram from a vector using matplotlib. I tried the following:\n`plt.hist(myarray, normed=True)`\nas well as:\n`plt.hist(myarray, normed=1)`\nbu... |
{"title":"Where do I find the definition of size_t?","tags":["c++","c","variables"],"question_text":"I see variables defined with this type but I don't know where it comes from, nor what is its purpose. Why not use int or unsigned int? (What about other \"similar\" types? Void_t, etc).","answer_text":"From\nWikipedia\n... |
{"title":"How to force Logstash to reparse a file?","tags":["file","logstash"],"question_text":"I installed Logstash to parse apache files. It took me quite q while to get the settings right and I always tried on real logs. I noticed (as the documentation says) that logstash \"remembers\" where it was in a file. Now my... |
{"title":"Escape analysis in Java","tags":["java","stack","allocation"],"question_text":"As far as I know the JVM uses escape analysis for some performance\noptimisations\nlike lock coarsening and lock elision.\nI'm interested if there is a possibility for the JVM to decide that any particular object can be allocated o... |
{"title":"jQuery move to anchor location on page load","tags":["jquery","scroll","anchor"],"question_text":"I have a simple page setup such as:\n`<div id=\"aboutUs\">\n About us content...\n<\/div>\n<div id=\"header\">\n Header content...\n<\/div>`\nWhen the page loads, I need the page to automatically scroll down (no ... |
{"title":"Entity Framework DateTime and UTC","tags":["c#","entity-framework","datetime","utc","code-first"],"question_text":"is it possible to have Entity Framework (I am using the Code First Approach with CTP5 currently) store all DateTime values as UTC in the database?\nOr is there maybe a way to specify it in the ma... |
{"title":"What's the difference between 'int?' and 'int' in C#?","tags":["c#","syntax","types","nullable"],"question_text":"I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the \"int?\" syntax before seeing it here, but no matter how I search I can't find the previous post, and it's dri... |
{"title":"What does MongoDB not being ACID compliant really mean?","tags":["sql","database","mongodb","nosql","acid"],"question_text":"I am not a database expert and have no formal computer science background, so bear with me. I want to know the kinds of\nreal world\nnegative things that can happen if you use MongoDB, ... |
{"title":"Is JavaScript an untyped language?","tags":["javascript","types"],"question_text":"I've found that some people call JavaScript a \"dynamically, weakly typed\" language, but some even say \"untyped\"? Which is it really?","answer_text":"JavaScript\nis\nuntyped:\nEven Brendan Eich says so. On Twitter, he replie... |
{"title":"UITableView\/UITableViewCell tap event response?","tags":["iphone","objective-c","uitableview"],"question_text":"I've been googling around to try to figure out what sort of event handles are called when one row (or cell) in a UITableView is tapped, but haven't been able to figure it out. I'm trying to change ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.