text
stringlengths
74
309k
{"title":"Component wont render within NavigatorIOS - React Native","tags":["ios","reactjs","native"],"question_text":"I cant get this simple NavigatorIOS test to work. The console log in My View triggeres, and I can get it to render if I skip the NavigatorIOS component, and render MyView directly. However, when MyView...
{"title":"IOS: How to put some view on top of presented modal view controller?","tags":["iphone","objective-c","xcode","cocoa","uiview"],"question_text":"I have an activity view that I have added in AppDelegate class to tap bar:\n`[self.mainTabBar.view addSubview: spinner];`\nWhen there are connection problems it is vi...
{"title":"MySQL - SELECT all columns WHERE one column is DISTINCT","tags":["mysql","sql"],"question_text":"I'm very sorry if the question seems too basic.\nI've surfed entire Internet and StackOverflow for a finished solution, and did not find anything that I can understand, and can't write it myself, so have to ask it...
{"title":"Accessing inherited scope with Controller As approach","tags":["angularjs","angularjs-scope","angularjs-controller"],"question_text":"With the original way to define controllers\n, accessing the parent's scope was fairly trivial, since the child scope prototypically inherits from its parent.\n`app.controller(...
{"title":"How do I escape some html in javascript?","tags":["javascript","html-encode"],"question_text":"Given the text\n`<b>This is some text<\/b>`\nI want to write it to my page so that it shows up like this:\n`<b>This is some text<\/b>`\nand not like this\nThis is some text\nusing\n`escape(\"<b>This is some text<\/b...
{"title":"Is there a way to check if geolocation has been DECLINED with Javascript?","tags":["javascript","html5","w3c-geolocation"],"question_text":"I need JavaScript to display a manual entry if geolocation is declined.\nWhat I have tried:\n`Modernizr.geolocation\nnavigator.geolocation`\nNeither describes if user has...
{"title":"How to use transactions with the Entity Framework?","tags":["entity-framework","transactions"],"question_text":"When you have code like this:\n`Something something = new Something();\nBlahEntities b = new BlahEntities() \nb.AddToSomethingSet(something);\nb.SaveChanges();`\nhow do run that addition inside a tr...
{"title":"Is there a low-level difference between int[large][small] or int[small][large] in Java?","tags":["java","arrays","memory","multidimensional-array","jvm"],"question_text":"This question will probably require some compiler knowledge to answer. I am currently working on a project where I will be creating an arra...
{"title":"How to set up unit testing for Visual Studio C++","tags":["c++","visual-studio","unit-testing","testing"],"question_text":"I'm having trouble figuring out how to get the testing framework set up and usable in Visual Studio 2008 for C++ presumably with the built-in unit testing suite.\nAny links or tutorials w...
{"title":"JIRA JQL searching by date - is there a way of getting Today() (Date) instead of Now() (DateTime)","tags":["date","search","jira","jql"],"question_text":"I am trying to create some Issue Filters in JIRA based on\n`CreateDate`\n.\nThe only date\/time function I can find is\n`Now()`\nand searches relative to th...
{"title":"How to route without a templateUrl?","tags":["url","angularjs","logout"],"question_text":"Ok. I have a url setup to log a user out. On the server, there is no html. The session on the server simply gets destroyed, and then the user is redirected to an address.\nThis works fine with plain html, but with Angula...
{"title":"Cannot call getBootClasspath() before setTargetInfo() is called","tags":["android","android-studio"],"question_text":"I am new in android studio, when i sync android application i got error.\n`C:\\Users\\Mansukh\\Desktop\\layout\\MaterialDesignLibrary-master\\MaterialDesign\\build.gradle\nError:(97, 0) Cannot...
{"title":"Android Studio - Unable to open PNG file","tags":["android","facebook","android-studio"],"question_text":"I'm trying to integrate Facebook into my app, but while running it in Android Studio, I get this:\nGradle: Execution failed for task ':AplikaceBeta1.0.1:mergeDebugResources'.\n Failed to run command:\n C:...
{"title":"Https to http redirect using htaccess","tags":["apache",".htaccess","http","https"],"question_text":"I'm trying to redirect\nhttps:\/\/www.example.com\nto\nhttp:\/\/www.example.com\n. I tried the following code in the .htaccess file\n`RewriteEngine On\nRewriteCond %{HTTP_HOST} ^example\\.com$ [NC]\nRewriteRul...
{"title":"Would I really want to return the minimum date?","tags":["c#","datetime","resharper","default-value"],"question_text":"An old work colleague used to quote his father about tools, \"You have to be smarter than it.\"\nIn the code below, Resharper is telling me, \"Value assigned is not used in any execution path...
{"title":"How to get InstallShield LE to uninstall the existing installation automatically?","tags":["windows-installer","uninstall","installshield-le"],"question_text":"Is this possible?\nAll I can see searching around is basically that I need to use 3rd party tools (e.g. Orca) to get GUIDs from my existing MSIs and c...
{"title":"How do I remove the top margin in a web page?","tags":["html","css"],"question_text":"I have had this problem with every web page I have created. There is always a top margin above the 'main container' div I use to place my content in the center of the page. I am using a css style sheet and have set margins a...
{"title":"Rotating a Vector in 3D Space","tags":["math","vector","3d","rotation","linear-algebra"],"question_text":"I am making an android project in opengl es that uses accelerometer to calculate change in specific axes and my aim is to rotate my spacecraft-like object's movement vector. The problem is that i can't un...
{"title":"what is the best practice of distributing binaries from a github project?","tags":["github","binary","distribute"],"question_text":"what is the best practice of distributing binaries from a github project?\nI can think of:\nCreate a bin folder in your project where you keep a copy of the binaries. \nHowever, ...
{"title":"UITableview edit\/done button","tags":["iphone","cocoa-touch","uitableview","uikit"],"question_text":"I have a tableview and navigation bar on the top.\nI have a Edit button on the left of my navigation bar with the following line of code.\n`self.navigationItem.leftBarButtonItem = self.editButtonItem;`\nWhen ...
{"title":"Zend Framework how to set headers","tags":["php","zend-framework"],"question_text":"I have a question, how can I do something like this:\n`header(\"Content-Disposition: inline; filename=result.pdf\"); \nheader(\"Content-type: application\/x-pdf\");`\nWith Zend Framework, I have tried:\n`$this->getResponse()\n...
{"title":"Ruby code to get the date of next Monday (or any day of the week)","tags":["ruby","date"],"question_text":"Given an input of, for example,\n`day = 'Monday'`\nhow can I calculate the date of\n`day`\n?\n`def date_of_next(day)\n ...\nend`","answer_text":"`require 'date'\ndef date_of_next(day)\n date = Date.parse...
{"title":"A data structure supporting O(1) random access and worst-case O(1) append?","tags":["arrays","performance","data-structures","language-agnostic","big-o"],"question_text":"I realize a resizable indexed collection that uses an array to store its elements (like\n`List<T>`\nin .NET or\n`ArrayList`\nin Java) has\n...
{"title":"Start ipython running a script","tags":["python","ipython"],"question_text":"My use case is I want to initialize some functions in a file and then start up ipython with those functions defined. Is there any way to do something like ipython --run_script=myscript.py?","answer_text":"In recent versions of ipytho...
{"title":"ReSharper Line Breaks and Wrapping","tags":["c#","resharper","code-formatting"],"question_text":"So, this:\n`cmd = new OdbcCommand( string.Format( @\"\nSELECT *\n FROM Bobby_Tables\n WHERE Name = {0}\", \"Little Bobby Drop Tables\" ), odbcConnection );`\ngets formatted to:\n`cmd = \n new OdbcCommand( \n strin...
{"title":"get next week start and end using jquery and moment js","tags":["javascript","jquery","momentjs","daterangepicker"],"question_text":"I searched for this question and found there is a no answer on Stackoverflow.. So I decided to answer it...\nThis question helps if you need to get the start\/end of next\/last ...
{"title":"What is the eclipse shortcut for auto-generating a default and field constructor?","tags":["java","eclipse","keyboard-shortcuts"],"question_text":"I had a look at:\nEclipse-Shortcuts\n, but I found nothing for generating a constructor.\nWhats the shortcut for generating a standard constructor?","answer_text":...
{"title":"python dictionary is thread safe?","tags":["python","thread-safety"],"question_text":"Some stated that python dictionary is thread safe. Does it mean I can or cannot modify the items in a dictionary while iterating over it?","answer_text":"The other answers already correctly addressed what's apparently your a...
{"title":"Error launching Eclipse 4.4 \"Version 1.6.0_65 of the JVM is not suitable for this product.\"","tags":["java","eclipse"],"question_text":"I have a problem launching Eclipse 4.4 on my Mac. I'm getting the following error: \n\"Version 1.6.0_65 of the JVM is not suitable for this product.\" \nI have the latest v...
{"title":"Apache 2.4.3 (with XAMPP 1.8.1) not starting in windows 8","tags":["windows","apache","xampp","port"],"question_text":"Just got XAMPP 1.8.1 installed on my Windows 8 PC, this version includes packages mentioned below:\n`Apache 2.4.3\nMySQL 5.5.27\nPHP 5.4.7\nphpMyAdmin 3.5.2.2\nFileZilla FTP Server 0.9.41\nTo...
{"title":"Android animate drop down\/up view proper","tags":["android","animation","view"],"question_text":"Okay I'm trying to do a proper slide down animation. The view that slides down should push all views bellow it down in one smooth movement and again when it slides up all the views should follow in one smooth mov...
{"title":"Upload Android app to google play step by step...?","tags":["android","certificate","apk","google-play","distribute"],"question_text":"1)\nI'm new bee to android distribution,my application is ready and now I want to distribute it through google play. But I can't find how to create certificate, because defaul...
{"title":"Converting HTML files to PDF","tags":["java","html","pdf","pdf-generation"],"question_text":"I need to automatically generate a PDF file from an exisiting (X)HTML-document. The input files (reports) use a rather simple, table-based layout, so support for really fancy JavaScript\/CSS stuff is probably not need...
{"title":"django - getlist()","tags":["python","django"],"question_text":"I just posted this question\njQuery - passing arrays in post request\n, where I don't to send arrays in post request, but there is no problem in jQuery code.\nThe problem is with receiving the POST request in django. I did like this.\n`def portfo...
{"title":"Rename files in sub directories","tags":["file-io"],"question_text":"Is there any way of batch renaming files in sub directories?\nExample:\nRename *.html to *.htm in a folder which has directories and sub directories.","answer_text":"Windows command prompt: (If inside a batch file, change %x to %%x)\n`for \/...
{"title":"Run process with realtime output in PHP","tags":["php","linux","apache","process","real-time"],"question_text":"I am trying to run a process on a web page that will return its output in realtime. For example if I run 'ping' process it should update my page every time it returns a new line (right now, when I u...
{"title":"How to customize a ListField in BlackBerry?","tags":["user-interface","blackberry","custom-controls","listfield"],"question_text":"I want to customize a ListField in BlackBerry which would be able to list an image and text in a row.\nHow to accomplish this?","answer_text":"Try something like this:\n`class Tas...
{"title":"Angular filter works but causes \"10 $digest iterations reached\"","tags":["angularjs","underscore.js"],"question_text":"I receive data from my back end server structured like this:\n`{\n name : \"Mc Feast\",\n owner : \"Mc Donalds\"\n}, \n{\n name : \"Royale with cheese\",\n owner : \"Mc Donalds\"\n}, \n{\n ...
{"title":"How to echo a default value if value not set blade","tags":["laravel","laravel-4","laravel-5","blade","templating"],"question_text":"I would like to know what would be the best way to display a default value if the given value is not set. I have the following in a blade file (I can not guaranty that the key i...
{"title":"Javascript (+) sign concatenates instead of giving sum of variables","tags":["javascript","math"],"question_text":"Why when i use this: (assuming i=1)\n`divID = \"question-\" + i+1;`\nI get\nquestion-11\nand not\nquestion-2\n?","answer_text":"Use this instead:\n`var divID = \"question-\" + (i+1)`\nIt's a fair...
{"title":"Is there a naming convention for MySQL?","tags":["mysql","naming-conventions","mysql-workbench"],"question_text":"Here's how I do it:\nTable names are lower case, uses underscores to separate words, and are singular (e.g. 'foo', 'foo_bar', etc.\nI generally (not always) have a auto increment PK. I use the fol...
{"title":"How could I determine which AWS location is best for serving customers from a particular region?","tags":["amazon-s3","amazon-ec2","amazon-web-services"],"question_text":"AWS has several locations for storage and EC2 instances to run upon with different pricing. How could I determine which location is best fo...
{"title":"How to create a typedef for function pointers","tags":["c","function-pointers","typedef"],"question_text":"I think it would be easier to use function pointers if I created a typedef for a function pointer, but I seem to be getting myself tripped up on some syntax or usage or something about typedef for functi...
{"title":"C# Generics won't allow Delegate Type Constraints","tags":["c#","generics","events","delegates","constraints"],"question_text":"Is it possible to define a class in C# such that\n`class GenericCollection<T> : SomeBaseCollection<T> where T : Delegate`\nI couldn't for the life of me accomplish this last night in...
{"title":"How can I keep my Android service running when the screen is turned off?","tags":["android","service"],"question_text":"When the screen turns off, my application service is paused.\nI start my service with the following code:\n`if (mSharedPrefs.getBoolean(\"prefAutoUpdatesMain\", false)) {\n Intent svc = new ...
{"title":"Android id naming convention: lower case with underscore vs. camel case","tags":["android","mobile"],"question_text":"I'm currently programming an application for the Android. Now what I found out is that you cannot place resource objects, say, an image in the drawable folder and name it like \"myTestImage.jp...
{"title":"Re-establish TFS source control bindings","tags":["visual-studio-2010","version-control","tfs"],"question_text":"I have about a dozen Visual Studio 2010 projects I've been working on that are versioned in a TFS repository. Recently I went on a vacation and upgraded my computer's OS to Windows 7 64 bit.\nI've ...
{"title":"Parametrized get request in Ruby?","tags":["ruby-on-rails","ruby","http","get"],"question_text":"How do I make an HTTP\n`GET`\nrequest with parameters in Ruby?\nIt's easy to do when you're\n`POST`\ning:\n`require 'net\/http'\n require 'uri'\n HTTP.post_form URI.parse('http:\/\/www.example.com\/search.cgi'),\n...
{"title":"Can I change a column from NOT NULL to NULL without dropping it?","tags":["sql-server"],"question_text":"Need to alter a table to allow nulls on a column -- but cant drop the column...can I do this? Was trying something like:\n`ALTER TABLE myTable MODIFY myColumn NULL;`\nBut to no avail....","answer_text":"`A...
{"title":"How to make a beep in android?","tags":["android"],"question_text":"I would like my app beep with a specific frequency and duration. In the windows equivalent of this app (written in c#) I used a c++ dll with the function\n`beep(frequency, duration);`\nIs this the same in android? Or at least how can I put my...
{"title":"jQuery .on does not work but .live does","tags":["jquery"],"question_text":"Since the live() method is deprecated as of version 1.7, I started going through my source and converting all of my live event handlers over to on(). I was under the impression that the change would be simple and everything would work...
{"title":"How to emulate git log --decorate's different colors per branch-type","tags":["git","git-config"],"question_text":"In making my favorite git log view I've created this alias:\n`graph = log --pretty=format:'%Cgreen%ad%Creset %C(yellow)%h%Creset%C(yellow)%d%Creset %s %C(cyan)[%an]%Creset %Cgreen(%ar)%Creset' --...
{"title":"Android : Loading an image from the Web with Asynctask","tags":["android","android-asynctask"],"question_text":"How do I replace the following lines of code with an Asynctask ? \nHow do you \"get back\" the Bitmap from the Asynctask ? Thank you.\n`ImageView mChart = (ImageView) findViewById(R.id.Chart);\nStri...
{"title":"Email keyboard for edit text","tags":["android","android-edittext"],"question_text":"The following Code doesn't seem to work,I want the email keyboard with\n`@`\nand\n`.com`\nto get displayed for the edit text.\n`emailEditText.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);`\nThanking you in advanc...
{"title":"Div with horizontal scrolling only","tags":["html","css"],"question_text":"I have a fixed width DIV containing a table with many columns, and need to allow the user to scroll the table horizontally within the DIV.\nThis needs to work on IE6 and IE7 only (internal client application).\nThe following works in I...
{"title":"garbage collection with node.js","tags":["javascript","node.js","v8"],"question_text":"I was curious about how the node.js pattern of nested functions works with the garbage collector of v8.\nhere's a simple example\n`readfile(\"blah\", function(str) {\n var val = getvaluefromstr(str);\n function restofprogra...
{"title":"heroku paperclip weird error Paperclip::Errors::MissingRequiredValidatorError","tags":["heroku","amazon-s3","paperclip"],"question_text":"I've deployed a rails app to heroku, it was working just fine until I changed domains, locally it works fine and now I've started getting the following error:\n`Paperclip::...
{"title":"Is normalizing a person's name going too far?","tags":["database","normalization"],"question_text":"You usually normalize a database to avoid data redundancy. It's easy to see in a table full of names that there is plenty of redundancy. If your goal is to create a catalog of the names of every person on the p...
{"title":"How to flatten array in jQuery?","tags":["jquery","arrays","flatten"],"question_text":"How to simply flatten array in jQuery? I have:\n`[1, 2, [3, 4], [5, 6], 7]`\nAnd I want:\n`[1, 2, 3, 4, 5, 6, 7]`","answer_text":"You can use\njQuery.map\n, which is the way to go if you have the jQuery Library already load...
{"title":"Android Animate Rotate","tags":["android","animation","progress-bar","customization"],"question_text":"I did some digging in Android code, and saw the use of in the indeterminate progress bar. after trying to create my own drawable with this tag:\n`<animated-rotate xmlns:android=\"http:\/\/schemas.android.com...
{"title":"Is it possible to list all functions in a module?","tags":["python","python-module"],"question_text":"I defined a .py file in this format:\nfoo.py\n`def foo1(): pass\ndef foo2(): pass\ndef foo3(): pass`\nI import it from another file:\nmain.py\n`from foo import * \n# or\nimport foo`\nIs it possible list all f...
{"title":"Instruments in Xcode 4","tags":["xcode","ios4","instruments"],"question_text":"I was trying to open instruments in xcode 4 but was not able to find a way to do it. Usually in Xcode 3, we would do run -> run with performance tool... but I dont really find any such thing to do it in xcode 4.. would anyone be ab...
{"title":"Check if third-party cookies are enabled","tags":["javascript","cookies"],"question_text":"I have an application that needs to check whether the client browser has third-party-cookies enabled. Does anyone know how to do this in JavaScript?","answer_text":"Technical Background\nThe third party sets & reads coo...
{"title":"XHTML and & (Ampersand) encoding","tags":["url","urlencode","xhtml"],"question_text":"My website is XHTML Transitional compliant\nexcept for one thing\n: the & (ampersand) in the URL are written as it is, instead of\n`&amp;`\nThat is, all the urls in my pages are usually like this:\n`<a href=\"http:\/\/www.fo...
{"title":"How do I split an integer into 2 byte binary?","tags":["java"],"question_text":"Given\n`private int width = 400;\nprivate byte [] data = new byte [2];`\nI want to split the integer \"width\" into two bytes and load data[0] with the high byte and data[1] with the low byte.\nThat is binary value of 400 = 1 1001...
{"title":"Making HTTP HEAD request with urllib2 from Python 2","tags":["python","python-2.7","urllib2","head"],"question_text":"I'm trying to do a HEAD request of a page using Python 2.\nI am trying\n`import misc_urllib2\n.....\nopender = urllib2.build_opener([misc_urllib2.MyHTTPRedirectHandler(), misc_urllib2.HeadRequ...
{"title":"How to Distribute Compiled Windows 8 Metro Applications without Windows Store?","tags":["windows-8","visual-studio-2012","windows-runtime","windows-store","sideloading"],"question_text":"I am just curious if there is a way to package up a Windows 8 Metro application to distribute it to others with the Windows...
{"title":"Skip first couple of lines while reading lines in Python file","tags":["python","file","lines","skip"],"question_text":"I want to skip the first 17 lines while reading a text file.\nLet's say the file looks like:\n`0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\n0\ngood stuff`\nI just want the good stuff. Wha...
{"title":"How do I use LINQ Contains(string[]) instead of Contains(string)","tags":["c#","linq","string","contains"],"question_text":"I got one big question.\nI got a linq query to put it simply looks like this:\n`from xx in table\nwhere xx.uid.ToString().Contains(string[])\nselect xx`\nThe values of the\n`string[]`\na...
{"title":"JSP file not rendering in Spring Boot web application","tags":["spring-boot"],"question_text":"I have a Spring Boot web application up and running using embedded Tomcat (the default). When it serves up JSP files as part of rendering the view I specified in my controller, the JSPs are not being rendered as suc...
{"title":"Count how many lines in large files","tags":["linux","hadoop","mapreduce"],"question_text":"Forgive me for such basic Q.\nI commonly work with text files of ~ 20 Gb size and I find myself counting the number of lines in a given file very often.\nThe way I do it now it's just cat fname | wc -l, and it takes ve...
{"title":"Concatenate all list content in one string in C#","tags":["c#","list"],"question_text":"How do I concatenate all content of a list in one string in C#?","answer_text":"Searching for this:\n`List<string> list = new List<string>(); \/\/ { \"This \", \"is \", \"your \", \"string!\"};\nlist.Add(\"This \");\nlist....
{"title":"Logging in delayed_job?","tags":["ruby-on-rails","ruby","logging","delayed-job","clockwork"],"question_text":"I can't get any log output from\n`delayed_job`\n, and I'm not sure my jobs are starting.\nHere's my Procfile:\n`web: bundle exec rails server\nworker: bundle exec rake jobs:work\nworker: bundle exec c...
{"title":"How to #import <NSObjCRuntime.h> to use objc_msgSend","tags":["objective-c","ios"],"question_text":"I'd like to import runtime's header to use objc_msgSend but I'm getting:\n`error: NSObjCRuntime.h: No such file or directory`\nShould I add something to the header search path?","answer_text":"You'll need to in...
{"title":"access denied for user debian-sys-maint","tags":["mysql","debian","admin"],"question_text":"I have had problem with mysql. I tried to execute this:\n`echo \"show databases\" | mysql -B -N`\nBut I got:\n`ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)`\nBut when ...
{"title":"Why declare an interface as abstract?","tags":["java","oop","interface"],"question_text":"What's point of declaring an interface as abstract? Same thing for an interface method. Is there a point to it?\neg.\n`public abstract interface Presenter {\n public abstract void go(final HasWidgets container);\n}`","an...
{"title":"Is there a way to make controls transparent to mouse events in WPF?","tags":["wpf","mouseevent"],"question_text":"Is there a way that I can let mouse events pass through to controls behind?","answer_text":"Sure, just set\n`IsHitTestVisible=\"False\"`\non the control. Mouse events will pass through it.","quest...
{"title":"Assign variable value inside if-statement","tags":["java"],"question_text":"I was wondering whether it is possible to assign a variable a value inside a conditional operator like so:\n`if((int v = someMethod()) != 0) return v;`\nIs there some way to do this in Java? Because I know it's possible in\n`while`\nc...
{"title":"How can I initialize base class member variables in derived class constructor?","tags":["c++","inheritance"],"question_text":"Why can't I do this?\n`class A\n{\npublic:\n int a, b;\n}\nclass B : public A\n{\n B() : A(), a(0), b(0)\n {\n }\n}`\nEdit:\nI meant for the A member variables to be public.","answer_t...
{"title":"Why define PI = 4*ATAN(1)","tags":["fortran77","pi"],"question_text":"What is the motivation for defining PI as\nPI=4.D0*DATAN(1.D0)\nwithin a Fortran 77 code? I understand how it works, but, what is the reasoning?","answer_text":"This style ensures that the maximum precision available on ANY architecture is ...
{"title":"Building Qt 5 on Linux, for Windows","tags":["qt","qt5","mxe"],"question_text":"I wanted to migrate my Qt 4 app to use Qt 5 instead.\nThese instructions\nfailed, due to some differences with how\nMXE\nbuilds Qt 5, including the fact that it uses modularised Qt tarballs, instead of one large tarball.","answer_...
{"title":"Overriding an automatic property","tags":["c#"],"question_text":"since this\n`public int MyInt{ get; set;}`\nis equivalent to\n`private int _myInt;\npublic int MyInt{ get{return _myInt;} set{_myInt = value;} }`\nwhen you make the automatic property virtual\n`public virtual int MyInt{ get; set;}`\nand then ove...
{"title":"How to embed bash script directly inside a git alias","tags":["git","bash","shell","alias"],"question_text":"Can I embed the following bash shell code:\n`for name in $(git diff --name-only $1); do git difftool $1 $name & done`\ndirectly into the creation of a git alias:\n`git config --global alias.diffall ***...
{"title":"openjdk 1.7 in eclipse: operator is not allowed for source level below 1.7","tags":["java","eclipse","windows-runtime","openjdk"],"question_text":"Eclipse gives me an error:\n`'<>' operator is not allowed for source level below 1.7`\nI guess this is because it is not using java 1.7. Except that it is. At leas...
{"title":"Ruby and Ruby on Rails offline API documentation","tags":["ruby-on-rails","ruby","api","documentation"],"question_text":"In the past I used railsbrain.com to have a nice and handy offline api documentation.\nBut they stop at version 2.3.2\nIs there any other solution with latest version.","answer_text":"UPDAT...
{"title":"What is a Memory-Efficient Doubly Linked List in C?","tags":["c","data-structures","memory-efficient","xor-linkedlist","mem.-efficient-linkedlist"],"question_text":"I had come across the term \"Memory-Efficient Doubly Linked List\" while reading a book on C Data structures. It just had one line saying that a ...
{"title":"How to copy <option> from one <select> to another?","tags":["jquery"],"question_text":"I am using the two sided multi select found here\nhttp:\/\/www.stevefenton.co.uk\/cmsfiles\/assets\/File\/twosidedmultiselect.html\nand need to add the selected options in the right hand multiselect to another select list w...
{"title":"how do we compare 2 class names of an object","tags":["objective-c","class","comparison","object"],"question_text":"Is there a way to get compare class name betweeen 2 objects?\nLike:\n`NSString *bla = [[NSString alloc] init];\nif([bla class] isEqual: NSString])\n NSLog(@\"success\");`\nunsure if my syntax is...
{"title":"How to set WPF ListView row height?","tags":["wpf","listview","layout","row-height"],"question_text":"I've got a listView displaying a few text records. I need to increase the height of rows (working on a touch screen so I need thicker rows) without increasing the font size.\nThis is probably pretty trivial b...
{"title":"Copy DataTable from one DataSet to another","tags":["c#","datatable","dataset"],"question_text":"I'm trying to add to a new DataSet X a DataTable that is inside of a different DataSet Y.\nIf I add it directly, I get the following error:\nDataTable already belongs to another DataSet.\nDo I have to clone the Da...
{"title":"Android set the GridView to have 2 columns per row only","tags":["android","android-layout","design","gridview"],"question_text":"Here is my code in my Activity:\n`public class GridViewActivity extends Activity {\n GridView gridView;\n static final String[] MOBILE_OS = new String[] { \"Android\", \"iOS\",\n \...
{"title":"Does Arduino use C or C++?","tags":["c++","c","arduino"],"question_text":"Coming from Python, the whole C\/C++ thing is kind of alien to begin with... and then I see in one place that Arduino uses 'standard' C, and in another that it uses 'standard' C++, so on and so forth. Which is it? My admittedly crude un...
{"title":"android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>","tags":["android","android-emulator","android-memory"],"question_text":"I am developing a simple app. Just finished the home screen. If the orientation changes more than two times, it is throwing the error and application...
{"title":"How to change font size in a textbox in html","tags":["html"],"question_text":"How can I change the font size of text inside the textbox in html.","answer_text":"For a\n`<input type='text'>`\nelement:\n`input { font-size: 18px; }`\nor for a\n`<textarea>`\n:\n`textarea { font-size: 18px; }`\nor for a\n`<select...
{"title":"The reason to use JS .call() method?","tags":["javascript","function","methods","this"],"question_text":"I'm interested what's the reason to have call() method in JS. It seems it duplicates usual method of calling\n`this`\n.\nFor example, I have a code with call().\n`var obj = {\n objType: \"Dog\"\n}\nf = fun...
{"title":"Filter multiple conditions dplyr","tags":["r","dplyr"],"question_text":"I have a\n`data.frame`\nwith character data in one of the columns.\nI would like to filter multiple options in the\n`data.frame`\nfrom the same column. Is there an easy way to do this that I'm missing?\nExample:\n`data.frame`\nname =\n`da...
{"title":"What's the easiest way to use reify (get an AST of) an expression in Scala?","tags":["scala","macros","scala-2.10"],"question_text":"I'm looking at alternatives to\n`-print`\nor\n`javap`\nas a way of figuring out what the compiler is doing in Scala. With the new reflection\/macros library,\n`reify`\nseems a g...
{"title":"OpenID: Trying to Get Email Address from Google OP","tags":["c#","openid","dotnetopenauth"],"question_text":"I\u00e2\u0080\u0099m using dotnetopenauth 3.2 to implement Openid and can\u00e2\u0080\u0099t figure out how to get Google to pass the email address in the Claims Response. I know that Google doesn\u00e...
{"title":"Add CSS rule via jQuery for future created elements","tags":["javascript","jquery","css"],"question_text":"I have a somewhat unusual issue. I've done something like this many times:\n`$('#selector').css('color','#00f');`\nMy problem is that I create a\n`<div id=\"selector\">`\n, and I call the command above a...
{"title":"Collect successive pairs from a stream","tags":["java","java-8","java-stream"],"question_text":"Given a stream such as\n`{ 0, 1, 2, 3, 4 }`\n,\nhow can I most elegantly transform it into given form:\n`{ new Pair(0, 1), new Pair(1, 2), new Pair(2, 3), new Pair(3, 4) }`\n(assuming, of course, I've defined class...