text stringlengths 74 309k |
|---|
{"title":"To prevent a memory leak, the JDBC Driver has been forcibly unregistered","tags":["java","tomcat","jdbc"],"question_text":"I am getting this message when I run my web application. It runs fine but I get this message during shutdown.\nSEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.Ora... |
{"title":"Network tools that simulate slow network connection","tags":["networking","performance","simulate"],"question_text":"I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on th... |
{"title":"Downloading a file from spring controllers","tags":["java","spring","file","download","controller"],"question_text":"I have a requirement where I need to download a PDF from the website. The PDF needs to be generated within the code, which I thought would be a combination of freemarker and a PDF generation fr... |
{"title":"Can a variable number of arguments be passed to a function?","tags":["python"],"question_text":"In a similar way to using varargs in C or C++:\n`fn(a, b)\nfn(a, b, c, d, ...)`","answer_text":"Yes.\nThis is simple and works if you disregard keyword arguments:\n`def manyArgs(*arg):\n print \"I was called with\"... |
{"title":"Android invalidateOptionsMenu() for API < 11","tags":["android","menu"],"question_text":"I used\n`ActivityCompat.invalidateOptionsMenu(MainActivity.this);`\nso that my menu item \"refresh\" can automatically be enabled\/disabled without the using have to touch the \"Menu\" option (imagine the user leaves the ... |
{"title":"Mock HttpContext.Current in Test Init Method","tags":["c#","unit-testing","mocking","httpcontext"],"question_text":"I'm trying to add unit testing to an ASP.NET MVC application I have built. In my unit tests I use the following code:\n`[TestMethod]\npublic void IndexAction_Should_Return_View() {\n var control... |
{"title":"What is the bower version syntax?","tags":["node.js","bower","semantic-versioning"],"question_text":"Bower enables me to specify version requirements for packages using the following syntax:\n`\"dependencies\": {\n \"<name>\": \"<version>\",\n},`\nBut I have not been able to find what is the syntax to use for... |
{"title":"Android; Check if file exists without creating a new one","tags":["android","file","file-io"],"question_text":"I want to check if file exists in my package folder, but I don't want to create a new one.\n`File file = new File(filePath);\nif(file.exists()) \n return true;`\nDoes this code check without creating... |
{"title":"bash\/fish command to print absolute path to a file","tags":["bash","shell","path"],"question_text":"Question: is there a simple sh\/bash\/zsh\/fish\/... command to print the absolute path of whichever file I feed it?\nUsage case: I'm in directory\n`\/a\/b`\nand I'd like to print the full path to file\n`c`\no... |
{"title":"ng-model for <input type=\"file\"\/>","tags":["angularjs"],"question_text":"I tried to use ng-model on input tag with type file:\n`<input type=\"file\" ng-model=\"vm.uploadme\" \/>`\nBut after selecting a file, in controller, $scope.vm.uploadme is still undefined.\nHow do I get the selected file in my control... |
{"title":"How to determine the screen width in terms of dp or dip at runtime in Android?","tags":["android","dip"],"question_text":"I need to code the layout of the android widgets using dip\/dp (in java files). At runtime if I code,\n`int pixel=this.getWindowManager().getDefaultDisplay().getWidth()`\n;\nthis return th... |
{"title":"Struct constructor: \"fields must be fully assigned before control is returned to the caller.\"","tags":["c#","constructor","struct"],"question_text":"Here is a struct I am trying to write:\n`public struct AttackTraits\n {\n public AttackTraits(double probability, int damage, float distance)\n {\n Probability... |
{"title":"What's the best practice to \"git clone\" into an existing folder?","tags":["git"],"question_text":"I have a working copy of the project, without any source control meta data. Now, I'd like to do the equivalent of git-clone into this folder, and keep my local changes.\ngit-clone doesn't allow me to clone into... |
{"title":"Ruby: What is the easiest way to remove the first element from an array?","tags":["ruby-on-rails","ruby"],"question_text":"Lets say I have an array\n`[0, 132, 432, 342, 234]`\nWhat is the easiest way to get rid of the first element? (0)","answer_text":"Use the\n`shift`\nmethod on array\n`>> x = [4,5,6]\n=> [4... |
{"title":"Rails - How to use a Helper Inside a Controller","tags":["ruby-on-rails","ruby-on-rails-3"],"question_text":"while I realize your are supposed to use a helper inside a view, I need a helper in my controller as I'm building a JSON object to return.\nIt goes a little like this:\n`def xxxxx\n @comments = Array.n... |
{"title":"Eclipse Java Profiler","tags":["java","eclipse","profiler"],"question_text":"I'm trying to find a free profiler for Eclipse that works well. I would like a graphical breakdown of execution time, in particular. I've tried TPTP but have had no luck at all with GUI apps (it took almost a minute for a GUI app to ... |
{"title":"onchange event on input type=range is not triggering in firefox while dragging","tags":["javascript","html5","firefox","input","onchange"],"question_text":"When i played with\n`<input type=\"range\">`\n, Firefox triggers an onchange event only if we drop the slider to a new position where Chrome and others tr... |
{"title":"How to call a method after bean initialization is complete?","tags":["spring","initialization","startup","applicationcontext"],"question_text":"I have a use case where I need to call a (non-static) method in the bean only-once at the ApplicationContext load up. Is it ok, if I use MethodInvokingFactoryBean for... |
{"title":"babel-loader jsx SyntaxError: Unexpected token","tags":["javascript","webpack","babeljs","react-jsx"],"question_text":"I'm a beginner in React + Webpack.\nI found a wired error in my hello world web app.\nI'm using babel-loader in webpack to help me convert jsx into js, but it seems like babel can't understan... |
{"title":"How to dynamically create CSS class in JavaScript and apply?","tags":["javascript","css","stylesheet"],"question_text":"I need to create a CSS stylesheet class dynamically in JavaScript and assign it to some HTML elements like - div, table, span, tr, etc and to some controls like asp:Textbox, Dropdownlist and... |
{"title":"Use variable with TOP in select statement in SQL Server without making it dynamic","tags":["sql","sql-server","sql-server-2005","tsql"],"question_text":"`declare @top int\nset @top = 5\nselect top @top * from tablename`\nIs it possible?\nOr any idea for such a logic (i don't want to use dynamic query)?","answ... |
{"title":"What method in the String class returns only the first N characters?","tags":["c#",".net","string","character"],"question_text":"I'd like to write an extension method to the\n`String`\nclass so that if the input string to is longer than the provided length\n`N`\n, only the first\n`N`\ncharacters are to be dis... |
{"title":"How to create a simple map using JavaScript\/JQuery","tags":["javascript","jquery","hashmap"],"question_text":"How can you create the JavaScript\/JQuery equivalent of this Java code:\n`Map map = new HashMap(); \/\/Doesn't not have to be a hash map, any key\/value map is fine\nmap.put(myKey1, myObj1);\nmap.put... |
{"title":"Altering a column to be nullable","tags":["sql"],"question_text":"I want to alter a table column to be nullable. I have used:\n`ALTER TABLE Merchant_Pending_Functions Modify NumberOfLocations NULL`\nThis gives an error at\n`Modify`\n. What is the correct syntax?","answer_text":"Assuming\n`SQL Server`\n(based ... |
{"title":"Difference between attr_accessor and attr_accessible","tags":["ruby-on-rails","ruby"],"question_text":"In Rails, what is the difference between\n`attr_accessor`\nand\n`attr_accessible`\n? From my understanding, using\n`attr_accessor`\nis used to create getter and setter methods for that variable, so that we c... |
{"title":"Generate a UUID on iOS from Swift","tags":["ios","swift","cocoa-touch","guid","core-foundation"],"question_text":"In my iOS Swift app I want to generate random UUID (\nGUID\n) strings for use as a table key, and this snippet\nappears\nto work:\n`let uuid = CFUUIDCreateString(nil, CFUUIDCreate(nil))`\nIs this ... |
{"title":"How to save a Python interactive session?","tags":["python","shell","read-eval-print-loop","interactive-session"],"question_text":"I find myself frequently using Python's interpreter to work with databases, files, etc -- basically a lot of manual formatting of semi-structured data. I don't properly save and c... |
{"title":"Mockito matcher and array of primitives","tags":["java","mockito"],"question_text":"With Mockito, I want to\n`verify()`\na method call with\n`byte[]`\nin its argument list, but I didn't find how to write this.\n`myMethod( byte[] )`\nI just want something like\n`anyByteArray()`\n, how to do that with Mockito ?... |
{"title":"What is a software framework?","tags":["frameworks","software-design"],"question_text":"Can someone please explain me what a software framework is? Why do we need a framework? What does a framework do to make programming easier?","answer_text":"I'm very late to answer it. But, I would like to share one exampl... |
{"title":"How to display a specific user's commits in svn log?","tags":["svn","bash","version-control"],"question_text":"How to display a specific user's commits in svn? I didn't find any switches for that for svn log.","answer_text":"You could use this:\n`svn log | sed -n '\/USERNAME\/,\/-----$\/ p'`\nIt will show you... |
{"title":"How to get the current URL within a Django template?","tags":["django","templates"],"question_text":"i was wondering how to get the current URL within a template.\nSay my URL was\n`\/user\/profile\/`\nHow do i return this to the template?","answer_text":"You can fetch the URL in your template like this:\n`<p>... |
{"title":"Why NSUserDefaults failed to save NSMutableDictionary in iPhone SDK?","tags":["iphone","objective-c","cocoa-touch","nsuserdefaults","nscoding"],"question_text":"I'd like to save an\n`NSMutableDictionary`\nobject in\n`NSUserDefaults`\n. The key type in\n`NSMutableDictionary`\nis\n`NSString`\n, the value type i... |
{"title":"Splitting a Java String by the pipe symbol using split(\"|\")","tags":["java","regex","string"],"question_text":"The Java official documentation states:\nThe string\n`\"boo:and:foo\"`\n, for example, yields the following results with these expressions \nRegex Result\n:\n`{ \"boo\", \"and\", \"foo\" }\"`\nAnd ... |
{"title":"mongodb\/mongoose findMany - find all documents with IDs listed in array","tags":["mongodb","node.js","mongoose"],"question_text":"I have an array of _ids and I want to get all docs accordingly, what's the best way to do it ?\nSomething like ...\n`\/\/ doesn't work ... of course ...\nmodel.find({\n '_id' : [\... |
{"title":"How can I represent an infinite number in Python?","tags":["python","infinite"],"question_text":"In python, when you want to give to a set of elements an associated value, and you use this value for comparisons between them, I would want this value as infinite. No matter which number you enter in the program,... |
{"title":"Set color of TextView span in Android","tags":["android","text","formatting","android-textview"],"question_text":"Is it possible to set the color of just span of text in a TextView?\nI would like to do something similar to the Twitter app, in which a part of the text is blue. See image below:","answer_text":"... |
{"title":"Android ImageView size not scaling with source image","tags":["android","layout","formatting","imageview","custom-view"],"question_text":"I have a few ImageViews inside a LinearLayout. I need to scale down the ImageViews so that they maintain their aspect ratios whilst fitting inside the LinearLayout vertical... |
{"title":"Rails params explained?","tags":["ruby-on-rails","ruby"],"question_text":"Could anyone explain\n`params`\nin Rails controller: where they come from, and what they are referencing?\n`def create\n @vote = Vote.new(params[:vote])\n item = params[:vote][:item_id]\n uid = params[:vote][:user_id]\n @extant = Vote.f... |
{"title":"WPF Timer Like C# Timer","tags":["c#","wpf","timer"],"question_text":"Where can I find a control which is like the C# Timer Control in WPF?","answer_text":"The usual WPF timer is the\n`DispatcherTimer`\n, which is not a control but used in code. It basically works the same way like the WinForms timer:\n`Syste... |
{"title":"Putting HTML inside Html.ActionLink(), plus No Link Text?","tags":["c#",".net","asp.net-mvc","actionlink"],"question_text":"I have two questions:\nI'm wondering how I can display no link text when using\n`Html.ActionLink()`\nin an MVC view (actually, this is\n`Site.Master`\n).\nThere is not an overloaded vers... |
{"title":"What's the best way to communicate between view controllers?","tags":["objective-c","iphone","cocoa-touch","delegates","key-value-observing"],"question_text":"Being new to objective-c, cocoa, and iPhone dev in general, I have a strong desire to get the most out of the language and the frameworks.\nOne of the ... |
{"title":"What is the difference between ArrayList.clear() and ArrayList.removeAll()?","tags":["java","arraylist"],"question_text":"Assuming that\n`arraylist`\nis defined as\n`ArrayList<String> arraylist`\n, is\n`arraylist.removeAll(arraylist)`\nequivalent to\n`arraylist.clear()`\n?\nIf so, can I assume that the\n`clea... |
{"title":"What is the advantage of using Restangular over ngResource?","tags":["javascript","angularjs","restangular","ngresource"],"question_text":"`ngResource`\nalready\nseems really simple\nto implement things with...\nWhat are the Advantages \/ Disadvantages of using\nRestangular\nover\nngResource\n?\n1.1.3\n`$reso... |
{"title":"jQuery click events firing multiple times","tags":["javascript","jquery","javascript-events","click"],"question_text":"I'm attempting to write a video poker game in Javascript as a way of getting the basics of it down, and I've run into a problem where the jQuery click event handlers are firing multiple times... |
{"title":"How can I create a temp file with a specific extension with .NET?","tags":["c#",".net","temporary-files"],"question_text":"I need to generate a unique temporary file with a .csv extension.\nWhat I do right now is\n`string filename = System.IO.Path.GetTempFileName().Replace(\".tmp\", \".csv\");`\nHowever, this... |
{"title":"Exception raised during rendering: java.lang.System.arraycopy","tags":["android","eclipse"],"question_text":"I have a Strange problem with the new ADT version. I have downloaded the new Eclipse from\neclipse.org\nthen I install ADT on it. Everything works fine; I can create a project for android and all thing... |
{"title":"Create timestamp variable in bash script","tags":["bash","variables","timestamp"],"question_text":"I am trying to create a timestamp variable in a shell script to make the logging a little easier. I want to create the variable at the beginning of the script and have it print out the current time whenever I is... |
{"title":"How to get first 5 characters from string","tags":["php","substring"],"question_text":"How to get first 5 characters from string using php\n`$myStr = \"HelloWordl\";`\nresult should be like this\n`$result = \"Hello\";`","answer_text":"For\nsingle-byte strings\n(e.g. US-ASCII, ISO 8859 family, etc.) use\n`subs... |
{"title":"Android - startActivityForResult immediately triggering onActivityResult","tags":["android","android-activity"],"question_text":"I am launching activities from the main activity in my app using the call\n`startActivityForResult(intent, ACTIVITY_TYPE)`\n, and they are all working but one.\nThis one, when calle... |
{"title":"Rename a table in MySQL","tags":["mysql","database","table-rename"],"question_text":"Renaming a table is not working in MySQL\n`RENAME TABLE group TO member;`\nThe error message is\n`#1064 - You have an error in your SQL syntax; check the manual that corresponds\n to your MySQL server version for the right sy... |
{"title":"Java's Virtual Machine and CLR","tags":["java",".net","bytecode","cil","vm-implementation"],"question_text":"As a sort of follow up to the question called\nDifferences between MSIL and Java bytecode?\n, what is the (major) differences or similarity in how the Java Virtual Machine works versus how the\n.NET Fr... |
{"title":"Git - push current branch shortcut","tags":["git"],"question_text":"Is there a shortcut to tell Git to push the current tracking branch to origin?\nNote:\nI know that I can change the\ndefault push behavior\n, but I am looking for an ad-hoc solution that does not change the default behavior.\nFor example, sup... |
{"title":"Angular directive with default options","tags":["javascript","angularjs","angularjs-directive","options","default-value"],"question_text":"I'm just starting with angularjs, and am working on converting a few old JQuery plugins to Angular directives. I'd like to define a set of default options for my (element)... |
{"title":"Compiler error: Method with Objective-C selector conflicts with previous declaration with the same Objective-C selector","tags":["swift"],"question_text":"I am starting to learn Swift, and have been following the very good Stanford University video lectures on YouTube. Here is a link if you are interested or ... |
{"title":"LINQ: Not Any vs All Don't","tags":["c#",".net","performance","linq","resharper"],"question_text":"Often I want to check if a provided value matches one in a list (e.g. when validating):\n`if (!acceptedValues.Any(v => v == someValue))\n{\n \/\/ exception logic\n}`\nRecently, I've noticed ReSharper asking me t... |
{"title":"twitter bootstrap autocomplete dropdown \/ combobox with Knockoutjs","tags":["autocomplete","combobox","twitter-bootstrap","knockout.js","html.dropdownlistfor"],"question_text":"I have a requirement where I HAVE TO use bootstrap autocomplete dropdown, BUT user can have free form text in that dropdown if they ... |
{"title":"Daemon Threads Explanation","tags":["python","multithreading"],"question_text":"In the\nPython documentation\nit says:\nA thread can be flagged as a \"daemon thread\". The significance of this\n flag is that the entire Python program exits when only daemon threads\n are left. The initial value is inherited fr... |
{"title":"In Subversion can I be a user other than my login name?","tags":["svn","authentication","username"],"question_text":"I'd like to know how to get\n`Subversion`\nto change the name that my changes appear under.\nI'm just starting to use\n`Subversion`\n. I'm currently using it to version control code on an XP la... |
{"title":"Valid values for android:fontFamily and what they map to?","tags":["android","fonts","styles"],"question_text":"In the answer to\nthis question\nthe user lists values for\n`android:fontFamily`\nand 12 variants (see below). Where do these values come from? The documentation for\n`android:fontFamily`\ndoes not ... |
{"title":"How to force a html5 form validation without submitting it via jQuery","tags":["jquery","html5","validation"],"question_text":"I have this form in my app and I will submit it via AJAX, but I want to use HTML5 for client-side validation. So I want to be able to force the form validation, perhaps via jQuery.\nI... |
{"title":"jquery append to front\/top of list","tags":["jquery"],"question_text":"I have this unordered list\n`<ul>\n <li>two<\/li>\n <li>three<\/li>\n<\/ul>`\nIs there a way I can prepend to the unordered list so that it ends up like this?\n`<ul>\n <li>ONE<\/li>\n <li>two<\/li>\n <li>three<\/li>\n<\/ul>`\nNotice the \... |
{"title":"Pushing app to heroku problem","tags":["ruby-on-rails","ruby","hosting","heroku"],"question_text":"I am trying to push my app to heroku and I get the following message:\n`$ heroku create\nCreating electric-meadow-15..... done\nCreated http:\/\/electric-meadow-15.heroku.com\/ | git@heroku.com:electric-meadow-1... |
{"title":"jQuery - replace all instances of a character in a string","tags":["jquery","string","replace"],"question_text":"This does not work and I need it badly\n`$('some+multi+word+string').replace('+', ' ' );`\nalways gets\n`some multi+word+string`\nit's always replacing for the first instance only, but I need it to... |
{"title":"Update Angular model after setting input value with jQuery","tags":["jquery","angularjs","bind","directive"],"question_text":"I have this simple scenario:\n- input element which value is changed by jQuery's val() method\nI am trying to update the angular model with the value that jQuery set. I tried to write ... |
{"title":"What is the correct syntax for 'else if'?","tags":["python","python-3.x"],"question_text":"I'm a new Python programmer who is making the leap from 2.6.4 to 3.1.1. Everything has gone fine until I tried to use the 'else if' statement. The interpreter gives me a syntax error after the 'if' in 'else if' for a re... |
{"title":"How to select first and last TD in a row?","tags":["css","css-selectors"],"question_text":"How can you select the first and the last\n`TD`\nin a row?\n`tr > td[0],\ntr > td[-1] {\n\/* styles *\/\n}`","answer_text":"You could use the\n`:first-child`\nand\n`:last-child`\npseudo-selectors:\n`tr td:first-child,\n... |
{"title":"How to avoid passing parameters everywhere in play2?","tags":["playframework-2.0"],"question_text":"In play1, I usually get all data in actions, use them directly in views. Since we don't need to explicitly declare parameters in view, this is very easy.\nBut in play2, I found we have to declare all the parame... |
{"title":"How to disable word-wrap in Xcode 4 editor?","tags":["editor","word-wrap","xcode4"],"question_text":"I can't find how to disable word-wrap in Xcode 4 editor. How can I do it?","answer_text":"Go to\n`Xcode Preferences -> Text Editing -> Indentation`\nand deselect\n`Line wrapping`\n.","question_code":[],"answer... |
{"title":"Search in all files in a project in Sublime Text 3","tags":["sublimetext","sublimetext3"],"question_text":"Is there a way to search for a string in all files in a Python project in Sublime Text 3? The string is not a method.","answer_text":"You can search a directory using\n`Find`\n\u00e2\u0086\u0092\n`Find i... |
{"title":"How to clear python interpreter console?","tags":["windows","console","clear","python"],"question_text":"Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.\nLike any console, after a while the visible backlo... |
{"title":"How to have jQuery restrict file types on upload?","tags":["javascript","jquery","file-upload","file-type"],"question_text":"I would like to have jQuery limit a file upload field to only jpg\/jpeg, png, and gif. I am doing backend checking with\n`PHP`\nalready. I am running my submit button through a\n`JavaSc... |
{"title":"Close Bootstrap Modal","tags":["jquery","twitter-bootstrap","modal-dialog"],"question_text":"I have a bootstrap modal dialog box that I want to show initially, then when the user clicks on the page, it disappears. I have the following:\n`$(function () {\n $('#modal').modal(toggle)\n});\n <div class=\"modal\" ... |
{"title":"ComboBox: Adding Text and Value to an Item (no Binding Source)","tags":["c#","winforms","combobox"],"question_text":"In C# WinApp, how can I add both Text and Value to the items of my ComboBox?\nI did a search and usually the answers are using \"Binding to a source\".. but in my case I do not have a binding s... |
{"title":"How do I \"commit\" changes in a git submodule?","tags":["git","git-submodules"],"question_text":"I have, in my naivety, set up a git submodule and treated it like a Subversion external - i.e. it's now full of changes that I've just realized haven't been committed or pushed anywhere.\nIs there some easy way t... |
{"title":"How can I put a ListView into a ScrollView without it collapsing?","tags":["android","android-listview","android-scrollview"],"question_text":"I've searched around for solutions to this problem, and the only answer I can find seems to be \"\ndon't put a ListView into a ScrollView\n\". I have yet to see any re... |
{"title":"Why does the smallest int, \u00e2\u0088\u00922147483648, have type 'long'?","tags":["c","types"],"question_text":"For a school project, I've to code the C function printf. Things are going pretty well, but there is one question I can't find a good answer to, so here I am.\n`printf(\"PRINTF(d) \\t: %d\\n\", -2... |
{"title":"What exactly does git's \"rebase --preserve-merges\" do (and why?)","tags":["git","git-rebase"],"question_text":"Git's\ndocumentation for the\n`rebase`\ncommand\nis quite brief:\n`--preserve-merges\n Instead of ignoring merges, try to recreate them.\nThis uses the --interactive machinery internally, but combi... |
{"title":"Is Python strongly typed?","tags":["python","strong-typing","weak-typing"],"question_text":"I've come across links that say Python is a strongly typed language.\nHowever, I thought in strongly typed languages you couldn't do this :\n`bob = 1\nbob = \"bob\"`\nI thought a strongly typed language didn't accept t... |
{"title":"Android Database Transaction","tags":["android","sqlite","transactions"],"question_text":"I have created database. I want to do the Transaction.\n`SaveCustomer()`\ncontain more than one statement to insert records to\n`Customer, CustomerControl, Profile,Payment`\ntable at that time.\nWhen user call\n`SaveCust... |
{"title":"How do I convert NSInteger to NSString datatype?","tags":["iphone"],"question_text":"How does one convert\n`NSInteger`\nto the\n`NSString`\ndatatype?\nI tried the following, where month is an\n`NSInteger`\n:\n`NSString *inStr = [NSString stringWithFormat:@\"%d\", [month intValue]];`","answer_text":"NSIntegers... |
{"title":"Html.BeginForm and adding properties","tags":["asp.net-mvc"],"question_text":"How would I go about adding\n`enctype=\"multipart\/form-data\"`\nto a form that is generated by using\n`<% Html.BeginForm(); %>`\n?","answer_text":"As part of htmlAttributes,e.g.\n`Html.BeginForm(\n action, controller, FormMethod.Po... |
{"title":"Get all table names of a particular database by SQL query?","tags":["sql","sql-server"],"question_text":"I am working on application which can deal with multiple database servers like \"MySQL\" and \"MS SQL Server\".\nI want to get tables' names of a particular database using a general query which should suit... |
{"title":"How to explain Katana and OWIN in simple words and uses?","tags":["asp.net","iis","owin","katana"],"question_text":"I have read many articles about the OWIN and Katana projects, but I could not get the whole picture of it.\nFor a normal web developer who uses ASP.NET:\nWhat exactly is OWIN and what problems d... |
{"title":"Text Progress Bar in the Console","tags":["python","console","progress","updating"],"question_text":"Is there a good way to do the following?\nI wrote a simple console app to upload and download files from an FTP server using the ftplib.\nEach time some data chunks are downloaded, I want to update a text prog... |
{"title":"How do I select text nodes with jQuery?","tags":["javascript","jquery","dom"],"question_text":"I would like to get all descendant text nodes of an element, as a jQuery collection. What is the best way to do that?","answer_text":"jQuery doesn't have a convenient function for this. You need to combine\n`content... |
{"title":"Convert HTML to NSAttributedString in iOS","tags":["iphone","objective-c","cocoa-touch","core-text","nsattributedstring"],"question_text":"I am using a instance of\n`UIWebView`\nto process some text and color it correctly, it gives the result as HTML but rather than displaying it in the\n`UIWebView`\nI want t... |
{"title":"How can I get a list of all classes within current module in Python?","tags":["python","reflection","inspect"],"question_text":"I've seen plenty of examples of people extracting all of the classes from a module, usually something like:\n`# foo.py\nclass Foo:\n pass\n# test.py\nimport inspect\nimport foo\nfor ... |
{"title":"In Ruby on Rails, how do I format a date with the \"th\" suffix, as in, \"Sun Oct 5th\"?","tags":["ruby-on-rails","ruby","date"],"question_text":"I want to display dates in the format: short day of week, short month, day of month without leading zero but including \"th\", \"st\", \"nd\", or \"rd\" suffix.\nFo... |
{"title":"How can I reload .emacs after changing it?","tags":["emacs"],"question_text":"How can I get Emacs to reload all my definitions that I have updated in\n`.emacs`\nwithout restarting Emacs?","answer_text":"You can use the command load-file (\nM-x\n`load-file`\n, then press return twice to accept the default file... |
{"title":"how to add nil to nsmutablearray?","tags":["iphone","objective-c","nsmutablearray",null],"question_text":"`NSArray *array = [[NSArray alloc] initWithObjects:@\"\u00ce\u0095\u00ce\u009b\u00ce\u00a4\u00ce\u0091\",\n @\"\u00ce\u0095\u00ce\u009b\u00ce\u00a4\u00ce\u0091 COURIER\", @\"ACS\", @\"ACS \u00ce\u0095\u00... |
{"title":"Nginx 403 forbidden for all files","tags":["nginx","centos","http-status-code-403","php"],"question_text":"I have nginx installed with PHP-FPM on a CentOS 5 box, but am struggling to get it to serve any of my files - whether PHP or not.\nNginx is running as www-data:www-data, and the default \"Welcome to ngin... |
{"title":"How to set time zone of mysql?","tags":["mysql","timezone"],"question_text":"on one server,when I run:\n`mysql> select now();\n+---------------------+\n| now() |\n+---------------------+\n| 2009-05-30 16:54:29 | \n+---------------------+\n1 row in set (0.00 sec)`\non another server:\n`mysql> select now();\n+-... |
{"title":"Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3","tags":["css","twitter-bootstrap-3"],"question_text":"I'm now reading documentation on Twitter Bootstrap 3, and tried to follow column ordering as shown in\nthis page\nbut hit the wall. I don't understand why such a code works... |
{"title":"store and retrieve a class object in shared preference","tags":["android","object","sharedpreferences"],"question_text":"In Android can we store an object of a class in shared preference and retrieve the object later?\nIf it is possible how to do it? If it is not possible what are the other possibilities of d... |
{"title":"How to conditionally push an item in an observable array?","tags":["knockout.js"],"question_text":"I would like to\n`push`\na new item onto an\n`observableArray`\n, but only if the item is not already present. Is there any \"find\" function or recommended pattern for achieving this in KnockoutJS?\nI've notice... |
{"title":"Create a CSS rule \/ class with jQuery at runtime","tags":["jquery","css"],"question_text":"Usually I have a CSS file which has the following rule:\n`#my-window {\n position: fixed;\n z-index: 102;\n display:none;\n top:50%;\n left:50%;\n}`\nHow can I avoid creating such a static CSS file by adding the CSS in... |
{"title":"Resize an Image C#","tags":["c#","image","resize"],"question_text":"As\n`Size`\n,\n`Width`\n,\n`Height`\nare Get() properties of System.Drawing.Image,\nHow can I resize an Image object at run-time in C#.\nRight now, I am just creating a new\n`Image`\nusing:\n`\/\/ objImage is the original Image\nBitmap objBit... |
{"title":"Recommended website resolution (width and height)?","tags":["browser","standards","resolution"],"question_text":"Is there any standard on common website resolution?\nWe are targeting newer monitors, perhaps at least 1280px wide, but the height may varies, and each browser may have different toolbar heights to... |
{"title":"How can i use iptables on centos 7?","tags":["networking","centos","iptables","systemd"],"question_text":"I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for\n`httpd`\nservice, but something wrong with my iptables service ... what's wrong with it? What am I doing ... |
{"title":"How to tell if browser\/tab is active","tags":["javascript","jquery"],"question_text":"Possible Duplicate:\nIs there a way to detect if a browser window is not currently active?\nI have a function that is called every second that I only want to run if the current page is in the foreground, i.e. the user hasn'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.