text
stringlengths
74
309k
{"title":"Why does the Double.valueof javadoc say it caches values, when it doesn't?","tags":["java","javadoc"],"question_text":"In OpenJDK, for the method:\n`public static Double valueOf(double d)`\nThe javadoc says:\nReturns a Double instance representing the specified double value. If a new Double instance is not re...
{"title":"Possible to pass [self anyFunction] in blocks without __weak object (iOS 5 + ARC)","tags":["iphone","objective-c","ios","automatic-ref-counting","objective-c-blocks"],"question_text":"Is it possible to pass [self anyFunction] in blocks without a __weak object from self?\nAs an example this is valid code from ...
{"title":"Why is \"throw null\" not creating a compilation error in Java?","tags":["java","exception-handling",null],"question_text":"`class ThrowNull {\n public static void main(String[] args) {\n throw null;\n }\n}`\nWe know that rule for throw is\n`throw ThrowableInstance;`\n, where\n`ThrowableInstance`\nmust be an ...
{"title":"Using AppCompat 'layout_behavior' with '@string\/appbar_scrolling_view_behavior' throws exception","tags":["java","android","appcompat"],"question_text":"I have a strange probem using the AppCompat Lib 22.2 with the new introduced: layout_behavior\nIf i use it with the value \"@string\/appbar_scrolling_view_b...
{"title":"How to create android spinner without down triangle on the right side of the widget","tags":["android","android-layout","spinner","nine-patch"],"question_text":"I have a screen where the user has many items to input so screen space is at a premium.\nI want the look of the widget on the screen (before the user...
{"title":"Xcode letters beside files in Project Navigator","tags":["xcode"],"question_text":"What are the significance of the letters beside the files in the Project Navigator? (e.g M,A)","answer_text":"Those letters beside files in the Project Navigator of Xcode show the status of files that are under version control ...
{"title":"In Jquery how do you find out the 'eq' of an element of what is being clicked?","tags":["jquery"],"question_text":"When one of the divs inside 'uploadChoice' is clicked, how can I ascertain which one is clicked? Can I return an 'eq' value somehow?\n`<div id=uploadChoice>\n <div>Text<\/div>\n <div>Image<\/div<...
{"title":"set font at runtime, Textview","tags":["android","fonts","textview"],"question_text":"How to set font to textview, which is created at runtime?\ni created textview\n`Textview tv = new TextView(this); \ntv.setTextSize(20);`\nlike I can change the size\ni want to set font style to \"Verdana\".\nHow to do this??...
{"title":"Increasing the Command Timeout for SQL command","tags":["c#","sql","ado.net","connection-timeout"],"question_text":"I have a little problem and hoping someone can give me some advice. I am running a SQL command, but it appears it takes this command about 2 mins to return the data as there is a lot of data. Bu...
{"title":"warning: incompatible implicit declaration of built-in function \u00e2\u0080\u0098printf\u00e2\u0080\u0099 [enabled by default]","tags":["c","system-calls"],"question_text":"I'm using the following C code:\n`#include <unistd.h>\n#include <fcntl.h>\n#include <sys\/types.h>\nint main()\n{\n int file=0;\n if((fi...
{"title":"NoClassDefFoundError in mapActivity","tags":["android"],"question_text":"i have this error in my map app.do you know what is wrong?i have checked and the package is right in my .java files and also i have put the uses-libraries of google maps into my application tag in the manifest.xml..please help,im trying ...
{"title":"Sending email with attachments from C#, attachments arrive as Part 1.2 in Thunderbird","tags":["c#","email","smtp","attachment"],"question_text":"I have a C# application which emails out Excel spreadsheet reports via an Exchange 2007 server using SMTP. These arrive fine for Outlook users, but for Thunderbird ...
{"title":"Catch exception in node during JSON.parse","tags":["json","node.js","parsing","exception-handling"],"question_text":"My node server dies when it is unable to parse JSON in the following line:\n`var json = JSON.parse(message);`\nI read\nthis thread\non how to catch exceptions in node, but I am still not sure w...
{"title":"Foreign keys in Laravel 4 migrations issue","tags":["mysql","laravel","laravel-4"],"question_text":"I've just created a new Laravel 4 project and am finding strange things happening with the foreign key aspect of the schema builder. If I use the\n`->foreign()`\nmethod in any of my migrations I get thrown MySQ...
{"title":"How to Set Focus on Input Field using JQuery","tags":["jquery","html"],"question_text":"Given the following HTML structure:\n`<div class=\"wrapper\">\n <div class=\"top\">\n <a href=\"http:\/\/example.com\" class=\"link\">click here<\/a>\n <\/div>\n <div class=\"middle\">\n some text\n <\/div>\n <div class=\"...
{"title":"Why is #!\/usr\/bin\/env bash superior to #!\/bin\/bash?","tags":["bash","shebang"],"question_text":"I've seen in a number of places, including recommendations on this site (\nPreferred bash shebang?\n), to use\n`#!\/usr\/bin\/env bash`\nin preference to\n`#!\/bin\/bash`\n. I've even seen one enterprising ind...
{"title":"How to make sure an application keeps running on Linux","tags":["linux"],"question_text":"I'm trying to ensure a script remains running on a development server. It collates stats and provides a web service so it's supposed to persist, yet a few times a day, it dies off for unknown reasons. When we notice we j...
{"title":"First char to upper case","tags":["java","string"],"question_text":"Possible Duplicate:\nHow to upper case every first letter of word in a string?\nMost efficient way to make the first character of a String lower case?\nI want to convert the first letter of a string to upper case. I am attempting to use repla...
{"title":"How to add \/usr\/local\/bin in $PATH on Mac","tags":["osx","git","node.js","path","profile"],"question_text":"When I do 'open .profile' in the terminal I have the following:\n`export PATH=$PATH:\/usr\/local\/git\/bin`\nNow I installed node.js for Mac and it says,\nMake sure that \/usr\/local\/bin is in your ...
{"title":"How should I store UIImages within my Core Data database?","tags":["iphone","objective-c","core-data","ios"],"question_text":"I am developing an application which demands around 100 images or maybe more to be pre-inserted into the Core Data database along with other related information.\nNow I can easily add ...
{"title":"How can I generate a GUID for a string?","tags":["c#"],"question_text":"I am having a problem generating a GUID for a string - for example:\n`Guid g = New Guid(\"Mehar\");`\nHow can I compute a GUID for\n`\"Mehar\"`\n? I am getting an exception.","answer_text":"Quite old this thread but this is how we solved ...
{"title":"Retrieving a random item from ArrayList","tags":["java","arraylist"],"question_text":"I'm learning Java and I'm having a problem with\n`ArrayList`\nand\n`RandomGenerator`\n.\nI have an object called\n`catalogue`\nwhich has an array list of objects created from another class called\n`item`\n.\nI need a method ...
{"title":"What is the difference between gcc\/g++ and cc1\/cc1plus?","tags":["gcc","g++"],"question_text":"When I compile my projects and check the resources used by running\n`top`\n, the big CPU\/memory hog is sometimes called\n`g++`\nand sometimes\n`cc1plus`\n. What is the difference between the two, and should I eve...
{"title":"How to parse a cookie string","tags":["java","android","string","cookies"],"question_text":"I would like to take a Cookie string (as it might be returned in a Set-Cookie header) and be able to easily modify parts of it, specifically the expiration date.\nI see there are several different Cookie classes, such ...
{"title":"Rails -- how to populate parent object id using nested attributes for child object and strong parameters?","tags":["ruby-on-rails","strong-parameters"],"question_text":"I've got a situation much like is presented in\nRailscast 196-197: Nested Model Form\n. However, I've encountered a conflict between this app...
{"title":"How can I setup webpack to minify and combine scss and javascript like CodeKit?","tags":["coffeescript","sass","npm","webpack"],"question_text":"I'm having trouble using webpack instead of\nCodekit\nv1.9.3. I started working to move from CodeKit to Grunt and Gulp, and then learned about\n`webpack`\nwhich soun...
{"title":"jquery select iframe children","tags":["javascript","jquery"],"question_text":"I am using the editArea library and jquery to do what i need...\nhttp:\/\/www.cdolivet.com\/index.php?page=editArea&sess=2b8243f679e0d472397bfa959e1d3841\nso in my html there is an iframe tag that editArea uses what i need is to ac...
{"title":"CRON command to run URL address every 5 minutes","tags":["php","cron"],"question_text":"I'm newbie in cron commands and I need help.\nI have a script on\n`http:\/\/example.com\/check\/`\n.\nWhats is command for cron to run this URL every 5 minutes?\nI tried\n*\/5 * * * * \/home\/test\/check.php\nBut I want to...
{"title":"Declaring variables without var keyword","tags":["javascript","variables","global-variables","declaration"],"question_text":"At w3schools there is written:\nIf you declare a variable, without using \"var\", the variable always becomes GLOBAL.\nIs it useful to declare global variable inside the function? I can...
{"title":"Powershell: How can I stop errors from being displayed in a script?","tags":["powershell","error-handling"],"question_text":"When my PowerShell script tries, for example, to create a SQL Server object for a server that doesn't exist (\"bla\" in my case), PowerShell displays lots of PowerShell errors in red.\n...
{"title":"Can't load IA 32-bit .dll on a AMD 64-bit platform","tags":["java","windows","dll","jni"],"question_text":"I am trying to use\nSVMLight\nfrom Java, using the\nJNI wrapper on this page\n:\n`static {\n System.loadLibrary(\"lib\/JNI_SVM-light-6.01\/lib\/svmlight\");\n }`\nI get the following error:\n... lib\\JNI...
{"title":"how text length of a UITextView can be fixed?","tags":["iphone","uitextview"],"question_text":"I have a UITextView, user can write maximum 160 character in the textView.\nHow can i fixed the maximum text length of a UITextView?","answer_text":"This chunk of code also works with Copy\/Paste, but also copes wit...
{"title":"Express.js routing for bower components","tags":["node.js","express","bower"],"question_text":"I have changed my Express.js project to use bower to install components. All components are installed under \/components (\/components\/jquery\/jquery.js ...etc).\nI have create my own router as well which looks lik...
{"title":"Apply webkit scrollbar style to specified element","tags":["css","webkit","pseudo-element"],"question_text":"I am new to pseudo-elements that are prefixed with a double colon. I came across a blog article discussing styling of scrollbars using some webkit only css. Can the pseudo-element CSS be applied to ind...
{"title":"Spin or rotate an image on hover","tags":["css","css3","hover","css-transitions","css-transforms"],"question_text":"I want to find out how to make a\nspinning or rotating image\nwhen it is hovered. I would like to know how to emulate that functionality with\nCSS\non the following code :\n`img {\r\n border-rad...
{"title":"How to create and manipulate promises in Protractor?","tags":["node.js","angularjs","protractor"],"question_text":"I want to use the Node Http module to call my server directly in order to set up my Protractor tests. Http is callback based and I want to turn that into promises.\nFor example, I want to have th...
{"title":"Professional jQuery based Combobox control?","tags":["javascript","jquery","combobox","controls"],"question_text":"Are there any\nprofessional\nCombobox controls (dropdown list with autosuggestion) based on the jQuery library?\nIt should be able to handle\nlarge datasets\nand have some\nskinning\noptions. A\n...
{"title":"Mixing Qt and Boost","tags":["c++","qt","boost"],"question_text":"I'm looking at starting a project in C++ using the Qt 4 framework (a cross-platform GUI is required). I've heard great things about the Boost libraries from friends and online. I've started reading up on both and wanted to ask a cursory questio...
{"title":"How do I prevent CSS inheritance?","tags":["css"],"question_text":"I have a hierarchical navigation menu in my sidebar that uses nested lists (<ul> and <li> tags). I am using a pre-made theme which already has styles for list items, but I want to alter the style for the top-level items but NOT have it apply t...
{"title":"Why isn't getSelectedItem() on JComboBox generic?","tags":["java","swing","generics","jcombobox","java-7"],"question_text":"JCombobox in Java 7 has been updated to use generics - I always thought it was a bit of an oversight that it didn't already so I was pleased to see this change.\nHowever, when attempting...
{"title":"Why is the C++ initializer_list behavior for std::vector and std::array different?","tags":["c++","stl","c++11"],"question_text":"Code:\n`std::vector<int> x{1,2,3,4};\nstd::array<int, 4> y{{1,2,3,4}};`\nWhy do I need double curly braces for std::array?","answer_text":"`std::array<T, N>`\nis an aggregate: it d...
{"title":"Units of Three.JS, Calculating Rotation & Orbit Speeds","tags":["rotation","three.js","orbit"],"question_text":"I'm trying to build a to scale model of the solar system. I wanted to see if someone could explain to me how the rotation speed works. Here's the important piece:\n`objects[index].rotation.y += calc...
{"title":"jQuery trigger event when click outside the element","tags":["javascript","jquery"],"question_text":"`$(document).click(function(evt) {\n var target = evt.currentTarget;\n var inside = $(\".menuWraper\");\n if (target != inside) {\n alert(\"bleep\");\n }\n});`\nI am trying to figure out how to make it so that...
{"title":"jQuery.ajax - submit all elements in form without manually entering them","tags":["javascript","jquery","ajax","forms"],"question_text":"I would like to use jQuery.ajax to submit a form using POST without having to specify everything manually in the \"data: \" part.\nThis is what I don't want:\n`data: \"usern...
{"title":"Spanning columns with TableLayout","tags":["android","android-tablelayout"],"question_text":"Possible Duplicate:\nWhat is the equivalent of \u201ccolspan\u201d in an Android TableLayout?\nIt says in the documentation for TableLayout \"Cells can span columns, as they can in HTML.\" However, I can't find any wa...
{"title":"UIPageViewController Gesture recognizers","tags":["ios","uigesturerecognizer"],"question_text":"I've been working on an application for a while now, but I couldn't ask this question due to the NDA.\nI have a UIPageViewController load with my Viewcontroller. The view controllers have buttons which are overridd...
{"title":"How to run composer from anywhere?","tags":["php","composer-php"],"question_text":"I have just installed composer in my\n`\/usr\/bin`\nfolder, so when from that folder I run\n`php composer.phar`\nI get the help info about composer. But, when I try to run the same from other folder I get\n`Could not open input...
{"title":"Differentiating between user scroll and programatic page change in ViewPager","tags":["android","android-viewpager"],"question_text":"I have a\n`android.support.v4.view.ViewPager`\nin my application and I would like to differentiate between a programmatically-initiated smooth scroll and a user-initiated touch...
{"title":"A Switch Java problem : case expressions must be constant expressions","tags":["java","android","switch-statement"],"question_text":"I having a problem in my switch\/case statement. The error says : \"Case expressions must be constant expressions\". I understand the error and I can resolve it using If but can...
{"title":"explain $CI =& get_instance();","tags":["php","codeigniter"],"question_text":"looking through code igniters source code,\nin its helper functions I keep seeing\n`$CI =& get_instance();`\ncan anyone please explain to me how this works?\nI get that it is returning a reference to the $CI super object, but where ...
{"title":"How to fully remove subversive plugin","tags":["eclipse","subclipse","subversive","eclipse-indigo"],"question_text":"I've installed Subversive and want to switch to the Subclipse plugin.\nAfter uninstalling Subversive via About Eclipse -> Installation Details -> Uninstall... and installing Subclipse, there ar...
{"title":"LINQ performance FAQ","tags":["c#",".net","linq","performance"],"question_text":"I am trying to get to grips with LINQ. The thing that bothers me most is that even as I understand the syntax better, I don't want to unwittingly sacrifice performance for expressiveness.\nAre they any good centralized repositori...
{"title":"DataSet.WriteXml to string","tags":["c#",".net","dataset"],"question_text":"I'm tring to get a string from a DataSet\nwithout\nusing GetXml. I'm using WriteXml, instead. How to use it to get a string?\nThanks","answer_text":"`StringWriter sw = new StringWriter();\ndataSet.WriteXml(sw);\nstring result = sw.ToS...
{"title":"Clear text area","tags":["jquery","uploadify"],"question_text":"In Onselect event I have script:\n`$(\"#vinanghinguyen_images_bbocde\").val('');\n$(\"#vinanghinguyen_images_bbocde\").val(vinanghinguyen_final_bbcode);`\nI want clear text area id=\"vinanghinguyen_images_bbocde\" before add value to it. but text...
{"title":"Determine if statically named JavaScript function exists to prevent errors","tags":["javascript","function"],"question_text":"I have a script on my website that calls a\nstatically\nnamed function when called:\n`childLoad();`\nThe\n`childLoad()`\nfunction is not always defined though it is always called. How ...
{"title":"How to initialize an array of structs in MATLAB?","tags":["matlab"],"question_text":"How can I preallocate an array of structs in MATLAB? I want to preallocate \"a\" in this example so that it does not resize several times.\n`a = []\nfor i = 1:100\n a(i).x = i;\nend`","answer_text":"Using\n`repmat`\nis by far...
{"title":"Can you create sql views \/ stored procedure using Entity Framework 4.1 Code first approach","tags":["entity-framework-4.1","code-first","sqlmigrations"],"question_text":"Entity Framework 4.1 Code First works great creating tables and relationships. Is it possible to create sql views or stored procedure using...
{"title":"Is sizeof(void()) a legal expression?","tags":["c++","language-lawyer","sizeof","void"],"question_text":"From\n[5.3.3\/1]\n, I found that:\nThe\u00c2\u00a0sizeof\u00c2\u00a0operator shall not be applied to an expression that has function or incomplete type\nFrom\n[3.9\/5]\nI found that:\nIncompletely-defined ...
{"title":"Meteor support developing on Windows","tags":["node.js","meteor"],"question_text":"Does Meteor support developing on Windows? I did not see any downloads or mention of Windows in the docs.\nThe \"Quick Start\" assumes you are on *Nix OS.","answer_text":"Meteor 1.1+: official Windows support launched on\nhttps...
{"title":"Eclipse Package Explorer: Hide part of long package names?","tags":["eclipse"],"question_text":"I've been searching for a \"problem\" that have annoyed me for a while (but without any luck).\nI am developing an Android application with the rather long package name\n`com.kennethbrodersen.simplecaster`\n.\nThis...
{"title":"Place 3 buttons in a LinearLayout to occupy equal amount of space","tags":["android","android-layout"],"question_text":"i would like to have three buttons taking equal amount of available space horizontally in a row.\nI used\n`android:layout_gravity`\n. What is the problem?\nlayout xml :\n`<LinearLayout \n xm...
{"title":"Codeigniter - handling errors when using active record","tags":["php","codeigniter","activerecord"],"question_text":"I am putting together a few models for my codeigniter site and can't seem to find any word in the documentation of how to handle errors that could occur when using the Active Record system.\nTh...
{"title":"Why are difference lists more efficient than regular concatenation?","tags":["performance","list","haskell","time-complexity"],"question_text":"I am currently working my way through the\nLearn you a haskell\nbook online, and have come to a chapter where the author is explaining that some list concatenations c...
{"title":"ASP.NET MVC: Controller created for every request?","tags":[".net","asp.net-mvc-3","entity-framework","controller","httprequest"],"question_text":"Very simple question: Are controllers in ASP.NET created for every http request ? Or are they created at application startup and reused throughout requests ?\nFor ...
{"title":"Difference between List View and DataGrid in WPF?","tags":[".net","wpf","listview","gridview","datagrid"],"question_text":"Hey I have to retrieve some questions from the database and display them on the user screen dynamically.I also need to add some controls in the columns of grid view,basically a question a...
{"title":"How to check whether a file is valid UTF-8?","tags":["validation","utf-8","internationalization"],"question_text":"I'm processing some data files that are supposed to be valid UTF-8 but aren't, which causes the parser (not under my control) to fail. I'd like to add a stage of pre-validating the data for UTF-8...
{"title":"MPMoviePlayerController Simulator Crash","tags":["ios","xcode","ios-simulator","mpmovieplayercontroller"],"question_text":"My MPMoviePlayerController crashes when I try and play any video.\nThis happens only on the simulator, works fine on a device.\nError is as follows:\n`2012-10-25 16:46:24.033 TheFasterChe...
{"title":"when exactly are we supposed to use \"public static final String\"?","tags":["java","final"],"question_text":"I have seen much code where people write\n`public static final String mystring = ...`\nand then just use a value.\nWhy do they have to do that? Why do they have to initialize the value as\n`final`\npr...
{"title":"Running a Python script from PHP","tags":["php","python","linux","exec","archlinux"],"question_text":"I'm trying to run a Python script from PHP using the following command:\n`exec('\/usr\/bin\/python2.7 \/srv\/http\/assets\/py\/switch.py arg1 arg2');`\nHowever, PHP simply doesn't produce any output. Error re...
{"title":"jQueryUI version 1.10 autocomplete - how to set _renderItem?","tags":["jquery-ui","jquery-ui-autocomplete"],"question_text":"Since I switched from jqueryui 1.8.1 to 1.10.x I realised that my custom item renderer doesn't work anymore:\n`Uncaught TypeError: Cannot set property '_renderItem' of undefined`\nWhat ...
{"title":"How do I perform a batch insert in Django?","tags":["sql","django"],"question_text":"In mysql, you can insert multiple rows to a table in one query for n > 0:\n`INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9), ..., (n-2, n-1, n);`\nIs there a way to achieve the above with Django queryset methods? H...
{"title":"VBA: Test if string begins with a string?","tags":["string","vba","built-in","startswith"],"question_text":"In VBA, what's the most straight forward way to test if a string begins with a substring? Java has\n`startsWith`\n. Is there a VBA equivalent?","answer_text":"There are several ways to do this:\nInStr\n...
{"title":"Why does ImageView.setImageMatrix() not work?","tags":["android","android-layout"],"question_text":"I want to rotate an image using ImageView.setImageMatrix(matrix) but it simply doesn't have any effect.\nI call matrix.postRotate(45, 20, 20); before passing it to the function above but no effect, the image is...
{"title":"Is there a way to remove the history for a single file in Mercurial?","tags":["version-control","mercurial","dvcs"],"question_text":"I think I already know the answer to this but thought I would ask anyway:\nWe have a file that got added to a Mercurial repository with sensitive information in it. Is there any...
{"title":"Ignore milliseconds when comparing two datetimes","tags":["c#","datetime","c#-4.0"],"question_text":"This is probably a dumb question, but I cannot seem to figure it out. I am comparing the LastWriteTime of two files, however it is always failing because the file I downloaded off the net always has millisecon...
{"title":"Cmake vs make sample codes?","tags":["makefile","cmake"],"question_text":"I was wondering if there was any sample code for\n`Makefile`\ns (\n`make`\n) and\n`CMakeLists.txt`\n(\n`cmake`\n) that both do the same thing (the only difference being that one is written in\n`make`\nand the other in\n`cmake`\n).\nI tr...
{"title":"\"'CDVPlugin.h' file not found\" in Cordova as component (Cleaver)","tags":["ios","cordova","phonegap-plugins"],"question_text":"I added Cordova as a component to my iOS project. Adding a custom plugin leads to the error, despite that the plugin works in a Cordova-only project:\n`'CDVPlugin.h' file not found`...
{"title":"proguard Missing type parameter","tags":["android","proguard"],"question_text":"i try obfuscate my code of android app with\n`ProGuard`\n. But after this my app give exception at running:\n`11-15 01:46:26.818: W\/System.err(21810): java.lang.RuntimeException: Missing type parameter.\n11-15 01:46:26.828: W\/Sy...
{"title":"Programmatically setting the width of a grid column with * in WPF","tags":["wpf","grid"],"question_text":"I want to programmatically configure a wpf grid.\nI want to be able to set a grid with 2 columns, the first taking up 20% of available space, the second taking up 80%. In xaml I would use the * operator b...
{"title":"Docker for Windows not working","tags":["docker"],"question_text":"I've installed Docker toolbox now and I get the error for everything:\n`Get http:\/\/127.0.0.1:2375\/v1.20\/version: dial tcp 127.0.0.1:2375: ConnectExtcp: No connection could be made because the target machine actively refused it..\n* Are you...
{"title":"Wait until any of Future<T> is done","tags":["java","multithreading","concurrency"],"question_text":"I have few asynchronous tasks running and I need to wait until at least one of them is finished (in the future probably I'll need to wait util M out of N tasks are finished).\nCurrently they are presented as F...
{"title":"How to start IDLE (Python editor) without using the shortcut on Windows Vista?","tags":["python","python-idle","komodo","pywin"],"question_text":"I'm trying to teach Komodo to fire up\nIDLE\nwhen I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer locatio...
{"title":"How can I search sub-folders using glob.glob module in Python?","tags":["python","glob"],"question_text":"I want to open a series of subfolders in a folder and find some text files and print some lines of the text files. I am using this:\n`configfiles = glob.glob('C:\/Users\/sam\/Desktop\/file1\/*.txt\")`\nBu...
{"title":"How to suppress Terminated message after killing in bash?","tags":["bash","unix","shell"],"question_text":"How can you suppress the\n`Terminated`\nmessage that comes up after you kill a\nprocess in a bash script?\nI tried\n`set +bm`\n, but that doesn't work.\nI know another solution involves calling\n`exec 2>...
{"title":"Difference between List<T> and LinkedList<T>","tags":["c#","c#-4.0"],"question_text":"We use List whenever we need a list. I notice now that there is a LinkedList.\nI was wondering what was the difference between these 2, and when you should use one over the other.","answer_text":"Well,\n`List<T>`\nis basical...
{"title":"Scala map sorting","tags":["sorting","scala","map"],"question_text":"How do I sort a map of this kind:\n`\"01\" -> List(34,12,14,23), \"11\" -> List(22,11,34)`\nby the beginning values?","answer_text":"One way is to use scala.collection.immutable.TreeMap, which is always sorted by keys:\n`val t = TreeMap(\"01...
{"title":"Find location of current m-file in MATLAB","tags":["matlab"],"question_text":"I'm working on my\nMATLAB\ncode in a number of different locations, and it would really help if I could make the code aware of its location on the computer. I think there is a function that gives me exactly this information, but I c...
{"title":"What is the actual differences between I18n\/L10n\/G11n and specifically what does each mean for development?","tags":["localization","internationalization","globalization"],"question_text":"Possible Duplicate:\nLocalization and internationalization, what\u00e2\u0080\u0099s the difference?\nI18n\/L10n\/G11n a...
{"title":"NSString - how to go from \"\u00c3\u0081lgeBra\" to \"Algebra\"","tags":["iphone","nsstring","compare"],"question_text":"Does anyone knows hoe to get a NSString like \"\u00c3\u0081lgeBra\" to \"Algebra\", without the accent, and capitalize only the first letter?\nThanks,\nRL","answer_text":"dreamlax has alrea...
{"title":"\"int -> int -> int\" What does this mean in F#?","tags":["f#","functional-programming","currying"],"question_text":"I wonder what this means in F#.\n\u00e2\u0080\u009ca function taking an integer,\nwhich returns a function which takes an integer and returns an integer.\u00e2\u0080\u009d\nBut I don't understa...
{"title":"How to preserve identifierForVendor in ios after uninstalling ios app on device?","tags":["ios","uuid","uniqueidentifier","identifier"],"question_text":"I am developing an iOS app which calls web-service for login and at that time i send login credentials to web server along with vendor identifier (identifier...
{"title":"Autowiring in servlet","tags":["spring","java-ee","servlets","dependency-injection","autowired"],"question_text":"i want to use spring autowiring in servlet so here's my code:\n`@Configurable\npublic class ImageServlet extends HttpServlet {\n @Autowired\n private SystemPropertyDao systemPropertyDao;\n @Overri...
{"title":"Test for value in Javascript Array","tags":["javascript"],"question_text":"In SQL Server, I could say:\n`WHERE X IN(1,2)`\nHow would you rewrite the following in JavaScript:\n`if (X==1 || X==2) {}`","answer_text":"Use indexOf to see if x is in an array.\n`if([1,2].indexOf(x) !== -1)`","question_code":["WHERE ...
{"title":"Connection string with relative path to the database file","tags":["c#","string","connection","sql-server-ce"],"question_text":"I load data from sdf database in winforms App. I use full path to the database file . Example :\n`conn = new SqlCeConnection\n{\nConnectionString =\"Data Source=F:\\\\My Documents\\\...
{"title":"IEnumerable<T>.Contains with predicate","tags":["c#","linq","ienumerable","contains","predicate"],"question_text":"I need just to clarify that given collection contains an element.\nI can do that via\n`collection.Count(foo => foo.Bar == \"Bar\") > 0)`\nbut it will do the unnecessary job - iterate the whole co...
{"title":"Change color of the overflow button on ActionBar","tags":["android","android-actionbar"],"question_text":"Is it possible to change the color of the overflow button(3 vertical dots) on the action bar?\nIf so, how do we do that? I didn't find any style for overflow button.\nThanks","answer_text":"You can change...
{"title":"Object Library Not Registered When Adding Windows Common Controls 6.0","tags":["visual-studio","vb6","registration","ocx"],"question_text":"I am trying to install Visual Studio 6 on a Windows 7 32bit machine.\nThe OS intall was from bare metal.\nI followed the instructions mentioned\nhere\n(which I have used ...
{"title":"rsync: --include-from vs. --exclude-from what is the actual difference?","tags":["bash","unix","rsync"],"question_text":"In the documentation, it mentions these as being files containing lists of either patterns to include or patterns to exclude. However, that implies for inclusions, everything is considered ...
{"title":"How can you disable scroll bars in the jQuery UI dialog box?","tags":["jquery","jquery-ui","dialog","scroll"],"question_text":"Does anyone know if there is a way to disable scroll bars in the jquery dialog box? The content that I have in the div is 300 px but the dialog is set to 200px. It automatically puts ...
{"title":"Using Stride in Swift 2.0","tags":["swift","sequence","stride"],"question_text":"I'm trying to figure out how to use the Stride features in Swift.\nIt seems to have changed again, since Xcode 7.0 beta 6.\nPreviously I could use\n`let strideAmount = stride(from: 0, to: items.count, by: splitSize)\nlet sets = s...