text
stringlengths
74
309k
{"title":"How do I list all the columns in a table?","tags":["sql","mysql","sql-server","database","oracle"],"question_text":"For the various popular database systems, how do you list all the columns in a table?","answer_text":"DESCRIBE name_of_table;","question_code":[],"answer_code":[],"retrieval_text":"\n### TITLE:\...
{"title":"Creating metro style winform in windows 7 using C#","tags":["c#","winforms","microsoft-metro"],"question_text":"Is it possible to design a metro styled winform in visual studio 10 or visual studio 11 on windows 7? If so, where can I find info on how to do it? I have already found some links, like\nhttp:\/\/ms...
{"title":"Specified VM install not found: type Standard VM, name jre7","tags":["java","eclipse","ant"],"question_text":"Specified VM install not found: type Standard VM, name jre7\nHave you ever encountered this problem in Eclipse while building an ant file? Then this article is for you. Deleting and recreating the wor...
{"title":"Dynamically loading css stylesheet doesn't work on IE","tags":["javascript","jquery","html","css","internet-explorer"],"question_text":"I dynamically load a css stylesheet (with a little help from jQuery) like this:\n`var head = document.getElementsByTagName('head')[0];\n$(document.createElement('link'))\n .a...
{"title":"php variables in anonymous functions","tags":["php","function","variables","global-variables","anonymous"],"question_text":"I was playing around with anonymous functions in PHP and realized that they don't seem to reach variables outside of them.\nIs there any way to get around this problem?\nExample:\n`$vari...
{"title":"Moving matplotlib legend outside of the axis makes it cutoff by the figure box","tags":["python","matplotlib","legend"],"question_text":"I'm familiar with the following questions:\nMatplotlib savefig with a legend outside the plot\nHow to put the legend out of the plot\nIt seems that the answers in these ques...
{"title":"Where does Android emulator store SQLite database?","tags":["android","sqlite"],"question_text":"I'm working on an Android application that stores data in a SQLite database. My question is, where does this database file get stored on the filesystem when you're using an emulator?\nI have seen that it's stored ...
{"title":"How to study design patterns?","tags":["design-patterns"],"question_text":"I have read around 4-5 books on design patterns, but still I dont feel I have come closer to intermediate level in design patterns?\nHow should I go studying design patterns?\nIs there any best book for design pattern?\nI know this wil...
{"title":"optional POST parameter in spring MVC?","tags":["spring-mvc"],"question_text":"I have the following code:\n`@RequestMapping(method = RequestMethod.POST)\npublic ModelAndView editItem(String name, String description)`\nHowever, sometime description is not passed in (this is a simplified example than the real o...
{"title":"Powershell Hard and Soft Links","tags":["powershell","symlink"],"question_text":"Can Powershell 1.0 create hard and soft links analogous to the unix variety? If this isn't built in, can someone point me to a site that has a ps1 script that mimics this? This is a nessary function of any good shell, IMHO. :)","...
{"title":"Difference between Role and GrantedAuthority in Spring Security","tags":["java","spring","spring-security"],"question_text":"There are concepts and implementations in Spring Security, such as the\n`GrantedAuthority`\ninterface to get an\nauthority\nto authorize\/control an access.\nI would like that to permis...
{"title":"Convert NSString to NSInteger?","tags":["iphone","nsstring","nsinteger"],"question_text":"I want to convert\n`string`\n`data`\nto\n`NSInteger`\n.","answer_text":"If the string is a human readable representation of a number, you can do this:\n`NSInteger myInt = [myString intValue];`","question_code":[],"answer...
{"title":"Is there a method to clone an array in jQuery?","tags":["javascript","jquery","arrays","clone"],"question_text":"This is my code :\n`var a=[1,2,3]\nb=$.clone(a)\nalert(b)`\nDoesn't jQuery have a 'clone' method? How can I clone an array using jQuery?","answer_text":"Just use\n`Array.prototype.slice`\n.\n`a = [...
{"title":"Good beginners tutorial to socket.io?","tags":["javascript","html5","node.js","websocket"],"question_text":"I am very new to the world of webdevelopment and jumped into the bandwagon because I find the concept of HTML5 very interesting. I am fairly confident on working with canvas and would now like to move o...
{"title":"String.Replace ignoring case","tags":["c#","string"],"question_text":"I have a string called \"hello world\"\nI need to replace the word \"world\" to \"csharp\"\nfor this I use:\n`string.Replace(\"World\", \"csharp\");`\nbut as a result, I don't get the string replaced. The reason is case sensitiveness. The o...
{"title":"Reverting part of a commit with git","tags":["git","git-cvs"],"question_text":"I want to revert a particular commit in git. Unfortunately, our organization still uses CVS as a standard, so when I commit back to CVS multiple git commits are rolled into one. In this case I would love to single out the original ...
{"title":"How do I pull my project from github?","tags":["git","github"],"question_text":"I have a project on github that I have been working on before. However, I wiped out my computer and I am wondering which git command should I invoke under my username to checkout my project again so that I can push my latest chang...
{"title":"Why isn't Smalltalk popular?","tags":["smalltalk","squeak"],"question_text":"I\u00e2\u0080\u0099ve been looking at Smalltalk (VisualWorks) for the past couple of months - and the more I learn the more I\u00e2\u0080\u0099m impressed. However, I think I must be missing something as Smalltalk doesn\u00e2\u0080\u...
{"title":"What is the best way to uninstall gems from a rails3 project?","tags":["ruby-on-rails-3","uninstall","bundler"],"question_text":"I installed all of my gems using bundler via the Gemfile. I thought (mistakenly) that if I deleted a gem from my Gemfile and ran 'bundle install' that the deleted gems would be unin...
{"title":"Can I use Class.newInstance() with constructor arguments?","tags":["java","constructor"],"question_text":"I would like to use\n`Class.newInstance()`\nbut the class I am instantiating does not have a nullary constructor. Therefore I need to be able to pass in constructor arguments. Is there a way to do this?",...
{"title":"How can I efficiently download a large file using Go?","tags":["go"],"question_text":"Is there a way to download a large file using Go that will store the content directly into a file instead of storing it all in memory before writing it to a file? Because the file is so big, storing it all in memory before w...
{"title":"Xcode 6 Beta: No such module 'Cocoa'","tags":["xcode","swift"],"question_text":"I'm trying to use the standard Cocoa library in a swift file in Xcode 6 Beta. I followed\nthis instructions\nbut when I import the library\n`import Cocoa`\nXCode complains with the error\n`No such module 'Cocoa'`\nI also tried wit...
{"title":"Printing mongodb shell output to File","tags":["javascript","mongodb","shell"],"question_text":"I want to pretty print the results of a mongodb find() to a file. The json object is too large so i am not able to view the entire object with the shell window size.\nIs there a way to 'pretty' print the results to...
{"title":"AngularJS Directives: Change $scope not reflected in UI","tags":["javascript","angularjs"],"question_text":"I'm trying to making some custom elements with AngularJS's and bind some events to it, then I notice $scope.var won't update UI when used in a binding function.\nHere is a simplified example that descri...
{"title":"How do I calculate percentiles with python\/numpy?","tags":["python","numpy","percentile"],"question_text":"Is there a convenient way to calculate percentiles for a sequence or single-dimensional numpy array?\nI am looking for something similar to Excel's percentile function.\nI looked in NumPy's statistics r...
{"title":"Default values in a C Struct","tags":["c","initialization"],"question_text":"I have a data structure like this:\nstruct foo {\n int id;\n int route;\n int backup_route;\n int current_route;\n }\nand a function called update() that is used to request changes in it.\nupdate(42, dont_care, dont_care, new_route);...
{"title":"git diff between cloned and original remote repository","tags":["git","version-control","github"],"question_text":"I have cloned a github repository and made no changes locally. Github repository moved forward with commits on the same branch.\nHow do I find a diff between my local repository and the original ...
{"title":"Using GroupBy, Count and Sum in LINQ Lambda Expressions","tags":["linq","count","lambda","group-by","sum"],"question_text":"I have a collection of boxes with the properties weight, volume and owner.\nI want to use LINQ to get a summarized list (by owner) of the box information\ne.g.\n`**Owner, Boxes, Total We...
{"title":"Is 1.0 a valid output from std::generate_canonical?","tags":["c++","c++11","random"],"question_text":"I always thought random numbers would lie between zero and one,\nwithout\n`1`\n, i.e. they are numbers from the half-open interval [0,1). The\ndocumention on cppreference.com\nof\n`std::generate_canonical`\nc...
{"title":"Fabric release XCode 6.3 codesign xcode-select","tags":["ios","xcode","release","ota","fabric-twitter"],"question_text":"I'm trying to upload a release to Fabric & I'm getting errors as follows. I'm using the XCode 6.3 (recently updated).\nXCode: 6.3\nFabric: 1.1.3\nOSX: 10.10.3\nWhat should I do to resolve a...
{"title":"Load RSA public key from file","tags":["java","openssl","rsa"],"question_text":"I've generated a private key with:\n`openssl genrsa [-out file] \u00e2\u0080\u0093des3`\nAfter this I've generated a public key with:\n`openssl rsa \u00e2\u0080\u0093pubout -in private.key [-out file]`\nI want to sign some message...
{"title":"How to add facebook share button on my website?","tags":["javascript","facebook","facebook-javascript-sdk","share","facebook-social-plugins"],"question_text":"I have this code that suppose to work, but doesn't work. If this helps you in anyway that would be great.\n`<script src='http:\/\/connect.facebook.net\...
{"title":"jQuery send string as POST parameters","tags":["ajax","post","jquery"],"question_text":"I want to send a string as an ajax Post parameter.\nThe following code:\n`$.ajax({\n type: \"POST\",\n url: \"http:\/\/nakolesah.ru\/\",\n data: 'foo=bar&ca$libri=no$libri',\n success: function(msg){\n alert('wow'+msg);\n ...
{"title":"How do I programmatically remove an existing rule that was defined in XML?","tags":["android","android-layout","relativelayout","layoutparams"],"question_text":"I have a linear layout that is contained inside a relative layout. \nIt is set in the XML file to be to the right of another linear layout (this work...
{"title":"VBA - how to conditionally skip a for loop iteration","tags":["vba","conditional","loops"],"question_text":"I have a for loop over an array. What I want to do is test for a certain condition in the loop and skip to the next iteration if true:\n`For i = LBound(Schedule, 1) To UBound(Schedule, 1)\n If (Schedule...
{"title":"Creating a jQuery object from a big HTML-string","tags":["javascript","jquery","html"],"question_text":"I have a big HTML-string containing multiple child-nodes.\nIs it possible to construct a\njQuery\nDOM object using this string?\nI've tried\n`$(string)`\nbut it only returns an array containing all the indi...
{"title":"How to understand the `terminal` of directive?","tags":["angularjs","angularjs-directive"],"question_text":"In this page:\nhttp:\/\/docs.angularjs.org\/guide\/directive\nDirective Definition Object\nterminal\nIf set to true then the current priority will be the last set of directives which will execute (any d...
{"title":"What is the javascript MIME type for the type attribute of a script tag?","tags":["javascript","mime-types"],"question_text":"What is the\nMIME\ntype of javascript?\nMore specifically, what is the right thing to put in the \"type\" attribute of a script tag?\n`application\/x-javascript`\nand\n`text\/javascrip...
{"title":"Devise logging out automatically after password change","tags":["ruby-on-rails"],"question_text":"In Devise, if I change user's password and after it gets updated in the db, the site immediately logs out the user. I don't want this behavior - how do i do that. please help.","answer_text":"I had the same probl...
{"title":"Does \"git fetch --tags\" include \"git fetch\"?","tags":["git","fetch","pull","git-tag"],"question_text":"A nice and simple question - is the function of \"git fetch\" a strict sub-set of\n`git fetch --tags`\n?\nI.e. if I run\n`git fetch --tags`\n, is there ever a reason to immediately run\n`git fetch`\nstra...
{"title":"\"The test form is only available for requests from the local machine.\"","tags":[".net","web-services","security"],"question_text":"I created a Web Service in .Net and so the address of the service file has a nifty auto generated explanation about how it works. When I run the page from the machine it's hoste...
{"title":"Any way to select without causing locking in MySQL?","tags":["mysql","locking"],"question_text":"Query:\n`SELECT COUNT(online.account_id) cnt from online;`\nBut online table is also modified by an event, so frequently I can see lock by running\n`show processlist`\n.\nIs there any grammar in MySQL that can mak...
{"title":"How can I strip all punctuation from a string in JavaScript using regex?","tags":["javascript","regex"],"question_text":"If I have a string with any type of non-alphanumeric character in it:\n`\"This., -\/ is #! an $ % ^ & * example ;: {} of a = -_ string with `~)() punctuation\"`\nHow would I get a no-punctu...
{"title":"MySQL VARCHAR Lengths and UTF-8","tags":["mysql","unicode","utf-8","varchar"],"question_text":"In MySQL, if I create a new\n`VARCHAR(32)`\nfield in a UTF-8 table does it means I can store 32 bytes of data in that field or 32 chars (multi-byte)?","answer_text":"This answer showed up at the top of my google sea...
{"title":"Print commit message of a given commit in git","tags":["git","commit-message"],"question_text":"I need a plumbing command to print the commit message of one given commit - nothing more, nothing less.","answer_text":"It's not \"plumbing\", but it'll do exactly what you want:\n`$ git log --format=%B -n 1 <commi...
{"title":"How to force a UIViewController to Portait orientation in iOS 6","tags":["ios","xcode","xamarin.ios","apple","ios6"],"question_text":"As the\n`ShouldAutorotateToInterfaceOrientation`\nis deprecated in iOS 6 and I used that to force a particular view to\nportrait only\n, what is the correct way to do this in i...
{"title":"NSString containsString crashes","tags":["ios","nsstring"],"question_text":"I'm trying to filter an array according to one of it's string fields.\nBoth nameLower and filterLower has NSString value inside, and yet i keep getting:\n`__NSCFString containsString:]: unrecognized selector sent to instance 0x7f876b7...
{"title":"What is the 'cls' variable used in python classes?","tags":["python","class","object","self"],"question_text":"Why is 'cls' used instead of 'self'?\nAny help appreciated","answer_text":"The distinction between\n`\"self\"`\nand\n`\"cls\"`\nis defined in\n`PEP 8`\n. As Adrien said, this is not a mandatory. It's...
{"title":"Android-java- How to sort a list of objects by a certain value within the object","tags":["java","android","sorting","collections","comparator"],"question_text":"Im trying to sort through an arraylist of objects by a particular value within the object. What would be the best approach to do such a thing. Shoul...
{"title":"Advantages of Antlr (versus say, lex\/yacc\/bison)","tags":["c++","antlr","yacc","bison"],"question_text":"I've used lex and yacc (more usually bison) in the past for various projects, usually translators (such as a subset of EDIF streamed into an EDA app). Additionally, I've had to support code based on lex\...
{"title":"What is the JavaScript >>> operator and how do you use it?","tags":["javascript","operators","bit-shift"],"question_text":"I was looking at code from Mozilla that add a filter method to Array and it had a line of code that confused me.\n`var len = this.length >>> 0;`\nI have never seen >>> used in JavaScript ...
{"title":"Why is a public const method not called when the non-const one is private?","tags":["c++","function-overloading","overload-resolution"],"question_text":"Consider this code:\n`struct A\n{\n void foo() const\n {\n std::cout << \"const\" << std::endl;\n }\n private:\n void foo()\n {\n std::cout << \"non - const\...
{"title":"iPhone Could Not Support Development","tags":["iphone","xcode","ios","provisioning","organizer"],"question_text":"I recently reinstalled OSX. It has been a pain rounding up all of my certificates, etc, but I finally am back. However, when trying to install an app on either of two iPhones 3G's I have, they bot...
{"title":"Linq to SQL how to do \"where [column] in (list of values)\"","tags":["linq","linq-to-sql"],"question_text":"I have a function where I get a list of ids, and I need to return the a list matching a description that is associated with the id. E.g.:\n`public class CodeData\n{\n string CodeId {get; set;}\n string...
{"title":"Check what version of the app is being used","tags":["objective-c","cocoa-touch","ios","version-numbering"],"question_text":"Possible Duplicate:\nHow to display the current project version of my App to the user?\nIs there a way to check the version number of my app? Is it supplied somewhere once the app is in...
{"title":"Android emulator shows nothing except black screen and adb devices shows \"device offline\"","tags":["android-emulator"],"question_text":"I am just trying to start development in Android. \nSo, the problem is that when I try to launch an emulator by issuing the command\nemulator @A2\n, an emulator comes up on...
{"title":"How to apply bindValue method in LIMIT clause?","tags":["php","mysql","sql","pdo","bindvalue"],"question_text":"Here is a snapshot of my code:\n`$fetchPictures = $PDO->prepare(\"SELECT * \n FROM pictures \n WHERE album = :albumId \n ORDER BY id ASC \n LIMIT :skip, :max\");\n$fetchPictures->bindValue(':albumId...
{"title":"Why is string concatenation faster than array join?","tags":["javascript","performance","string-concatenation"],"question_text":"Today, I read\nthis thread\nabout speed of string concatenation.\nSurprisingly, string concatenation was the winner:\nhttp:\/\/jsben.ch\/#\/OJ3vo\nThe result was opposite from what ...
{"title":"Laravel stylesheets and javascript don't load for non-base routes","tags":["php","laravel","blade"],"question_text":"Okay--I know this is a really elementary issue, but I can't figure it out.\nThis is a question regarding Laravel.\nBasically, I have my stylesheets embedded in my default layout view. I'm curre...
{"title":"Check if value exists in dataTable?","tags":["c#"],"question_text":"I have DataTable with two columns Author, Bookname.\nI want to check if given string value Author already exists in DataTable. Is there some built in method to check it, like for Arrays array.contains ?","answer_text":"You can use\n`LINQ-to-D...
{"title":"What is the Android UiThread (UI thread)","tags":["android","ui-thread"],"question_text":"Can someone explain to me what exactly the UI thread is?\nOn developer.android.com it says about the runOnUiThread function\npublic final void runOnUiThread (Runnable action)\nSince: API Level 1 Runs the specified action...
{"title":"Force application to restart on first activity","tags":["android"],"question_text":"For an unknown reason, I can't get my application leaving properly so that when I push the home button and the app icon again, I resume where I was in the app.\nI would like to force the application to restart on the first Act...
{"title":"How to use javascript variables in jquery selectors","tags":["javascript","jquery"],"question_text":"How do I use the javascript variables as a parameter in a jquery selector?\n`<script type=\"text\/javascript\">\n$(function(){ \n $(\"input\").click(function(){\n var x = $(this).attr(\"name\");\n $(\"input[id...
{"title":"C#, List<T>.Contains() - too slow?","tags":[".net","arrays","generics","list"],"question_text":"Could anyone explain me why the generics list's Contains() function is so slow?\nI have a List with about a million numbers, and the code that is constantly checking if there's a specific number within these number...
{"title":"Disable auto correction of iPhone text field","tags":["objective-c","iphone","swift"],"question_text":"When I try to edit texts in my iPhone application (\n`UITextfield`\n), it auto-corrects my input.\nCould you let me know how can I disable this?","answer_text":"`UITextField* f = [[UITextField alloc] init];\...
{"title":"git push\/clone to new server","tags":["git"],"question_text":"Im just learning git and there is something I cant work out. After creating and using a git repository locally on my Mac, can I push a copy to another server somewhere else? I am behind a firewall so unfortunately I can't run\n`git clone`\nfrom th...
{"title":"Github \"Updates were rejected because the remote contains work that you do not have\"","tags":["github"],"question_text":"I created a new repo, cloned it, added files to the directory, added them with\n`add -A`\n, committed changes, and when I try to push using\n`git push <repo name> master`\nI get \"Updates...
{"title":"Building a complete online payment gateway like Paypal","tags":["paypal","payment-gateway","banking","onlinebanking"],"question_text":"So this question isn't about integrating an existing payment gateway into my site. This is more of a architectural question.\nI want to build a system similar to Paypal. Now I...
{"title":"Debugging App When Launched by Push Notification","tags":["iphone","push-notification"],"question_text":"I am currently developing an app that receives Push Notifications. I have this all working 100% through a PHP page. There are several different types of push notifications my app can receive. The PHP handl...
{"title":"What is the best way to determine the number of days in a month with javascript?","tags":["javascript","date"],"question_text":"I've been using this function but I'd like to know what's the most efficient and accurate way to get it.\n`function daysInMonth(iMonth, iYear) {\n return 32 - new Date(iYear, iMonth,...
{"title":"How can I use swift in Terminal?","tags":["xcode","swift","terminal","read-eval-print-loop"],"question_text":"I read\nWhat's new in Xcode 6\n. The article introduces some new feature about Xcode 6, and it says:\nCommand Line\nXcode\u00e2\u0080\u0099s debugger includes an interactive version of the Swift langu...
{"title":"How can I create an Asynchronous function in Javascript?","tags":["javascript","jquery","function","asynchronous"],"question_text":"I mean, check it out this\ncode\n:\n`<a href=\"#\" id=\"link\">Link<\/a>\n<span>Moving<\/span>\n$('#link').click(function () {\n console.log(\"Enter\");\n $('#link').animate({ wi...
{"title":"Is BCrypt a good hashing algorithm to use in C#? Where can I find it?","tags":["c#","hash","bcrypt","bcrypt.net"],"question_text":"I have read that when hashing a password, many programmers recommend using the BCrypt algorithm.\nI am programming in C# and is wondering if anyone knows of a good implementation ...
{"title":"How do you stop Console from popping up automatically in Eclipse","tags":["java","eclipse"],"question_text":"I have a web application running in eclipse with tomcat. and it has a few errors that make the console popup every few seconds. how do i stop it from automatically popping up(taking focus)","answer_tex...
{"title":"Override valueof() and toString() in Java enum","tags":["java","enums","override","tostring","value-of"],"question_text":"The values in my\n`enum`\nare words that need to have spaces in them, but enums can't have spaces in their values so it's all bunched up. I want to override\n`toString()`\nto add these spa...
{"title":"#1273 - Unknown collation: 'utf8mb4_unicode_ci' Cpanel","tags":["wordpress","phpmyadmin","cpanel"],"question_text":"I have a wordpress database on my local machine that I want to transfer to a hosted phpMyAdmin on Cpanel. However when I try to import the database into the environment, I keep getting this erro...
{"title":"Android: How to make all elements inside LinearLayout same size?","tags":["android","layout"],"question_text":"I would like to create a dialog to display a video title and tags. Below text I would like to add buttons View, Edit and Delete and make these elements same size. Does anyone know how to modify .xml ...
{"title":"Does \"display:none\" prevent an image from loading?","tags":["css","responsive-design"],"question_text":"Every responsive website development tutorial recommends using the\n`display:none`\nCSS property to hide content from loading on mobile browsers so the website loads faster. Is it true? Does\n`display:non...
{"title":"How to convert a Binary String to a base 10 integer in Java","tags":["java","string","binary","radix"],"question_text":"I have an array of Strings that represent Binary numbers (without leading zeroes) that I want to convert to their corresponding base 10 numbers. Consider:\n`binary 1011 becomes integer 11\nb...
{"title":"OpenVPN failed connection \/ All TAP-Win32 adapters on this system are currently in use","tags":["windows","networking","adapter","vpn","openvpn"],"question_text":"^^\ni get this error if i would connect to any OpenVPN Network.\n`All TAP-Win32 adapters on this system are currently in use.`\nHere is a Screensh...
{"title":"Public Fields versus Automatic Properties","tags":["c#","class","properties","field","automatic-properties"],"question_text":"We're often told we should protect encapsulation by making getter and setter methods (properties in C#) for class fields, instead of exposing the fields to the outside world.\nBut ther...
{"title":"Reset select2 value and show placeholdler","tags":["jquery","twitter-bootstrap","jquery-select2"],"question_text":"How do I set the placeholder on value reset by select2. In my example If locations or grade select boxes are clicked and my select2 has a value than the value of select2 should reset and show the...
{"title":"Use cases for the 'setdefault' dict method","tags":["python","dictionary","setdefault"],"question_text":"The addition of\n`collections.defaultdict`\nin Python 2.5 greatly reduced the need for\n`dict`\n's\n`setdefault`\nmethod. This question is for our collective education:\nWhat is\n`setdefault`\nstill useful...
{"title":"Does \"std::size_t\" make sense in C++?","tags":["c++","size-t"],"question_text":"In some code I've inherited, I see frequent use of\n`size_t`\nwith the\n`std`\nnamespace qualifier. For example:\n`std::size_t n = sizeof( long );`\nIt compiles and runs fine, of course. But it seems like bad practice to me (per...
{"title":"What does a type followed by _t (underscore-t) represent?","tags":["c","naming-conventions","types"],"question_text":"This seems like a simple question, but I can't find it with the Stack Overflow search or Google. What does a type followed by a\n`_t`\nmean? Such as\n`int_t anInt;`\nI see it a lot in C code m...
{"title":"WebBrowser Control in a new thread","tags":["c#","multithreading","browser"],"question_text":"I have a list Uri's that I want \"clicked\" To achieve this I\"m trying to create a new web-browser control per Uri. I create a new thread per Uri. The problem I'm having is the thread end before the document is full...
{"title":"Changing UIImage color","tags":["iphone","objective-c","ios","uiimage","cgcontext"],"question_text":"I'm trying to change color of UIImage. My code:\n`-(UIImage *)coloredImage:(UIImage *)firstImage withColor:(UIColor *)color {\n UIGraphicsBeginImageContext(firstImage.size);\n CGContextRef context = UIGraphics...
{"title":"How to setup a basic ruby project?","tags":["ruby","project-structure"],"question_text":"I want to create a small ruby project with 10-20 classes \/ files. I need some gems and I want to use rspec as test framework.\nI might want to build a gem later on, but that is not certain.\nIs there some Howto or Guide ...
{"title":"Will Emacs make me a better programmer?","tags":["emacs","text-editor","vi"],"question_text":"Steve Yegge wrote\na comment on his blog\n:\nAll of the greatest engineers in the\n world use Emacs. The world-changer\n types. Not the great gal in the cube\n next to you. Not Fred, the amazing guy\n down the hall. ...
{"title":"node.js, socket.io with SSL","tags":["ssl","node.js","https","websocket","socket.io"],"question_text":"I'm trying to get socket.io running with my SSL certificate however, it will not connect.\nI based my code off the chat example:\n`var https = require('https');\nvar fs = require('fs');\n\/**\n * Bootstrap a...
{"title":"Android - How Do I Set A Preference In Code","tags":["android"],"question_text":"I have an Android application in which I have my preferences in a xml file, which works fine. I've now want to set one of the preferences using code instead of displaying the entire preference screen, how would I go about doing t...
{"title":"Is it possible to use Swift's Enum in Obj-C?","tags":["objective-c","enums","swift"],"question_text":"I'm trying to convert some of my Obj-C class to Swift. And some other Obj-C classes still using enum in that converted class. I searched In the Pre-Release Docs and couldn't find it or maybe I missed it. Is t...
{"title":"C\/C++ Struct vs Class","tags":["c++","class","struct"],"question_text":"After finishing my C++ class it seemed to me the structs\/classes are virtually identical except with a few minor differences.\nI've never programmed in C before; but I do know that it has structs. In C is it possible to inherit other st...
{"title":"Setting Environment Variables in Rails 3 (Devise + Omniauth)","tags":["ruby-on-rails","ruby-on-rails-3","environment-variables","omniauth","railscasts"],"question_text":"I've been trying to figure out how Ryan Bates, in his\nFacebook Authentication screencast\n, is setting the following \"FACEBOOK_APP_ID\" an...
{"title":"default session timeout for Apache Tomcat applications","tags":["java","apache","session-timeout","tomcat5.5"],"question_text":"What is the default session timeout for web applications deployed on Tomcat5.5 ? Is it browser specific? In my web applications default timeout is mentioned neither in web.xml nor in...
{"title":"How to get Url Hash (#) from server side","tags":["asp.net","url","fragment-identifier"],"question_text":"I know on client side (javascript) you can use windows.location.hash but could not find anyway to access from the server side.","answer_text":"We had a situation where we needed to persist the URL hash ac...
{"title":"How to write URLs in Latex?","tags":["latex"],"question_text":"How do you write a URL in Latex?\nThe subscripts and everything else make the font look very strange when it compiles.","answer_text":"You can use\n`\\url`\n`\\usepackage{hyperref}\n\\url{http:\/\/stackoverflow.com\/}`","question_code":[],"answer_...
{"title":"How can I concatenate regex literals in JavaScript?","tags":["javascript","regex","syntax"],"question_text":"Is it possible to do something like this?\n`var pattern = \/some regex segment\/ + \/* comment here *\/\n \/another segment\/;`\nOr do I have to use new\n`RegExp()`\nsyntax and concatenate a string? I'...
{"title":"How to select all textareas and textboxes using jQuery?","tags":["javascript","jquery"],"question_text":"How can I select all textboxes and textareas, e.g:\n`<input type='text' \/>`\nand\n`<textarea><\/textarea>`\non a page and have the property\n`style.width=\"90%\";`\napplied to them?","answer_text":"`$('in...
{"title":"Object.is vs ===","tags":["javascript","ecmascript-6"],"question_text":"I stumbled upon a code example which was using this comparison:\n`var someVar = 0;\nObject.is(false, someVar); \/\/Returns false`\nI know\n`false == 0`\nwill be\n`true`\nthat's why we have\n`===`\n.\nHow is\n`Object.is`\ndifferent from\n`...