text stringlengths 74 309k |
|---|
{"title":"How to display default text \"--Select Team --\" in combo box on pageload in WPF?","tags":["wpf","combobox"],"question_text":"In a WPF app, in MVP app, I have a combo box,for which I display the data fetched from Database. Before the items added to the Combo box, I want to display the default text such as\n\"... |
{"title":"Add values to an associative array in PHP","tags":["php"],"question_text":"I want to append an element to to end of an associative array.\nFor example, my array is\n`$test=Array ([chemical] => asdasd [chemical_hazards] => ggggg )`\nand my result should be\n`$test=Array ([chemical] => asdasd [chemical_hazards]... |
{"title":"max(length(field)) in mysql","tags":["sql","mysql"],"question_text":"If I say:\n`select max(length(Name)) \n from my_table`\nI get the result as 18, but I want the concerned data also. So if I say:\n`select max(length(Name)), \n Name \n from my_table`\n...it does not work. There should be a self join I guess ... |
{"title":"Running phonegap on device - no device found","tags":["android","cordova"],"question_text":"I am trying to run an app that I made in phonegap on my device, connected with USB.\n`-> phonegap run android\n[phonegap] detecting Android SDK environment...\n[phonegap] using the local environment\n[phonegap] compili... |
{"title":"Difference between object and instance","tags":["oop"],"question_text":"I know this sort of question has been\nasked\nbefore\n, but I still feel that the answer is too ambiguous for me (and, by extension, some\/most beginners) to grasp.\nI have been trying to teach myself broader concepts of programming than ... |
{"title":"Continue Considered Harmful?","tags":["language-agnostic","loops","goto","continue"],"question_text":"Should developers avoid using\ncontinue\nin C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about\nGoto\n?","answer_text":"... |
{"title":"append to url and refresh page","tags":["javascript","jquery","refresh"],"question_text":"I am looking to write a piece of javascript that will append a parameter to the current url and then refresh the page - how can I do this?","answer_text":"this should work (not tested!)\n`var url = window.location.href; ... |
{"title":"Separating class code into a header and cpp file","tags":["c++","oop","class"],"question_text":"I am confused on how to separate implementation and declarations code of a simple class into a new header and cpp file. For example, how would I separate the code for the following class?\n`class A2DD\n{\n private:... |
{"title":"How do I use the built in password reset\/change views with my own templates","tags":["python","django","passwords"],"question_text":"For example I can point the\n`url '^\/accounts\/password\/reset\/$'`\nto\n`django.contrib.auth.views.password_reset`\nwith my template filename in the context but I think need ... |
{"title":"ffmpeg unable to find encoder libvpx","tags":["ffmpeg","libvpx"],"question_text":"when i run\n`ffmpeg -y -i test.mov -threads 8 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M -acodec libvorbis -aq 90 -ac 2 OUTPUT_FILE.webm`\nit ... |
{"title":"Where should I use defrecord in clojure?","tags":["clojure"],"question_text":"I use many maps and structs in my clojure programs. What are the benefits (apart from performance) of converting these to defrecords?","answer_text":"I consider structs to be effectively deprecated so I don't use them at all.\nWhen ... |
{"title":"In Julia, why is @printf a macro instead of a function?","tags":["julia-lang"],"question_text":"In Julia, the syntax to print a formatted string is as follows:\n`@printf(\"Hello %d\\n\", 5)`\nWhy is\n`@printf`\na macro instead of a function? Is it so that it can accept a varying number of arguments?","answer_... |
{"title":"What is the difference between OpenID and SAML?","tags":["openid","saml"],"question_text":"What is the difference between OpenID and SAML?","answer_text":"They are two different protocols of authentication and they differ at the technical level.\nFrom a distance, differences start when users initiate the auth... |
{"title":"Aborting commit due to empty commit message","tags":["git"],"question_text":"As a newbie git user, when I try to commit my work with\n`git commit -a -v`\nand I enter a commit message in my editor, I close the file, and get this error:\n`Aborting commit due to empty commit message.`\nI have read nearly all the... |
{"title":"Python optparse Values Instance","tags":["python","dictionary","optparse"],"question_text":"How can I take the opt result of\n`opt, args = parser.parse_args()`\nand place it in a dict? Python calls opt a \"Values Instance\" and I can't find any way to turn a Values Instance into a list or dict. One can't copy... |
{"title":"How to collapse blocks of code in Eclipse?","tags":["eclipse"],"question_text":"Some days ago my Eclipse was working fine and a +\/- appeared in every block that could be collapsed (functions, classes, etc.)... but now it does appear, and I don't know how to activate that feature again.\nIt's Eclipse Helios, ... |
{"title":"\"verify error:num=20\" when connecting to gateway.sandbox.push.apple.com","tags":["ssl","openssl","apple-push-notifications"],"question_text":"I am attempting to run the Ray Wenderlich tutorial found at\nApple Push Notification Services in iOS 6 Tutorial: Part 1\/2\n.\nI created an AppID and SSL certificate ... |
{"title":"android.support.v4.app.getFragmentManager() returns null?","tags":["android","android-fragments","android-support-library"],"question_text":"This is my Stacktrace:\n`FATAL EXCEPTION: main\njava.lang.NullPointerException\nat com.example.test.fragments.LoadingFragment$1.run(LoadingFragment.java:66)\nat android.... |
{"title":"How to drop all stored procedures at once in SQL Server database?","tags":["sql","sql-server","tsql"],"question_text":"Currently we use separate a drop statements for each stored procedure in the script file:\n`IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MySP]') \n AND type in (N... |
{"title":"How can I put an input element on the same line as its label?","tags":["html","css"],"question_text":"I would like to put a\n`label`\nand an\n`input[type=text]`\non the same line, and I would like for the\n`input`\n's width to fill the remaining width of the containing element, regardless of the length of the... |
{"title":"Fragment pressing back button","tags":["android","android-fragments","back"],"question_text":"I am now having an activity containing fragments\n[1] , [2] , [3] , [4]\nIf pressing buttons , [3] , it can be redirected to [4]\nI would like to implement the back button as shown follow..\nwhen pressing back at [4]... |
{"title":"Determining Date Equality in Javascript","tags":["javascript","date","equality"],"question_text":"I need to find out if two dates the user selects are the same in Javascript. The dates are passed to this function in a String (\"xx\/xx\/xxxx\").That is all the granularity I need.\nHere is my code:\n`var valid ... |
{"title":"Drawable folders in res folder?","tags":["android","image","drawable"],"question_text":"What is the difference between the three drawable folders in the res folder in the project hierarchy? If I have an image to put into a folder, which folder do I put it in?","answer_text":"I am going to take a guess that \"... |
{"title":"How to get the attr reference in code?","tags":["android","android-layout"],"question_text":"I'm looking to get the pointing reference from an attribute via code. In my xml layouts I can easily get the referenced drawable like this:\n`android:background=\"?attr\/listItemBackground\"`\nThe attribute reference ... |
{"title":"How foldr works","tags":["haskell","combinators","fold"],"question_text":"Can anybody explain how\n`foldr`\nworks?\nTake these examples:\n`Prelude> foldr (-) 54 [10,11]\n53\nPrelude> foldr (\\x y -> (x+y)\/2) 54 [12,4,10,6]\n12.0`\nI am confused about these executions, any suggestions?","answer_text":"The eas... |
{"title":"NSIndexpath.item vs NSIndexpath.row","tags":["ios","uitableview","nsindexpath"],"question_text":"Does anyone know the difference between\n`NSIndexpath.row`\nand\n`NSIndexpath.item`\n?\nSpecifically, which one do I use in:\n`-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexP... |
{"title":"Where are rake tasks defined?","tags":["ruby-on-rails","ruby","rake","rakefile"],"question_text":"On a freshly created Rails project (generated by\n`rails someName`\n), one can run some 'default' rake tasks like:\n`rake test`\n`rake db:migrate`\netc\nQuestion is, where does these tasks get described? The defa... |
{"title":"In Angular 2 how do you determine the active route?","tags":["javascript","typescript","angular2","angular2-routing"],"question_text":"NOTE:\nThere are many different answers here, and most have been valid at one time or another. The fact is that what works has changed a number of times as the Angular 2 team ... |
{"title":"iPhone SDK : textFieldShouldReturn not being called","tags":["iphone","uitextfield"],"question_text":"We're trying to figure out how to get the keyboard to hide, but we're having problems getting the\n`textFieldShouldReturn`\nto fire. We are not sure why?\nThis is what has been done:\n*.h\n`@interface MultiSa... |
{"title":"Change a command line argument - bash","tags":["bash","command-line-arguments"],"question_text":"Is there a way to change the command line arguments in a bash script. Say for example, a bash script is invoked the following way:\n`.\/foo arg1 arg2`\nIs there a way to change the value of arg1 within the script?... |
{"title":"How can I install and use ack library on Windows?","tags":["windows","perl","ack"],"question_text":"I have never used Perl, but I am really impressed by the\nack\n, which I would like to use for source code searching, etc.\nCan anyone guide me of how to make use of this excellent library on Windows?","answer_... |
{"title":"Does PHP time() return a GMT\/UTC Timestamp?","tags":["php"],"question_text":"I just want to check if\n`time()`\nreturns a UTC\/GMT timestamp or do I need to use\n`date_default_timezone_set()`\n?","answer_text":"`time`\nreturns a UNIX timestamp, which is timezone independent. Since a UNIX timestamp denotes th... |
{"title":"What is the biggest mistake people make when starting to use LINQ?","tags":[".net","linq"],"question_text":"What are the fundamental misunderstandings people have when they first start using LINQ?\nFor instance, do they think it is one thing when it is really something else?\nAnd, are there some best practice... |
{"title":"Difference between 2 dates in seconds","tags":["php","date"],"question_text":"Possible Duplicates:\nNumber of seconds from now() to Sunday midnight\nCalculates difference between two dates in PHP\nHello All,\nIn my project, I need to calculate the\ndifference in seconds between two dates\n:\nFor Example :\n`$... |
{"title":"Do you recommend using semicolons after every statement in JavaScript?","tags":["javascript"],"question_text":"In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?\nIf you're unfamiliar with the rules, there's a description of semi... |
{"title":"How to convert a multipart file to File?","tags":["java","spring","spring-mvc","file-upload","cloudinary"],"question_text":"Can any one tell me what is a the best way to convert a multipart file (org.springframework.web.multipart.MultipartFile) to File (java.io.File) ?\nIn my spring mvc web project i'm gettin... |
{"title":"How to extract a floating number from a string in Python","tags":["python","regex","floating-point","data-extraction"],"question_text":"I have a number of strings similar to\n`Current Level: 13.4 db.`\nand I would like to extract just the floating point number. I say floating and not decimal as it's sometimes... |
{"title":"How does Radix Sort work?","tags":["algorithm","sorting","radix-sort"],"question_text":"I don't know why this is so hard for me to wrap my head around. I've looked through the wiki pages, and pseudo code (as well as actual code) trying to understand how radix sort algorithms work (with respect to buckets).\nA... |
{"title":"strcpy vs strdup","tags":["c","strcpy","strdup"],"question_text":"I read that\n`strcpy`\nis for copying a string, and\n`strdup`\nreturns a pointer to a new string to duplicate the string.\nCould you please explain what cases do you prefer to use\n`strcpy`\nand what cases do you prefer to use\n`strdup`\n?","an... |
{"title":"Functions In CoffeeScript","tags":["javascript","coffeescript"],"question_text":"I'm trying to convert a\n`function`\nfrom Javascript to CoffeeScript. This is the code:\n`function convert(num1, num2, num3) {\n return num1 + num2 * num3;\n}`\nBut how I can do that in CoffeeScript?\nI'm trying to run the functi... |
{"title":"Calling JMX MBean method from a shell script","tags":["java","sysadmin","jmx"],"question_text":"Are there any libraries that would allow me to call a JMX MBean method from a shell script. We expose some operations\/admin commands through JMX, and we could have our admins use JConsole, or VisualVM, but some ta... |
{"title":"Jquery Location Href?","tags":["javascript","jquery"],"question_text":"Possible Duplicate:\nHow can I make a redirect page in jQuery\/JavaScript?\nI remember there's a redirect function in jquery.\nIt was like:\n`$(location).href('http:\/\/address.com')`\nbut what was it exactly? I couldn't remember and can't... |
{"title":"Bind to a value defined in the Settings","tags":["wpf","binding","appsettings"],"question_text":"In WPF, Can I use binding with values defined in Settings? If this is possible, please provide a sample.","answer_text":"First, you need to add a custom XML namespace that will design the namespace where the setti... |
{"title":"html5 audio player - jquery toggle click play\/pause?","tags":["jquery","audio","html5"],"question_text":"i wonder what i'm doing wrong?\n`$('.player_audio').click(function() {\n if ($('.player_audio').paused == false) {\n $('.player_audio').pause();\n alert('music paused');\n } else {\n $('.player_audio').pl... |
{"title":"\"#include\" a text file in a C program as a char[]","tags":["c","include","c-preprocessor"],"question_text":"Is there a way to include an entire text file as a string in a C program at compile-time?\nsomething like:\nfile.txt:\n`This is\na little\ntext file`\nmain.c:\n`#include <stdio.h>\nint main(void) {\n ... |
{"title":"What is the Difference Between read() and recv() , and Between send() and write()?","tags":["c","sockets","unix","network-programming","posix"],"question_text":"what is the difference between read() and recv() , and between send() and write() in socket programming ? performance and speed and other behavior.",... |
{"title":"Multiple Table SQLite DB Adapter(s) in Android?","tags":["android","sqlite","sqlite3"],"question_text":"I was reading the Android SQLite NotePad tutorial that referenced creating a DB Adapter class to create and access a DB table. When dealing with a multi-table SQLite Database, is it best practice to create ... |
{"title":"how to create an \"array of selectors\"","tags":["iphone","objective-c","nsarray","selector"],"question_text":"I'm using the iPhone SDK (3.0) and I'm trying to create an\narray of selectors\nto invoke a variety of methods within one class.\nObviously, I'm doing something wrong (I think @selector isn't conside... |
{"title":"How to set default values in Rails?","tags":["ruby-on-rails","ruby"],"question_text":"I'm trying to find the best way to set default values for objects in Rails.\nThe best I can think of is to set the default value in the\n`new`\nmethod in the controller.\nDoes anyone have any input if this is acceptable or i... |
{"title":"ResolveUrl without an ASP.NET Page","tags":["c#",".net","asp.net","resolveurl"],"question_text":"I am looking for a way to resolve a relative url the way you would with a page or control instance (\nMSDN Docs\n) such as:\n`Page.ResolveUrl(\"~\/common\/Error.aspx\");`\n...but when I only have an HttpContext av... |
{"title":"Determine the process pid listening on a certain port","tags":["unix","port","freebsd","pid"],"question_text":"As the title says, I'm running multiple game servers, and every of them has the same\n`name`\nbut different\n`PID`\nand the\n`port`\nnumber. I would like to match the\n`PID`\nof the server which is ... |
{"title":"How can I convert a string to a number in Perl?","tags":["string","perl","floating-point"],"question_text":"How would I convert a string holding a number into its numeric value in Perl?","answer_text":"You don't need to convert it at all:\n`% perl -e 'print \"5.45\" + 0.1;'\n5.55`","question_code":[],"answer_... |
{"title":"How can you get the \"real\" HttpContext within an ASP.NET MVC application?","tags":["asp.net-mvc","elmah"],"question_text":"Unfortunately, I need to do this. I'm using ELMAH for my error log. Before I route to my error.aspx view, I have to grab the default ELMAH error log so I can log the exception. You used... |
{"title":"Where are all my inodes being used?","tags":["linux","unix","posix","inode"],"question_text":"How do I find out which directories are responsible for chewing up all my inodes?\nUltimately the root directory will be responsible for the largest number of inodes, so I'm not sure exactly what sort of answer I wan... |
{"title":"How to get the previous url using PHP","tags":["php","url","website"],"question_text":"Suppose my site's url is given as hyperlink on some page on the internet; that page could be anything on internet - blog, orkut, yahoo, even stackoverflow etc, and someone clicks on it,and visited my site. So can we know, u... |
{"title":"Find deleted files in Mercurial repository history, quickly?","tags":["version-control","mercurial"],"question_text":"You can use hg grep, but it searches the contents of all files.\nWhat if I just want to search the file names of deleted files to recover one?\nI tried hg grep -I\nfile-name-pattern\npattern\n... |
{"title":"Can someone explain this template code that gives me the size of an array?","tags":["c++","arrays","templates","size"],"question_text":"`template<typename T, size_t n>\nsize_t array_size(const T (&)[n])\n{\n return n;\n}`\nThe part that I don't get is the parameters for this template function. What happens wi... |
{"title":"CSS Pseudo-classes with inline styles","tags":["html","css","css-selectors","pseudo-class","inline-styles"],"question_text":"Is it possible to have pseudo-classes using inline styles?\nExample:\n`<a href=\"http:\/\/www.google.com\" style=\"hover:text-decoration:none;\">Google<\/a>`\nI know the above HTML won'... |
{"title":"Is it possible to for SQL Output clause to return a column not being inserted?","tags":["sql","sql-server"],"question_text":"I've made some modifications to my database and I need to migrate the old data to the new tables. For that, I need to fill a table (ReportOptions) taking the data from the original tabl... |
{"title":"How do I remove the divider from a listview on android?","tags":["android","android-listview","divider"],"question_text":"I'm developing a app that have a\n`Listview`\n, and the items from list already have a style I don't need the divider.\nHow do I set as hidden or remove the divider from the\n`ListView`\n?... |
{"title":"Ruby rails - select only few columns from the data base","tags":["ruby-on-rails","ruby","ruby-on-rails-3","activerecord"],"question_text":"What is the way in rails to structure sql query to only select certain columns from the database, I have some large data fields which I want to avoid loading from continuo... |
{"title":"NSMutableArray addObject: -[__NSArrayI addObject:]: unrecognized selector sent to instance","tags":["iphone","nsmutablearray"],"question_text":"I have tried to initialize my NSMutableArray 100 ways from Sunday, and NOTHING is working for me. I tried setting it equal to a newly allocated and initialized NSMuta... |
{"title":"How can I make Rails 3 localize my date formats?","tags":["ruby-on-rails","localization","internationalization","ruby-on-rails-3"],"question_text":"I am working on a Rails 3 project where there is place for date input within a form. The text field with the date uses a date picker so there is no concern about ... |
{"title":"How to list all symbolic links on an NTFS filesystem","tags":["winapi","windows-7","windows-vista","ntfs","symlink"],"question_text":"since Windows Vista there is an new Win32-API call\nCreateSymbolicLink\nto create a symbolic link on the NTFS filesystem.\nDoes anyone know if there is an way to list all exist... |
{"title":"How to determine UIWebView height based on content, within a variable height UITableView?","tags":["ios","iphone","cocoa-touch","uitableview","uiwebview"],"question_text":"I am trying to create a\n`UITableView`\nwith variable height rows as explained in the answer to\nthis question\nMy problem is each cell co... |
{"title":"Is it considered acceptable to not call Dispose() on a TPL Task object?","tags":["c#",".net","multithreading","dispose","task-parallel-library"],"question_text":"I want to trigger a task to run on a background thread. I don't want to wait on the tasks completion.\nIn .net 3.5 I would have done this:\n`ThreadP... |
{"title":"Best way to obfuscate an e-mail address on a website?","tags":["javascript","html","email","obfuscation"],"question_text":"I've spent the past few days working on updating my personal website. The URL of my personal website is (my first name).(my last name).com, as my last name is rather unusual, and I was lu... |
{"title":"Checking to see if a string is a valid date. Ruby on Rails","tags":["ruby-on-rails","ruby","string","date"],"question_text":"Say I have a string: \"31-02-2010\" and I want to check see whether or not it is a valid date or not.\nWhat is the best way to do it?\nI need a method which I can call on string which r... |
{"title":"The necessity of hiding the salt for a hash","tags":["security","encryption","hash","brute-force"],"question_text":"At work we have two competing theories for salts. The products I work on use something like a user name or phone number to salt the hash. Essentially something that is different for each user bu... |
{"title":"Casting a result to float in method returning float changes result","tags":["c#",".net",".net-4.0","casting","floating-point"],"question_text":"Why does this code print\n`False`\nin .NET 4? It seems some unexpected behavior is being caused by the explicit cast.\nI'd like an answer beyond \"floating point is i... |
{"title":"Does GPS require Internet?","tags":["android","google-maps","geolocation","gps"],"question_text":"Is it necessary to turn both\n`Internet`\nand\n`GPS`\non before I can read my current location(country, city, locality etc) in my app? If they are, then any alternative way to get the location only from GPS? sinc... |
{"title":"Android check permission for LocationManager","tags":["android","locationmanager"],"question_text":"I'm trying to get the GPS coordinates to display when I click a button in my activity layout. The following is the method that gets called when I click the button:\n`public void getLocation(View view) {\n TextV... |
{"title":"Quadratic Bezier Curve: Calculate Point","tags":["math","point","curve","quadratic"],"question_text":"Hey,\nI'd like to calculate a point on a quadratic curve. To use it with the canvas element of html5.\nWhen I use the quadraticCurveTo() Function in JavaScript, I have a source point, a target point and a con... |
{"title":"What is difference between XML Schema and DTD?","tags":["xml","schema","dtd"],"question_text":"I have googled this question, but I do not understand clearly what is an XML schema and DTD (document type definition), and why the XML schema is more powerful compared to DTD.\nAny guidance would be highly apprecia... |
{"title":"In JavaScript, what is the advantage of !function(){}() over (function () {})()?","tags":["javascript","design-patterns","iife"],"question_text":"Possible Duplicate:\nWhat does the exclamation mark do before the function?\nI've long used the following for self-executing, anonymous functions in JavaScript:\n`(... |
{"title":"android - how to convert int to string and place it in a EditText?","tags":["android","string","android-edittext","integer","data-type-conversion"],"question_text":"I have this piece of code:\n`ed = (EditText) findViewById (R.id.box); \nint x = 10; \ned.setText (x);`\nIt turns out to be an error. I know I hav... |
{"title":"Rails 3.2: Heroku push rejected, no Cedar-supported app detected","tags":["ruby-on-rails","heroku","cedar"],"question_text":"Rails newbie here. I'm trying to deploy my Rails 3.1\/Ruby 1.9.3-p0 app to Heroku and have followed all the steps according to Heroku. But I keep running into:\nHeroku push rejected, no... |
{"title":"How to get PHP $_GET array?","tags":["php"],"question_text":"Is it possible to have a value in\n`$_GET`\nas an array?\nIf I am trying to send a link with\n`http:\/\/link\/foo.php?id=1&id=2&id=3`\n, and I want to use\n`$_GET['id']`\non the php side, how can that value be an array? Because right now\n`echo $_GE... |
{"title":"After array_filter(), how can I reset the keys to go in numerical order starting at 0","tags":["php","arrays"],"question_text":"I just used array_filter to remove entries that had only the value '' from an array, and now I want to apply certain transformations on it depending on the placeholder starting from ... |
{"title":"How to access the form's 'name' variable from PHP","tags":["php","forms"],"question_text":"I'm trying to create a BMI calculator. This should allow people to use either metric or imperial measurements.\nI realise that I could use hidden tags to solve my problem, but this has bugged me before so I thought I'd ... |
{"title":"Change EOL on multiple files in one go","tags":["notepad++","batch-processing","eol"],"question_text":"Is there any way in Notepad++ (or even with another tool) to change the line ending automatically\non multiple files in one go\n?\ni.e. convert a mix of windows EOL (\n`CRLF`\n) and UNIX EOL (\n`LF`\n) files... |
{"title":"Prevent WebView from displaying \"web page not available\"","tags":["java","android"],"question_text":"I have an app that makes extensive use of a WebView. When the user of this app does not have Internet connection, a page saying \"web page not available\" and various other text appears. Is there a way to no... |
{"title":"How to measure time of a statement in scala console?","tags":["regex","scala"],"question_text":"I'm using Scala to measure performance of regex engine of java. The regexp below executes in around 3 seconds but yet I'm not able to measure it using System.currentTimeMillis. (the last expression returns 0)\n`sca... |
{"title":"how to conditionally show jsp content to logged in users with Spring security","tags":["java","spring","jsp","spring-security"],"question_text":"I want to show content to any user that is logged in and to hide if they are not logged in. I'm using jsp's and spring security.\nObviously a home grown solution is ... |
{"title":"Execution failed for task ':app:compileDebugAidl': aidl is missing","tags":["android","android-studio","android-gradle","build.gradle","aidl"],"question_text":"I installed Android Studio on my computer. I created a new project but that got me the error below. What can I do?\n`Error:Execution failed for task '... |
{"title":"validate a dropdownlist in asp.net mvc","tags":["c#","asp.net-mvc","razor"],"question_text":"`\/\/in controller\nViewBag.Categories = categoryRepository.GetAllCategories().ToList();\n\/\/in view\n @Html.DropDownList(\"Cat\", new SelectList(ViewBag.Categories,\"ID\", \"CategoryName\"))`\nHow can I make it so t... |
{"title":"file_get_contents when url doesn't exist","tags":["php","file-get-contents"],"question_text":"I'm using file_get_contents() to access a URL.\n`file_get_contents('http:\/\/somenotrealurl.com\/notrealpage');`\nIf the URL is not real, it return this error message. How can I get it to error gracefully so that I k... |
{"title":"Read file object as string in python","tags":["python","file","urllib2"],"question_text":"I'm using\n`urllib2`\nto read in a page. I need to do a quick regex on the source and pull out a few variables but\n`urllib2`\npresents as a file object rather than a string.\nI'm new to python so I'm struggling to see h... |
{"title":"Converting between datetime, Timestamp and datetime64","tags":["python","datetime","numpy","pandas"],"question_text":"How do I convert a\n`numpy.datetime64`\nobject to a\n`datetime.datetime`\n(or\n`Timestamp`\n)?\nIn the following code, I create a datetime, timestamp and datetime64 objects.\n`import datetime\... |
{"title":"Swift. UILabel text alignment","tags":["enums","uilabel","swift"],"question_text":"I create my UILabel in swift:\n`let label = UILabel(frame: CGRect( x: 50, y: 50, width: 100, height: 50))`\nsetting properties seems to be easy:\n`label.textColor = UIColor.redColor()`\nHow to implement enum types like textAlig... |
{"title":"How to correctly unregister an event handler","tags":["c#",".net","events","delegates"],"question_text":"In a code review, I stumbled over this (simplified) code fragment to unregister an event handler:\n`Fire -= new MyDelegate(OnFire);`\nI thought that this does not unregister the event handler because it cr... |
{"title":"What Node.JS-specific files and folders are usually excluded via .gitignore?","tags":["git","node.js"],"question_text":"I'm a newbie Node.JS developer...\nWhat do developers usually exclude from their Node.JS git repositories in production via .gitignore?\nnode_modules? bin? Etc...","answer_text":"GitHub has\... |
{"title":"Navigation Drawer semi-transparent over status bar not working","tags":["android","navigation-drawer","android-5.0-lollipop","material-design"],"question_text":"I am working on Android project and I am implementing the Navigation Drawer. I am reading through the new\nMaterial Design Spec\nand the\nMaterial De... |
{"title":"How to rename files and folder in Amazon S3?","tags":["amazon-web-services","amazon-s3","amazon"],"question_text":"Is there any function to rename files and folders in Amazon S3? Any related suggestions are also welcome.","answer_text":"I just tested this and it works:\n`aws s3 --recursive mv s3:\/\/<bucketna... |
{"title":"create_or_update method in rails","tags":["ruby-on-rails","ruby"],"question_text":"`if ClassName.exists?([\"id = ?\", self.id])\n object = ClassName.find_by_name(self.name)\n object.update_attributes!( :street_address => self.street_address,\n :city_name => self.city_name,\n :name => self.org_unit_name,\n :st... |
{"title":"Google Analytics libAdIdAccess.a does not contain bitcode","tags":["google-analytics","xcode7","bitcode"],"question_text":"Xcode 7 beta 3 just installed some \"additional components\" (now Version 7.0 beta 3 (7A152u)), and now I'm getting a compiler error:\n`ld: '\/<abbreviated>\/Vendor\/Analytics\/GoogleAnal... |
{"title":"How does OpenID authentication work?","tags":["authentication","website","openid"],"question_text":"I am a little curious to know about how OpenID authentication works.\nIs there any difference between OpenID authentication and the authentication which sites use exclusively for themselves?","answer_text":"Wha... |
{"title":"How to unsubscribe the subscribed function in knockout?","tags":["javascript","knockout.js"],"question_text":"I already subscribe the function to listen the property value change using ko.\n`var self = this;\n$( document ).ready( function () {\nvar postbox = new ko.subscribable();\nvar myViewModel =\n{\n Firs... |
{"title":"Sizeof string literal","tags":["c++","string","sizeof"],"question_text":"The following code\n`#include <iostream> \nusing namespace std;\nint main()\n{\n const char* const foo = \"f\";\n const char bar[] = \"b\";\n cout << \"sizeof(string literal) = \" << sizeof( \"f\" ) << endl;\n cout << \"sizeof(const char... |
{"title":"How to enable the Java keyword assert in Eclipse program-wise?","tags":["java","eclipse","assert","assertions"],"question_text":"How can I enable the\n`assert`\nkeyword in Eclipse?\n`public class A\n{\n public static void main(String ... args)\n {\n System.out.println(1);\n assert false;\n System.out.println(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.