text stringlengths 74 309k |
|---|
{"title":"C++ virtual function from constructor","tags":["c++","oop","class","constructor","virtual"],"question_text":"Why the following example prints \"0\" and what must change for it to print \"1\" as I expected ?\n`#include <iostream>\nstruct base {\n virtual const int value() const {\n return 0;\n }\n base() {\n s... |
{"title":"Best practice: AsyncTask during orientation change","tags":["android","multithreading","exception"],"question_text":"AsyncTask is a great thing to run complex tasks in another thread.\nBut when there is an orientation change or another configuration change while the AsyncTask is still running, the current act... |
{"title":"jQuery Deferred - waiting for multiple AJAX requests to finish","tags":["jquery","jquery-deferred"],"question_text":"I have a three layer deep chain of deferred ajax calls, and ideally they are going to kick the promise all the way up when the deepest layer finishes (makes me thing of Inception... \"we need t... |
{"title":"How to see full symlink path","tags":["linux"],"question_text":"When I'm using\n`ls -la symlinkName`\nor\n`stat symlinkName`\nnot all the path is displayed \n(e.g\n`..\/..\/..\/one\/two\/file.txt`\n)\nWhat is the linux command that reveals the full path?","answer_text":"`realpath`\nisn't available on all linu... |
{"title":"ASP.NET MVC DropDownListFor with model of type List<string>","tags":["c#","asp.net-mvc","asp.net-mvc-3","razor","html-helper"],"question_text":"I have a view with a model of type List and I want to place a drop down list on the page that contains all strings from the list as items in the drop down. I am new t... |
{"title":"SQLite UPSERT - ON DUPLICATE KEY UPDATE","tags":["sql","mysql","database","sqlite","upsert"],"question_text":"MySQL has something like this:\n`INSERT INTO visits (ip, hits)\nVALUES ('127.0.0.1', 1)\nON DUPLICATE KEY UPDATE hits = hits + 1;`\nAs far as I'm know this feature doesn't exist in SQLite, what I want... |
{"title":"how to add querystring values with RedirectToAction method?","tags":["asp.net-mvc"],"question_text":"In asp.net mvc, I am using this code:\n`RedirectToAction(\"myActionName\");`\nI want to pass some values via the querystring, how do I do that?","answer_text":"Any values that are passed that aren't part of th... |
{"title":"Create a tar.xz in one command","tags":["compression","archive","tar","xz"],"question_text":"I am trying to create a\n`.tar.xz`\ncompressed archive in one command. What is the specific syntax for that?\nI have tried\n`tar cf - file | xz file.tar.xz`\n, but that does not work.","answer_text":"Use the\n`-J`\nco... |
{"title":"Eclipse: I turned on hidden characters now I can't turn off","tags":["eclipse"],"question_text":"Somehow I've turned on hidden characters in eclipse. It's not the \"whitespace\" characters in the general editor preferences. When turned on, then it adds another layer of hidden characters over the existing ones... |
{"title":"Insert a line at specific line number with sed or awk","tags":["sed","awk"],"question_text":"I have a script file which I need to modify with another script to insert a text at the 8th line.\nString to insert:\n`Project_Name=sowstest`\n, into a file called\n`start`\n.\nI tried to use awk and sed, but my comma... |
{"title":"memcpy() vs memmove()","tags":["c","memcpy","memmove"],"question_text":"I am trying to understand the difference between\n`memcpy()`\nand\n`memmove()`\n, and I have read the text that\n`memcpy()`\ndoesn't take care of the overlapping source and destination whereas\n`memmove()`\ndoes.\nHowever, when I execute ... |
{"title":"ListView with OnItemClickListener android","tags":["android","android-listview"],"question_text":"I am using a custom\nListView\nwith RatingBar and ImageButton. Here is my problem: When I click on my ListView, my OnItemClickListener is not working. Please can any one help me.\nCode:\n`ListView lv = getListVie... |
{"title":"How to programmatically round corners and set random background colors","tags":["android","android-layout","background","android-view","rounded-corners"],"question_text":"I'd like to round the corners of a view and also change the color of the view based on the contents at runtime.\n`TextView v = new TextView... |
{"title":"Cascading drop-downs in MVC 3 Razor view","tags":["asp.net-mvc","asp.net-mvc-3","razor"],"question_text":"I am interested in how to implement cascading dropdown lists for addresses in a Razor view. My Site entity has a SuburbId property. Suburb has a CityId, and City has ProvinceId. I would like to display dr... |
{"title":"Can I use a Regex in an XPath expression?","tags":[".net","xml","regex","xpath"],"question_text":"Something like\n`.\/\/div[@id='foo\\d+]`\nto capture div tags with\n`id='foo123'`\n.\nI'm using .NET, if that matters.","answer_text":"As other answers have noted,\nXPath 1.0\ndoes not support regular expressions... |
{"title":"Dispelling the UIImage imageNamed: FUD","tags":["iphone","caching","uikit","uiimageview","imagenamed"],"question_text":"Edit Feb 2014:\nNote that this question dates from iOS 2.0!\nImage requirements and handling have moved on a lot since then. Retina makes images bigger and loading them slightly more complex... |
{"title":"Explanation of Func","tags":["c#",".net","func"],"question_text":"I was wondering if someone could explain what\n`Func<int, string>`\nis and how it is used with some clear examples.","answer_text":"Are you familiar with delegates in general? I have a page about\ndelegates and events\nwhich may help if not, al... |
{"title":"where does MySQL store database files?","tags":["mysql","phpmyadmin","wamp","recover"],"question_text":"I have uninstall wamp server and now I need my database to restore. How can I do this process?","answer_text":"In any case you can know it:\n`mysql> select @@datadir;\n+-------------------------------------... |
{"title":"How to return a part of an array in Ruby?","tags":["ruby","arrays","list","slice"],"question_text":"With a list in Python I can return a part of it using the following code:\n`foo = [1,2,3,4,5,6]\nbar = [10,20,30,40,50,60]\nhalf = len(foo) \/ 2\nfoobar = foo[:half] + bar[half:]`\nSince Ruby does everything in... |
{"title":"OSGi, Java Modularity and Jigsaw","tags":["java","osgi","classloader","jigsaw"],"question_text":"So as of yesterday morning I hadn't a clue as to what OSGi even was.\nOSGi\nwas just some buzzword that I kept seeing cropping up over and over again, and so I finally set aside some time to brush up on it.\nIt ac... |
{"title":"Android ListView Selector Color","tags":["android","android-listview"],"question_text":"Hi All,\nI have 2 questions regarding a ListView in Android:\nHow can I\nget\nthe color of the listview's focused row ?\nI tried to use the\nListView.getSelector()\nmethod, which according to its documentation should give ... |
{"title":"How to get class name only, not full path?","tags":["android"],"question_text":"I am aware that using\n`Context`\nand a method\n`getClass().getName()`\nI can get a string which represent full class name, like\n`com.package1.package2.MainActivity`\n.\nHow can I get only the last part, class name only? In this ... |
{"title":"Giving Command line arguments in Xcode in C program","tags":["c","xcode","command-line"],"question_text":"I am solving my C assignment in Xcode and in that program i have to give command line arguments when running the program and for this i have to user terminal like this:\n`.\/a.out myfirstCommand mySecondC... |
{"title":"How to execute Async task repeatedly after fixed time intervals","tags":["android","android-asynctask","android-service","timertask"],"question_text":"How to make Async task execute repeatedly after some time interval just like Timer...Actually I am developing an application that will download automatically a... |
{"title":"Toolbar overlapping below status bar","tags":["android","xml","android-layout"],"question_text":"I want to have appcompat v21 toolbar in my activity. But the toolbar I'm implementing is overlapping below status bar. How can I fix it?\nHere is the activity layout xml:\n`<LinearLayout xmlns:android=\"http:\/\/s... |
{"title":"\"The certificate chain was issued by an authority that is not trusted\" when connecting DB in VM Role from Azure website","tags":["azure-web-roles","azure-vm-role"],"question_text":"I am experiencing error when connecting MY DB which is in VM Role(I have SQL VM Role) from Azure Website. Both VM Role and Azur... |
{"title":"Using NSPredicate to determine if a string equals another string","tags":["objective-c","nsstring","nsarray","nspredicate"],"question_text":"I have an\n`NSArray`\nof CalEvents returned with the\n`[CalCalendarStore eventPredicateWithStartDate]`\nmethod. From the events returned, I am trying to keep only those ... |
{"title":"How to properly import a selfsigned certificate into Java keystore that is available to all Java applications by default?","tags":["java","certificate","ssl-certificate","keystore","keytool"],"question_text":"I do want to import a self signed certificate into Java so any Java application that will try to esta... |
{"title":"How to reset all checkboxes using jquery or javascript?","tags":["javascript","jquery","checkbox"],"question_text":"How can i reset all checkboxes in a document using jquery or javascript?","answer_text":"If you mean how to remove the 'checked' state from all checkboxes:\n`$('input:checkbox').removeAttr('chec... |
{"title":"What is \"export default\" in javascript?","tags":["javascript","node.js","ecmascript-6"],"question_text":"File:\nSafeString.js\n`\/\/ Build out our basic SafeString type\nfunction SafeString(string) {\n this.string = string;\n}\nSafeString.prototype.toString = function() {\n return \"\" + this.string;\n};\ne... |
{"title":"How to do a git diff on moved\/renamed file?","tags":["git","diff","mv"],"question_text":"I moved a file using\n`git mv`\n. Now I would like to do a diff on the new file to compare it with the old file (with the old, now non-existent name).\nHow do I do this?","answer_text":"You need to use -M to let git auto... |
{"title":"What's the advantage of Logic-less template (such as mustache)?","tags":["templates","mustache"],"question_text":"Recently, I ran into\nmustache\nwhich is claimed to be\nLogic-less template\n.\nHowever, there is no explaining why it is designed in Logic-less way. In another word, what's the advantage of Logic... |
{"title":"Set cursor position on contentEditable <div>","tags":["javascript","jquery","html","contenteditable","cursor-position"],"question_text":"I am after a definitive, cross-browser solution to set the cursor\/caret position to the last known position when a contentEditable='on' <div> regains focus. It appears defa... |
{"title":"Getting Cordova\/Phonegap to emulate on Genymotion virtual device","tags":["node.js","cordova","android-emulator","npm","genymotion"],"question_text":"Using the Cordova CLI, I set up an app and build it:\n`cordova create hi com.example.hi Hi \ncd hi\ncordova platform add android\ncordova build android`\nI run... |
{"title":"Automatic HTTPS connection\/redirect with node.js\/express","tags":["node.js","https","express"],"question_text":"I've been trying to get HTTPS set up with a node.js project I'm working on. I've essentially followed the\nnode.js documentation\nfor this example:\n`\/\/ curl -k https:\/\/localhost:8000\/\nvar h... |
{"title":"Is it Linq or Lambda?","tags":["c#","linq","lambda"],"question_text":"I know that this is Linq:\n`var _Results = from item in _List\n where item.Value == 1\n select item;`\nAnd I know this is Lambda:\n`var _Results = _List.Where(x => x.Value == 1);`\nEditor's note:\nthe above is not merely Lambda, it is Linq ... |
{"title":"Undefined reference to static constexpr char[]","tags":["c++","c++11","static-members","constexpr"],"question_text":"I want to have a\n`static const`\n`char`\narray in my class. GCC complained and told me I should use\n`constexpr`\n, although now it's telling me it's an undefined reference. If I make the arra... |
{"title":"Operator overloading : member function vs. non-member function?","tags":["c++","operator-overloading","member-functions","friend-function","non-member-functions"],"question_text":"I read that an overloaded operator declared as member function is asymmetric because it can have only one parameter and the other ... |
{"title":"Python: tf-idf-cosine: to find document similarity","tags":["python","machine-learning","nltk","information-retrieval","tf-idf"],"question_text":"I was following a tutorial which was available at\nPart 1\n&\nPart 2\nunfortunately author didn't have time for the final section which involves using cosine to act... |
{"title":"ASP.NET MVC partial views: input name prefixes","tags":["asp.net-mvc","spark-view-engine","mvccontrib"],"question_text":"Suppose I have ViewModel like\n`public class AnotherViewModel\n{\n public string Name { get; set; }\n}\npublic class MyViewModel\n{\n public string Name { get; set; }\n public AnotherViewMo... |
{"title":"Is there a clean wikipedia API just for retrieve content summary?","tags":["api","wikipedia","wikipedia-api"],"question_text":"I need just to retrieve first paragraph of a Wikipedia page.\nContent must be html formated, ready to be displayed on my websites (so NO BBCODE, or WIKIPEDIA special CODE!)","answer_t... |
{"title":"Error:Unable to locate adb within SDK in Android Studio","tags":["android","android-studio","installation"],"question_text":"Does anyone know what this means? I'm kind of noobish to Android. When I click the \"run\" button on my simulator I get this message.\n`Throwable: Unable to locate adb within SDK`\nI am... |
{"title":"How do I find a specific table in my EDMX model quickly?","tags":["c#","vb.net","entity-framework-4","edmx","edmx-designer"],"question_text":"I was wondering if anyone knows a quicker way to find a table in the EDMX model than just scrolling through the diagram and looking for the thing. Our database has arou... |
{"title":"Change templates in Xcode","tags":["xcode","osx","templates","xcode4","xcode4.5"],"question_text":"How would I change the initial templates created by Xcode when creating a new Cocoa Class.\nI am referring to the comments and class name created when using Xcode's new class wizard.","answer_text":"You wouldn't... |
{"title":"how does timeout work in angular tests running in karma","tags":["unit-testing","angularjs","timeout","karma-runner"],"question_text":"I love using console log for feedback perhaps too much, and sometimes I run into code that as convention we've added $timeout in the directive\/service\/controller, sometimes ... |
{"title":"Difference between a user and a schema in Oracle?","tags":["oracle"],"question_text":"What is the difference between a user and a schema in Oracle?","answer_text":"From\nAsk Tom\nYou should consider a schema to be the user account and collection of all objects therein \nas a schema for all intents and purpose... |
{"title":"AngularJS: How to make angular load script inside ng-include?","tags":["angularjs"],"question_text":"Hey I am building a web page with angular. The problem is that there are somethings already build without angular and I have to include them as well\nThe problem is this.\nI have something like this in my main... |
{"title":"Android empty Linear layout contents","tags":["android","android-linearlayout"],"question_text":"i have a Text view inside an linear layout. now i want to delete this text view in java. this text view is generated dynamically. I have linear layout's id. how to empty all contents inside this linear layout?\n`<... |
{"title":"Calling method in current view controller from App Delegate in iOS","tags":["iphone","objective-c","ios"],"question_text":"I have two view controllers (BuildingsViewController and RoomsViewController) that both use a function within the App Delegate called upload. The upload function basically does an HTTP re... |
{"title":"PHP echo vs PHP short tags","tags":["php","function","echo","pageload"],"question_text":"Are they equal in safeness? I was informed that using\n`<?=$function_here?>`\nwas less safe, and that it slows down page load times.\nI am strictly biased to using echo.\nWhat are the advantages\/disadvantages?","answer_t... |
{"title":"How can I get generic Type from a string representation?","tags":["c#","reflection","types"],"question_text":"I have\n`MyClass<T>`\n.\nAnd then I have this\n`string s = \"MyClass<AnotherClass>\";`\n. How can I get Type from the string\n`s`\n?\nOne way (ugly) is to parse out the \"<\" and \">\" and do:\n`Type ... |
{"title":"Determining if a number is either a multiple of ten or within a particular set of ranges","tags":["c++","comparison","conditional-statements","integer-arithmetic"],"question_text":"I have a few loops that I need in my program. I can write out the pseudo code but I'm not entirely sure how to write them logical... |
{"title":"Explanation of JSHint's Bad line breaking before '+' error","tags":["javascript","jshint"],"question_text":"Can someone explain to me why JSHint complains about the following,\n`window.location.href = String1\n + '#'\n + Sting2\n + '='\n + String3;`\nWith the error,\n`Bad line breaking before '+' error`\nI un... |
{"title":"Creating a selector from a method name with parameters","tags":["objective-c","selector"],"question_text":"I have a code sample that gets a\n`SEL`\nfrom the current object,\n`SEL callback = @selector(mymethod:parameter2);`\nAnd I have a method like\n`-(void)mymethod:(id)v1 parameter2;(NSString*)v2 {\n}`\nNow ... |
{"title":"creating a random number using MYSQL","tags":["mysql","sql"],"question_text":"I would like to know is there a way to select randomly generated number between 100 and 500 along with a select query.\nEg:\n`SELECT name, address, random_number FROM users`\nI dont have to store this number in db and only to use it... |
{"title":"deciding among subprocess, multiprocessing, and thread in Python?","tags":["python","multithreading","parallel-processing"],"question_text":"I'd like to parallelize my Python program so that it can make use of multiple processors on the machine that it runs on. My parallelization is very simple, in that all t... |
{"title":"What's your choice for your next ASP.NET project: Web Forms or MVC?","tags":["asp.net","asp.net-mvc","webforms"],"question_text":"Let's say that you will start a new ASP.NET web site\/application tomorrow. Would you chose Web Forms or MVC, and why?","answer_text":"MVC baby! And JQuery!\nEdit: OK, it's fair en... |
{"title":"Global variables in R","tags":["r","global-variables"],"question_text":"I am a newbie in R programming. Though I am poking into the manuals, I also wanted to ask the community\n\"How can we set global variables inside a function?\"\nAny pointers will help.\nQuestion-2: Regarding plotting,\nI am using plotting... |
{"title":"Surrogate vs. natural\/business keys","tags":["database","database-design","primary-key","key"],"question_text":"Here we go again, the old argument still arises...\nWould we better have a business key as a primary key, or would we rather have a surrogate id (i.e. an SQL Server identity) with a unique constrai... |
{"title":"Celery - Get task id for current task","tags":["python","django","celery"],"question_text":"How can I get the task_id value for a task from within the task? Here's my code:\n`from celery.decorators import task\nfrom django.core.cache import cache\n@task\ndef do_job(path):\n \"Performs an operation on a file\"... |
{"title":"Is there hard evidence of the ROI of unit testing?","tags":["unit-testing"],"question_text":"Unit testing sounds great to me, but I'm not sure I should spend any time really learning it unless I can convince others that is has significant value. I have to convince the other programmers and, more importantly, ... |
{"title":"What is difference between functional and Imperative programming languages?","tags":["oop","functional-programming","purely-functional"],"question_text":"Most of the mainstream languages, including object-oriented programming (OOP) languages such as C#, Visual Basic, C++, and Java, were designed to primarily ... |
{"title":"Android AsyncTask for Long Running Operations","tags":["android","android-asynctask"],"question_text":"Quoting the documentation for AsyncTask found\nhere\n, it says\nAsyncTasks should ideally be used for short operations (a few seconds at the most.) If you need to keep threads running for long periods of tim... |
{"title":"Is there a recommended package for machine learning in Python?","tags":["python","machine-learning"],"question_text":"Is there a recommended package for machine learning in Python?\nI have previous experience in implementing a variety of machine learning and statistical algorithms in C++ and\nMATLAB\n, but ha... |
{"title":"How to detect if rails is at the root url?","tags":["ruby-on-rails","routing"],"question_text":"What I want is seems simple.\nIn my application helper i setup this\n`module ApplicationHelper\ndef isroot\nif root_url \n@container = \"mainbox\"\nelse\n@container = \"maincontainerbox\"\nend\nend\nend`\nin my app... |
{"title":"What does SQL clause \"GROUP BY 1\" mean?","tags":["mysql","sql","group-by"],"question_text":"Someone sent me a SQL query where the\n`GROUP BY`\nclause consisted of the statement:\n`GROUP BY 1`\n.\nThis must be a typo right? No column is given the alias 1. What could this mean? Am I right to assume that this ... |
{"title":"Correctness of Sakamoto's algorithm to find the day of week","tags":["c","algorithm","dayofweek","correctness"],"question_text":"I am using Sakamoto's algorithm to find out the day of week from a given date.\nCan anybody tell me the correctness of this algorithm? I just want this from 2000 to 2099.\nThe algor... |
{"title":"Calling closure assigned to object property directly","tags":["php","object","properties","closures"],"question_text":"I would like to be able to call a closure that I assign to an object's property directly without reassigning the closure to a variable and then calling it. Is this possible?\nThe code below d... |
{"title":"Can't drag (to make code snippet) in Xcode","tags":["xcode","code-snippets"],"question_text":"When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up select... |
{"title":"How to safely call an async method in C# without await","tags":["c#","exception-handling","async-await"],"question_text":"I have an\n`async`\nmethod which returns no data:\n`public async Task MyAsyncMethod()\n{\n \/\/ do some stuff async, don't return any data\n}`\nI'm calling this from another method which r... |
{"title":"module unsafe for SAFESEH image C++","tags":["c++","visual-studio","visual-c++"],"question_text":"I am using Microsoft Visual Studio 2011 Professional Beta\nI am trying to run the OpenCV C++ files (\nhttp:\/\/opencv.willowgarage.com\/wiki\/Welcome\n) that I have compiled using cMake & the Visual Studio Compli... |
{"title":"printing list in python properly","tags":["python","string"],"question_text":"So I have a list:\n`['x', 3, 'b']`\nAnd I want the output to be:\n`[x, 3, b]`\nHow can I do this in python?\nIf I do\n`str(['x', 3, 'b'])`\n, I get one with quotes, but I don't want quotes.","answer_text":"`mylist = ['x', 3, 'b']\np... |
{"title":"How to POST a django form with AJAX & jQuery","tags":["javascript","jquery","ajax","django","django-templates"],"question_text":"I've checked out tons of tutorials for django AJAX forms, but each one of them tells you one way of doing it, none of them is simple and I'm a bit confused since I've never worked w... |
{"title":"How to validate a date?","tags":["javascript","validation"],"question_text":"I'm trying to test to make sure a date is valid in the sense that if someone enters\n`2\/30\/2011`\nthen it should be wrong.\nHow can I do this with any date?","answer_text":"One simple way to validate a date string is to convert to ... |
{"title":"How can I tell gcc not to inline a function?","tags":["c","gcc","inline"],"question_text":"Say I have this small function in a source file\n`static void foo() {}`\nand I build an optimized version of my binary yet I don't want this function inlined (for optimization purposes). is there a macro I can add in a ... |
{"title":"How to determine if a string is a valid IPv4 or IPv6 address in C#?","tags":["c#",".net","ip-address"],"question_text":"I know regex is\ndangerous\nfor validating IP addresses because of the different forms an IP address can take.\nI've seen similar questions for C and C++, and those were resolved with a func... |
{"title":"Json allowget error","tags":["jquery","asp.net-mvc","json"],"question_text":"This error comes up in our MVC app randomly. Sometimes doing the same exact thing it won't sometimes, it will. Does anyone know if this has to do with anything that could be a simple fix, or if this is something common that a lot of ... |
{"title":"Increase the grid spacing in android","tags":["android"],"question_text":"I have a gridview in which i have a lot of items in three colums. I want to increase the spacing between them. How can I do that in android?","answer_text":"You can use\n`android:verticalSpacing`\nand\n`android:horizontalSpacing`\nin Gr... |
{"title":"Why can't I create a vector of lambda in C++11?","tags":["c++","vector","lambda","c++11"],"question_text":"I was trying to create a vector of lambda, but failed:\n`auto ignore = [&]() { return 10; }; \/\/1\nstd::vector<decltype(ignore)> v; \/\/2\nv.push_back([&]() { return 100; }); \/\/3`\nUp to line #2, it\n... |
{"title":"jQuery get text as number","tags":["jquery","variables"],"question_text":"This code doesn't work:\n`var number = $(this).find('.number').text();\nvar current = 600;\nif (current > number){\n \/\/ do something\n}`\nHTML:\n`<div class=\"number\">400<\/div>`\nSeems there is some problem with converting\n`text()`... |
{"title":"form confirm before submit","tags":["jquery"],"question_text":"I am using a simple form and I want to allow the user to confirm before the form submits... I know this would be easy using jQuery, but I am a bit confused about code...\n`$(function() {\n $(\".testform\").submit(function() {\n $('.submitbtn').tex... |
{"title":"How to delete the first row of a dataframe in R?","tags":["r","dataset"],"question_text":"I have a dataset with 11 columns with over a 1000 rows each. The columns were labeled V1, V2, V11, etc..\nI replaced the names with something more useful to me using the \"c\" command.\nI didn't realize that row 1 also c... |
{"title":"understanding the concept of javascript callbacks with node.js, especially in loops","tags":["javascript","callback","node.js"],"question_text":"I am just starting with node.js. I have done a little ajax stuff but nothing too complicated so callbacks are still kind of over my head. I looked at async, but all ... |
{"title":"Concrete symptoms of over-engineering","tags":["architecture","software-engineering","infrastructure"],"question_text":"I have recently found myself in the position of explaining an (In-House) application I have written to two candidates my company likes to hire in order to assist in maintenance and adding mi... |
{"title":"Is String Literal Pool a collection of references to the String Object, Or a collection of Objects","tags":["java","string","memory-management"],"question_text":"I am all confused after reading the article on javaranch site by Corey McGlone, The author of The SCJP Tip Line. named Strings, Literally and the\nS... |
{"title":"Check permission inside a template in Django","tags":["django","django-authentication"],"question_text":"Can I use the Auth application's permission checking inside a template in Django? (I want to display a simple form at the end of the template for privileged users)\nAnd more importantly, should I do it at ... |
{"title":"Set EditText Digits Programmatically","tags":["android","android-edittext"],"question_text":"I am essentially trying to set the digits value of an EditText programmatically. So far I have:\n`weightInput.setInputType(InputType.TYPE_CLASS_PHONE);\nweightInput.setKeyListener(DigitsKeyListener.getInstance());`\nW... |
{"title":"Seeking constructive criticism on monad implementation","tags":["haskell","monads","idiomatic"],"question_text":"I'm learning monads, this is my first working one (aside from the trivial monad). Feel free to criticize everything in it ruthlessly. I'm especially interested in \"more idiomatic\" and \"more eleg... |
{"title":"How to comment a single line in XML?","tags":["xml","xml-comments"],"question_text":"This rather is a verification just not to miss out.\nIs\/n't there a line-comment in XML? So, one without a closer, like \"\/\/\" the compiler uses.\nI saw\nHow do I comment out a block of tags in XML?\nand several other disc... |
{"title":"Problems with DeploymentItem attribute","tags":["c#","visual-studio","unit-testing","mstest","deploymentitem"],"question_text":"I'm currently maintaining an \"old\" system written in C#.net, removing some obsolete features and doing some refactoring. Thanks god, the previous guy wrote some unit tests (MSTests... |
{"title":"C# Thread safe fast(est) counter","tags":["c#","multithreading","thread-safety","counter"],"question_text":"What is the way to obtain a thread safe counter in C# with best possible performance?\nThis is as simple as it gets:\n`public static long GetNextValue()\n{\n long result;\n lock (LOCK)\n {\n result = CO... |
{"title":"MySQL Query to select data from last week?","tags":["mysql","sql","database","datetime"],"question_text":"Hi I have a table with a date field and some other informations.\nI want to select all entries from the last week, (week start from Sunday).\ntable values :\n`id date\n2 2011-05-14 09:17:25\n5 2011-05-16 ... |
{"title":"Function for 'does matrix contain value X?'","tags":["matlab","function","matrix","floating-point"],"question_text":"Is there a built in MATLAB function to find out if a matrix contains a certain value?\n(ala PHP's\n`in_array()`\n)","answer_text":"Many ways to do this. ismember is the first that comes to mind... |
{"title":"Unable to debug managed code using visual studio 2013 (\"Cannot evaluate expression\" error - am using debug build) (Note that VS 2012 works)","tags":["c#",".net","visual-studio","powershell"],"question_text":"I have .net application (GUI as well as PowerShell) built against 4.5. My OS is server 2012. When I ... |
{"title":"What are \"data-require\" \"data-semver\" in HTML files?","tags":["javascript","html","css","plunker"],"question_text":"I have seen tags like this in HTML. What are these attributes?\nThis is NOT a duplicate of the\n`data-*`\nquestion.\nEdit:\nI am looking for these two specific attributes, not\n`data-*`\nin ... |
{"title":"slim dynamic conditional class","tags":["ruby-on-rails","slim-lang"],"question_text":"Just to help other developers, because there is no similar question on SO.\n`div class=(is_active? ? 'active' : 'inactive')`\n`div class=('active' if is_active?)`","answer_text":"See the examples below:\n`div class=(is_activ... |
{"title":"How do I kill a process using Vb.NET or C#?","tags":["c#","vb.net","process","kill"],"question_text":"I have a scenario where I have to check whether user has already opened Microsoft Word. If he has, then I have to kill the winword.exe process and continue to execute my code.\nDoes any one have any straight-... |
{"title":"Asihttprequest 61 errors","tags":["iphone","objective-c","xcode","asihttprequest"],"question_text":"I'm using the\n`ASIhttprequest`\nin many projects but recently with each new project when I'm trying to add the\n`ASIhttprequest`\nclasses I get the following error before using classes just when I'm trying to ... |
{"title":"How long to brute force a salted SHA-512 hash? (salt provided)","tags":["hash","cryptography","salt","brute-force","sha"],"question_text":"Here is an algorithm in Java:\n`public String getHash(String password, String salt) throws Exception {\n String input = password + salt;\n MessageDigest md = MessageDigest... |
{"title":"How can I specify a gem to pull from a private github repository?","tags":["ruby-on-rails-3","github","heroku"],"question_text":"I have a private repository on Github that I want to use. I deploy my app to Heroku. How can I specify a private repository as the source on my gemfile? I imagine it wouldn't be eno... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.