text
stringlengths
74
309k
{"title":"Sublime Text: how to make shortcut for inserting text?","tags":["keyboard-shortcuts","sublimetext2","shortcut","sublimetext"],"question_text":"I need make a shortcut that will be adding certain text at the cursor, eg {sometext}, how can this be done?","answer_text":"Select the\nKey Bindings - User\nitem under...
{"title":"Facebook sharer, pass in a comment?","tags":["facebook","share"],"question_text":"Is it possible to post a description\/comment variable to the facebook sharer url? It's only possible for url and title as far as I can figure out.","answer_text":"The parameters that you can pass to the actual\n`sharer.php`\nar...
{"title":"ui-bootstrap drop down seems to be not working with version 0.12.0","tags":["angularjs","angular-ui-bootstrap"],"question_text":"Something seems to have been broken with version 0.12.0 of ui-bootstrap. Here is my plunkr that shows the issue\nThis works with version 0.11.0\nhttp:\/\/plnkr.co\/edit\/9XJx2c2X7lR...
{"title":"Error: ld: library not found for -lPods with CocoaPods","tags":["ios","objective-c","cocoapods","dtcoretext"],"question_text":"after i installed DTCoreText (\nhttps:\/\/github.com\/Cocoanetics\/DTCoreText\n) with Cocoapods i always get an error when i try to run the simulator or device!\n`ld: warning: directo...
{"title":"Static extension methods on Seq module","tags":["f#","extension-methods"],"question_text":"According to\nthis post\n, F# supports extension methods on object instances and static classes. For example:\n`module CollectionExtensions = \n type System.Linq.Enumerable with \n static member RangeChar(first:char, la...
{"title":"How to import a fixed width flat file into database using SSIS?","tags":["ssis","flat-file"],"question_text":"Does any one have a tutorial on how to import a fixed width flat file into a database using an SSIS package?\nI have a flat file containing columns with varying lengths.\n`Column name Width\n---------...
{"title":"Force strings to UTF-8 from any encoding","tags":["ruby-on-rails","ruby","utf-8","character-encoding"],"question_text":"In my rails app I'm working with RSS feeds from all around the world, and some feeds have links that are not in UTF-8. The original feed links are out of my control, and in order to use them...
{"title":"How to configure WCF services to work through HTTPS without HTTP binding?","tags":[".net","wcf","iis","web-config"],"question_text":"I have configured my WCF services to work with SSL but it works ONLY if the HTTP binding exists in the IIS Web Site. When the HTTP binding not exists and exists only HTTPS bindi...
{"title":"How to run a single test in guard for rspec?","tags":["ruby-on-rails","ruby","rspec","guard"],"question_text":"I use\nguard-rspec\nto automatically run necessary rspec tests as my files changes, and I love how it works. However, when I'm debugging a file with multiple tests, sometimes I just want an individua...
{"title":"Logcat won't show up","tags":["android","logcat"],"question_text":"I am somewhat new to android and I am setting up my view perspectives (that i am fairly anal about). I want to have logcat showing on my normal editing perspective.\nBut I go into Window>Show View>Other Views.. select android and logcat. And t...
{"title":"Bash command line and input limit","tags":["bash","shell","command-line-arguments"],"question_text":"Is there some sort of character limit imposed in bash (or other shells) for how long an input can be? If so, what is that character limit?\nI.e. Is it possible to write a command in bash that is too long for t...
{"title":"Why is extending native objects a bad practice?","tags":["javascript","prototype","prototypal-inheritance"],"question_text":"Every JS opinion leader says that extending the native objects is a bad practice. But why? Do we get a perfomance hit? Do they fear that somebody does it \"the wrong way\", and adds enu...
{"title":"Passing parameters to inclusion in Liquid templates","tags":["jekyll","liquid"],"question_text":"In my Jekyll-powered website I have an inclusion that does something function-like, but I can't figure out how to pass it parameters correctly. When I pass parameters like\n`{% include function.liquid foo=\"{{baz....
{"title":"UIPopover How do I make a popover with buttons like this?","tags":["ios","ipad","uipopovercontroller","uiactionsheet","uialertcontroller"],"question_text":"I'm wondering how I can create a popover with buttons like this.\nANSWER:\n`UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil \n del...
{"title":"Why should I NOT use the GAC?","tags":[".net","gac"],"question_text":"There have been a few questions asked along this line stackoverflow such as\nWhat are the advantages and disadvantages of using the GAC\nand\nWhen and when-not to install into the GAC?\nand a few people have asked it on the \nweb\nexpamle\n...
{"title":"Breaking out of a loop from within a function called in that loop","tags":["c","for-loop","break"],"question_text":"I'm currently trying to figure out a way to break out of a\n`for`\nloop from within a function called in that loop. I'm aware of the possibility to just have the function return a value and then...
{"title":"Removing multiple spaces in NSString","tags":["ios","objective-c","iphone"],"question_text":"I have a\n`NSString`\n, this has multiple spaces, I want to trim those spaces and make a single space for e.g.@\"how.....are.......you\" into @\"how are you\".(dots are simply spaces)\nI have tried with\n`NSString *tr...
{"title":"Can someone explain to me what the Shapeless library is for?","tags":["scala","shapeless"],"question_text":"Can someone explain to me in simple terms what the Shapeless library is for?\nScala has generics and inheritance functionality so I'm a bit confused what Shapeless is for.\nMaybe a use case to clarify t...
{"title":"Go: find the path to the executable","tags":["path","go"],"question_text":"I compile a program with Go for various platforms and run it by calling a relative path or just by its name (if it is in the PATH variable).\nIs it possible to find out where the executable is?\nSay, my program is called \"\n`foo`\n(\n...
{"title":"In Python, is there a concise way of comparing whether the contents of two text files are the same?","tags":["python"],"question_text":"I don't care what the differences are. I just want to know whether the contents are different.","answer_text":"The low level way:\n`from __future__ import with_statement\nwit...
{"title":"Prevent dismissal of UIAlertController","tags":["swift","uialertcontroller"],"question_text":"I am adding a\n`UITextField`\nto a\n`UIAlertController`\n, which appears as an\n`AlertView`\n. Before dismissing the\n`UIAlertController`\n, I want to validate the input of the\n`UITextField`\n. Based on the validati...
{"title":"Error when running library(ggplot2)","tags":["r","ggplot2"],"question_text":"I just updated to R 2.11.1 and after installing ggplot2, I tried\n`library(ggplot2)`\nand got\n`Loading required package: proto\nLoading required package: grid Loading\nrequired package: reshape Loading\nrequired package: plyr Loadin...
{"title":"How does foreach work when looping through function results?","tags":["c#",".net","foreach"],"question_text":"Suppose I have the following code:\n`foreach(string str in someObj.GetMyStrings())\n{\n \/\/ do some stuff\n}`\nWill\n`someObj.GetMyStrings()`\nbe called on every iteration of the loop? Would it be be...
{"title":"java.lang.IncompatibleClassChangeError: Implementing class with ScalaCheck and ScalaTest","tags":["scala","scalatest","scalacheck"],"question_text":"I'm facing a nasty exception when trying to write a test using ScalaCheck and ScalaTest. Here's my dependencies:\n`libraryDependencies ++= Seq(\n \"org.scalatest...
{"title":"What does the [[carries_dependency]] attribute mean?","tags":["c++","multithreading","c++11","memory-model","carries-dependency"],"question_text":"Can someone explain it in a language that mere mortals understand?","answer_text":"`[[carries_dependency]]`\nis used to allow dependencies to be carried across fun...
{"title":"Can you use HTML entities in the CSS \u00e2\u0080\u009ccontent\u00e2\u0080\u009d property?","tags":["html","css"],"question_text":"I would like to use HTML entities in CSS, but it shows me the\n`•`\ninstead.\n`.down:before{\n content:\"• \";\n color:#f00;\n}`\nAlso, why does the above code not work ...
{"title":"What's wrong with my include in RelativeLayout?","tags":["android","android-layout"],"question_text":"I want to create an activity with a title bar at top and a navigation bar at bottom. I used\n`include`\nto include the title bar layout and the navigation bar layout into the main layout as you can see below....
{"title":"Bash: Split string into character array","tags":["string","bash"],"question_text":"I have a string in a Bash shell script that I want to split into an array of characters, not based on a delimiter but just one character per array index. How can I do this?\nIdeally it would not use any external programs.\nLet ...
{"title":"Recycleview notifyDataSetChanged() IllegalStateException","tags":["android","recyclerview"],"question_text":"I'm trying to update the items of a recycleview using notifyDataSetChanged().\nThis is my onBindViewHolder() method in the recycleview adapter.\n`@Override\npublic void onBindViewHolder(ViewHolder view...
{"title":"UITableView headings shown on top of MBProgressHUD","tags":["iphone","ios","uitableview","mbprogresshud"],"question_text":"So I have a subclass of UITableViewController that loads some data from the internet and uses MBProgressHUD during the loading process. I use the standard MBProgressHUD initialization.\n`...
{"title":"Why aren't \"and\" and \"or\" operators in Python?","tags":["python","operators","language-design","boolean","keyword"],"question_text":"I wasn't aware of this, but apparently the\n`and`\nand\n`or`\nkeywords aren't operators. They don't appear in the\nlist of python operators\n. Just out of sheer curiosity, w...
{"title":"Do you validate your URL variables?","tags":["validation","url","server-side"],"question_text":"When you're passing variables through your site using GET requests, do you validate (regular expressions, filters, etc.) them before you use them?\nSay you have the URL\nhttp:\/\/www.example.com\/i=45&p=custform\n....
{"title":"Django: Cannot update a query once a slice has been taken","tags":["django","django-queryset"],"question_text":"I am trying to do this:\n`UserLog.objects.filter(user=user).filter(action='message').filter(timestamp__lt=now)[0:5].update(read=True)`\nbut I am getting this error:\n`Cannot update a query once a sl...
{"title":"How to create all possible combinations from the elements of a list?","tags":["list","scala","for-loop"],"question_text":"I have the following list:\n`List(a, b, c, d, e)`\nHow to create all possible combinations from the above list?\nI expect something like:\n`a\nab\nabc`","answer_text":"Or you could use the...
{"title":"ASP.NET MVC ActionLink outside area","tags":["asp.net-mvc","asp.net-mvc-areas"],"question_text":"A simple task in MVC, sometimes becomes a hard challenge.\nWell,i have an Area called Admin. I've a page named \"Forbidden\" inside the Shared's directory in this area.\nThe goal is simple: I need to create an Htm...
{"title":"How can I perform a culture-sensitive \"starts-with\" operation from the middle of a string?","tags":[".net","string","unicode"],"question_text":"I have a requirement which is relatively obscure, but it feels like it\nshould\nbe possible using the BCL.\nFor context, I'm parsing a date\/time string in\nNoda Ti...
{"title":"Mongoid \/ Mongodb and querying embedded documents","tags":["ruby-on-rails","mongodb","mongoid"],"question_text":"I have\n`Author`\nand\n`Book`\nmodels.\nAn\n`Author`\nhas many embedded\n`Books`\n.\nCan I query the embedded\n`Books`\n, or do I have to fetch\n`Authors`\nfirst to get\n`Books`\n?","answer_text":...
{"title":"Jquery validation plugin - TypeError: $(...).validate is not a function","tags":["javascript","jquery","jquery-validate"],"question_text":"My script throw errors:\nTypeError: jQuery.validator is undefined additional-methods.js:20\n TypeError: $(...).validate is not a function index.php:115\nProbably, I have m...
{"title":"Line before and after title over image","tags":["css","css3","css-shapes"],"question_text":"I want to create a\nline before and after a centered title\n. The line and text must have a\ntransparent background\nto be able to position them on a uneven background. The line must not be 100% width, like this:\nThe ...
{"title":"Android: How to disable list items on list creation","tags":["java","android","list","listview"],"question_text":"I'm pretty new to Android dev and still working out a lot of things.\nI've got a main menu showing using the following code, but can't work out how to disable selected items in the menu. Can anybo...
{"title":"Set port for php artisan.php serve","tags":["laravel","laravel-4","php-5.4"],"question_text":"How do we set a custom port for test server?\nNormally when we do\n`php artisan serve`\nthe folder gets served as :\n`localhost:8000`\nHow do could we access one folder as:\n`localhost:8080`\nI want to access two dif...
{"title":"Searching for a sequence of Bytes in a Binary File with Java","tags":["java","search","byte","binaryfiles"],"question_text":"I have a sequence of bytes that I have to search for in a set of Binary files using Java.\nExample: I'm searching for the byte sequence\n`DEADBEEF`\n(in hex) in a Binary file.\nHow woul...
{"title":"Location for session files in Apache\/PHP","tags":["php","apache","session"],"question_text":"What is the default location of session files on an installation of Apache\/PHP on Ubuntu 10.10?","answer_text":"The\ndefault\n`session.save_path`\nis set to\n`\"\"`\nwhich will evaluate to your system's temp directo...
{"title":"Running multiple instances of Rails Server","tags":["ruby-on-rails"],"question_text":"I am new to Rails, so please forgive me if this is obvious.\nI am doing a lot of experimenting, creating to applications, testing features, etc. It got my first scaffolded app running great, but I wanted to create a second a...
{"title":"Ruby on Rails on Windows XP CTRL+C in console not stopping mongrel","tags":["ruby-on-rails","ruby","console","windows-xp"],"question_text":"I am currently in the process of learning Ruby on Rails. I have been following the\nLearning Rails\npodcast and screencasts.\nI've run into a problem, well more of an ann...
{"title":"Change Parent url from iframe","tags":["javascript","iframe","parent"],"question_text":"Need help with a simple problem! which has the following criteria:\n1) click on images link in iframe changes Parent page, click on another iframe image link changes Parent to another page (see below).\nIt may sound simple...
{"title":"PHP - exit or return which is better?","tags":["php","terminate"],"question_text":"I would like to know in the following case which is a better solution:\nIn the PHP script, if the fileSize is larger than 100 then I stop the script.\n`<?php\n...\nif ($fileSize > 100) \/\/ case I\n{\n $results['msg'] = 'fileSi...
{"title":"difference between IComparable and IComparer","tags":["c#",".net","icomparable","icomparer"],"question_text":"Possible Duplicate:\nWhen to use IComparable<T> Vs. IComparer<T>\nwhat is the difference between IComparable and IComparer Interfaces? Is it necessary to use this interface always with Array.Sort() me...
{"title":"In Objective C, can you check if an object has a particular property or message?","tags":["objective-c"],"question_text":"I wat to do something like this:\n`if (viewController.mapView) [viewController.mapView someMethod];`\nHowever, if mapView is not a class variable, this crashes. How do I check if mapView e...
{"title":"Converting from byte to int in java","tags":["java","type-conversion"],"question_text":"I have generated a secure random number, and put its value into a byte. Here is my code.\n`SecureRandom ranGen = new SecureRandom();\nbyte[] rno = new byte[4]; \nranGen.nextBytes(rno);\nint i = rno[0].intValue();`\nBut I a...
{"title":"Creating a full screen iframe","tags":["html","iframe","xss"],"question_text":"I'm currently looking into XSS attacks, with the aim of using them in client demonstrations (I'm a pen tester). I've written a tool that will host a malicious version of a website's login page (that harvests usernames and passwords...
{"title":"Do Hibernate table classes need to be Serializable?","tags":["java","hibernate","orm","serializable"],"question_text":"I have inherited a Websphere Portal project that uses Hibernate 3.0 to connect to a SQL Server database.\nThere are about 130 Hibernate table classes in this project. They all implement Seria...
{"title":"Mysql query to dynamically convert rows to columns","tags":["mysql","sql","pivot"],"question_text":"Can MySQL convert columns into rows, dynamically adding as many columns as are needed for the rows. I think my question might be related to pivot tables but I'm unsure and I don't know how to frame this questio...
{"title":"How to show more than 100 tasks \/\/TODOs at once in Eclipse?","tags":["eclipse","cdt","todos"],"question_text":"As the title says, how do I display more than 100 tasks at once in Tasks window in Eclipse? Alternatively, how do I browse tasks past 100?\nI have a lot of .c files in my project with many \/\/TODO...
{"title":"Multithreading: When would I use a Join?","tags":["c#","multithreading"],"question_text":"I see online that it says I use\n`myThread.Join();`\nwhen I want to block my thread until another thread finishes. (One of the things I don't get about this is what if I have multiple threads).\nBut generally, I just don...
{"title":"Remove .svn folders","tags":["svn"],"question_text":"I am using SVN while developing a\nWordPress\nsite. Now I want to upload it to the server and there are loads of SVN files in\n`.svn`\nfolders. Are these safe to remove and how do I remove them?","answer_text":"`find -type d -name .svn|xargs rm -rf`","quest...
{"title":"Uploading file using Jersey over RESTfull service and The resource configuration is not modifiable?","tags":["java","rest","file-upload","jersey","jersey-2.0"],"question_text":"`@Path(\"file.upload\")\npublic class UploadFileService {\n@POST\n@Consumes(MediaType.MULTIPART_FORM_DATA)\npublic Response uploadFil...
{"title":"Generating a random & unique 8 character string using MySQL","tags":["mysql","sql"],"question_text":"I'm working on a game which involves vehicles at some point. I have a MySQL table named \"vehicles\" containing the data about the vehicles, including the column \"plate\" which stores the License Plates for t...
{"title":"What does a single apostrophe mean in Scala?","tags":["scala","actor"],"question_text":"In this slide show on\nScalaActors.pdf\nwhat does the single quote indicate when the message is sent to the pong actor?\n`class Ping(count: int, pong: Pong) extends Actor {\ndef act() {\n pong ! 'Ping \/\/ what does the si...
{"title":"A preferred way to check if asp.net web application is in debug mode during runtime?","tags":["c#","asp.net","web-config"],"question_text":"During compile time I can do a check like\n`#if DEBUG\n Log(\"something\");\n#endif`\nBut what would be the preferred to check if\n`debug=\"false\"`\nis set in Web.config...
{"title":"Template onload event for meteor.js","tags":["javascript","meteor"],"question_text":"I know meteor exposes events such as \"click\", for DOM element but I'm wondering if there's a load event that's fired when a template or partial is loaded? How would I accomplish this?\nThanks.","answer_text":"For Meteor sta...
{"title":"Update app.config system.net setting at runtime","tags":["c#",".net","app-config","system.net"],"question_text":"I need to update a setting in the system.net SectionGroup of a .Net exe app.config file at runtime. I don't have write access to the original config file at runtime (I am developing a .Net dll add-...
{"title":"Structs, Interfaces and Boxing","tags":["c#","struct","interface","value-type","boxing"],"question_text":"Possible Duplicate:\nIs it safe for structs to implement interfaces?\nTake this code:\n`interface ISomeInterface\n{\n public int SomeProperty { get; }\n}\nstruct SomeStruct : ISomeInterface\n{\n int someV...
{"title":"Calling a jQuery plugin without specifying any elements","tags":["javascript","jquery","jquery-plugins"],"question_text":"Say I have the following jQuery plugin:\n`$.fn.myPlugin = function () {\n \/\/plugin code\n}`\nNormally, you call a plugin on a certain number of elements, like such:\n`$(\"body\").myPlugi...
{"title":"When to use an Eventstore","tags":[".net","domain-driven-design","cqrs","event-store"],"question_text":"I am not quite sure I understood what an Eventstore is, I thought of it as some kind of \"Transactionlog\" for Domainobjects. What are the advantages\/disadvantages of it and what are good scenarios to use ...
{"title":"How to load an image in prepareForInterfaceBuilder with a IBDesignable UIImageView","tags":["ios","uiimageview","swift"],"question_text":"I would like to load a sample image in an IB designable\n`UIImageView`\n, to be shown in Interface Builder while editing the interface. The following code does not work, as...
{"title":"Using helpers in rails 3 to output html","tags":["ruby-on-rails","ruby","ruby-on-rails-3","html-helper","actionviewhelper"],"question_text":"I'm trying my best to build a helper that outputs a <'ul> consisting of all the members of a collection. For each member of the collection I want to print out a <'li> th...
{"title":"Why is Matlab so popular in the computer vision community even with OpenCV being so complete?","tags":["c++","matlab","opencv","computer-vision"],"question_text":"I've noticed that Matlab is very popular among the computer vision and image processing community still to this day, even though OpenCV is a very m...
{"title":"Protected in Interfaces","tags":["java","interface"],"question_text":"Why are all methods in an\n`interface`\ndefinition implicitly\n`public`\n? Why does it not allow a\n`protected`\nmethod?","answer_text":"Because an interface is supposed to mean \"what you can see from outside the class\". It would not make...
{"title":"Why is 08 not a valid integer literal in Java?","tags":["java","numbers","int"],"question_text":"Why is\n`08`\nconsidered an out of range int but\n`07`\nand below are not?","answer_text":"In Java and several other languages, an integer literal beginning with\n`0`\nis interpreted as an octal (base 8) quantity....
{"title":"Restore the state of std::cout after manipulating it","tags":["c++","iostream"],"question_text":"Suppose I have a code like this:\n`void printHex(std::ostream& x){\n x<<std::hex<<123;\n}\n..\nint main(){\n std::cout<<100; \/\/ prints 100 base 10\n printHex(std::cout); \/\/prints 123 in hex\n std::cout<<73; \/...
{"title":"Java: How to check if a Field is of type java.util.Collection","tags":["java","reflection","types"],"question_text":"I have a utility method that goes through various classes and recursively retrieves the fields. I want to check if that field is a Collection.\nHere is some sample code:\n`void myMethod(Class<?...
{"title":"Direct access to DataGridView combobox in one click?","tags":["c#","datagridview"],"question_text":"I'm getting annoyed with clicking once to select a row in the datagridview, and then clicking again to click on a control in that row (in this case a combobox).\nIs there a way configure this thing so that all ...
{"title":"Rotate bitmap by real angle","tags":["delphi","image-processing","rotation"],"question_text":"Once upon a time, reading\nthis question\n, I wondered how to rotate a bitmap by any degree without fiddling around with all the bits myself. Recently,\nsomeone else\nhad obvious difficulties with it too.\nThere are ...
{"title":"Does anything like <a href=\"fax:number\">number<\/a> exist?","tags":["html","fax","url-scheme"],"question_text":"As we use\n`<a href=\"tel:number\">number<\/a> or <a href=\"mailto:mailid>mailid<\/a>`\nfor telephone number & email, does anything like\n`<a href=\"fax:number\">number<\/a>`\nfor fax exist?","ans...
{"title":"What's the location of the JavaFX runtime JAR file, jfxrt.jar, on Linux?","tags":["java","linux","eclipse","javafx","openjdk"],"question_text":"I'm trying to run some JavaFX code with Eclipse Kepler, with\ne(fx)clipse\nplugin installed, on a Linux machine, using:\n`java version \"1.7.0_21\"\nOpenJDK Runtime E...
{"title":"have IntelliJ IDEA refresh the project and detect changed files","tags":["eclipse","file","intellij-idea","refresh"],"question_text":"I'm using Eclipse for development because of all the things IntelliJ can't do (e.g. highlight all instances of a variable) and because IntelliJ is dog slow over a remote connec...
{"title":"How to change the Color of text in UITabBarItem in iOS 5","tags":["iphone","ios","xcode","uitabbarcontroller","uitabbar"],"question_text":"with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ?\nEDIT:working solution\n`[[UITabBarItem appearanc...
{"title":"Rails passing form_for object to partial","tags":["ruby-on-rails","object","partials","actionview"],"question_text":"I would like to pass the\n`form_for`\nobject to a partial:\n`<%= form_for @price do |f| %>\n ...\n <%= render :partial => \"price_page\", :object => @price, :as => :f %>\n ...\n<% end %>`\nWhen...
{"title":"Copy table structure to new table in sqlite3","tags":["sql","database","sqlite3","copy"],"question_text":"Is there an easy way to copy an existing table structure to a new one? \n(dont need the data, only the structure -> like id INTEGER, name varchar(20) ...)\nThx","answer_text":"You could use a command like...
{"title":"Format Date with fmt:formatDate JSP","tags":["jsp","jstl"],"question_text":"I am trying to format a date with:\n`<fmt:formatDate value=\"${newsletter.createdOn}\" pattern=\"MM\/dd\/yyyy\"\/>`\nnewsletter is an object with a\n`createdOn`\nproperty which is\n`java.util.Date`\n.\nWhen I invoke the previous sente...
{"title":"Logging, Aspect Oriented Programming, and Dependency Injection - Trying to make sense of it all","tags":[".net","unit-testing","logging","dependency-injection","aop"],"question_text":"I know that logging is a prime use case for AOP. Additionally logging wrappers are also exemplified as cases when you want to ...
{"title":"Does malloc() allocate a contiguous block of memory?","tags":["c","coding-style","code-review","malloc"],"question_text":"I have a piece of code written by a very old school programmer :-) . it goes something like this\n`typedef struct ts_request\n{ \n ts_request_buffer_header_def header; \n char package[1]; ...
{"title":"Can I add maven repositories in the command line?","tags":["java","maven-2","build-process"],"question_text":"I'm aware I can add maven repositories for fetching dependencies in ~\/.m2\/settings.xml. But is it possible to add a repository using command line, something like:\n`mvn install -Dmaven.repository=ht...
{"title":"Is it better to use Cache or CDN?","tags":["performance","cdn","browser-cache"],"question_text":"I was studying about browser performance when loading static files and this doubt has come.\nSome people say that use CDN static files (i.e. Google Code, jQuery\n latest, AJAX CDN,...) is better for performance, b...
{"title":"facebook Sharer popup window","tags":["php","javascript","facebook","metadata"],"question_text":"The FB sharer popup window displays the data of the page, not the metadata I have inserted in the php link.\n`<a href=\"http:\/\/www.facebook.com\/sharer\/sharer.php?s=100&p%5Btitle%5D=Google&p%5Burl%5D=http%3A%2F...
{"title":"Swift AnyObject is not convertible to String\/Int","tags":["swift","xcode6-beta6"],"question_text":"I want to parse a JSON to object, but I have no idea how to cast AnyObject to String or Int since I'm getting:\n`0x106bf1d07: leaq 0x33130(%rip), %rax ; \"Swift dynamic cast failure\"`\nWhen using for example:\...
{"title":"Maven : error: generics are not supported in -source 1.3 , I am using 1.6","tags":["maven"],"question_text":"I have imported an existing Maven project into Eclipse IDE .\nI have modified some code in it , it compiled successfully , \nI am using Java 1.6 as compiler\nand when i am trying to run maven clean ins...
{"title":"Can you specify a key for $addToSet in Mongo?","tags":["mongodb","pymongo"],"question_text":"I have a document:\n`{ 'profile_set' :\n [\n { 'name' : 'nick', 'options' : 0 },\n { 'name' : 'joe', 'options' : 2 },\n { 'name' : 'burt', 'options' : 1 }\n ] \n}`\nand would like to add a new document to the profile_...
{"title":"C# FindAll VS Where Speed","tags":["c#","performance","where","findall"],"question_text":"Anyone know any speed differences between Where and FindAll on List. I know Where is part of IEnumerable and FindAll is part of List, I'm just curious what's faster.","answer_text":"The FindAll method of the List<T> clas...
{"title":"Check if ionic app is in dev serve mode(browser)","tags":["javascript","browser","ionic-framework","ionic"],"question_text":"I use\n`ionic serve`\nto run my app on localhost.\nhow can I know when I'm in\nbrowser\nand not in\nandroid\n?\nI tried:\n`navigator.platform \/\/ MacIntel\nnavigator.platforms \/\/ und...
{"title":"How can I deprecate an entire protocol?","tags":["objective-c","gcc","protocols","deprecated"],"question_text":"Is it possible to deprecate an entire protocol? I'm using the GCC compiler that is shipped with iOS SDK 5.0 Beta 7.\n`DEPRECATED_ATTRIBUTE`\ndoesn't seem to work.\nFor example, the following two sta...
{"title":"golang large app example?","tags":["web","go"],"question_text":"I'm a python programmer trying to get my feet wet with go. Specifically, for a while, I've been a web programmer, and been spoiled by using flask and the amazing debugging (ipdb, pudb, etc).\nI digress - my question is if there's an example go we...
{"title":"angularjs: ng-message always showing","tags":["angularjs","ng-messages"],"question_text":"I'm using angular-messages to display form validation errors on my angular app.\nAs per the documentation, I have built the following code\n`<form name=\"loginForm\">\n <label class=\"item item-input\">\n <input type=\"e...
{"title":"jquery - How to determine if a div changes its height or any css attribute?","tags":["javascript","jquery","css"],"question_text":"I wanna know how to trigger an event when a div changes its height or any css attribute.\nI have a div with id =\n`mainContent`\n. I want jquery to automatically trigger an event ...
{"title":"How do I animate a glowing effect on text?","tags":["jquery","css"],"question_text":"I haven't really been able to find any good simple tutorials an animating a glow effect.\nHere is something I found:\nhttp:\/\/jsfiddle.net\/G3J6V\/\nbut it doesn't work, so I don't even know if it will have the look that I w...
{"title":"In Java, what are the boolean \"order of operations\"?","tags":["java","logic","boolean","evaluation","operator-precedence"],"question_text":"Let's take a simple example of an object\n`Cat`\n. I want to be sure the \"not null\"\n`cat`\nis either orange or grey.\n`if(cat != null && cat.getColor() == \"orange\"...
{"title":"How can I remove the \"No file chosen\" tooltip from a file input in Chrome?","tags":["javascript","jquery","html","css","google-chrome"],"question_text":"I would like to remove the \"No file chosen\" tooltip from a file input in Google Chrome (I see that no tooltip is displayed in Firefox).\nPlease notice th...
{"title":"The correct way to read a data file into an array","tags":["perl"],"question_text":"I have a data file, with each line having one number, like\n`10\n20\n30\n40`\nHow do I read this file and store the data into an array?\nSo that I can conduct some operations on this array.","answer_text":"Just reading the fil...
{"title":"How do I delete a remote branch in Git?","tags":["git"],"question_text":"I created a branch\n`notmaster`\nto commit as well as push some changes. When I was finished with that branch, I merged the changes back into\n`master`\n, pushed them out, and then deleted the local\n`notmaster`\n.\n`$ git branch -a\n* m...