text
stringlengths
74
309k
{"title":"How to change the font and font size of an HTML input tag?","tags":["html","css"],"question_text":"`<input id=\"txtComputer\">`\nHow do I make my text inside the input tag bigger? I want to make it 24 size font. It would also be good if I can change the font from the default","answer_text":"`<input type =\"te...
{"title":"angular: updating scope on hover","tags":["css","angularjs"],"question_text":"I'd like some child div of a main div be hidden by default an visible when you hover over the main div.\nI'm trying to have that native in angular and forget the\n`.hover()`\nway in jquery.\nI though about using\n`ng-show`\non the c...
{"title":"how to turn off break line in eclipse","tags":["java","eclipse"],"question_text":"Does anybody know how to turn line breaking in eclipse after you press\n`CTRL + SHIFT + F`\n(code format), ex :\n`System.err\n .println(\"Incorrect file name, make sure you include .extension with your file name\");`","answer_te...
{"title":"How do i find the largest value in a column in postgres sql?","tags":["sql","postgresql","max"],"question_text":"For example:\n`name | weight\njon 100 \njane 120 \njoe 130`\nHow do I only return the name of the person with the largest weight?","answer_text":"`SELECT name FROM tbl ORDER BY weight DESC LIMIT 1`...
{"title":"ProgressBar under Action Bar","tags":["android","android-actionbar","android-progressbar"],"question_text":"Question Summary:\nHow can I make a\n`ProgressBar`\nintegrated inside the\n`ActionBar`\n, like on the Chrome App?\nDetails:\nLook at this screenshot from Chrome:\nI want to create an Action Bar just lik...
{"title":"Adding HttpClient headers generates a FormatException with some values","tags":["c#","dotnet-httpclient","google-cloud-messaging"],"question_text":"This occurred within the context of coding against Google Cloud Messaging, but applies elsewhere.\nConsider the following:\n`var http = new HttpClient();\nhttp.De...
{"title":"Change color of text when button is pushed?","tags":["ios","swift","uibutton"],"question_text":"I know how to change the background color but what about the actual text? There doesn't seem to be a member on a UIButton called \"color\" or anything like that. \nMy code:\n`@IBAction func yellowBtnClicked(sender:...
{"title":"How to make the mysql MEMORY ENGINE store more data?","tags":["mysql","memory"],"question_text":"I want to alter a table from INNODB to MEMORY ENGINE.\nSo I typed this command:\n`alter table sns ENGINE=MEMORY;`\nThen the MySQL shows\n`ERROR 1114 (HY000): The table '#sql-738_19' is full`\nThe data size for the...
{"title":"How do I toggle an element's class in pure JavaScript?","tags":["javascript","dom","toggle"],"question_text":"I'm looking for a way to convert this jQuery code (which is used in responsive menu section) to pure JavaScript.\nIf it's hard to implement it's OK to use other JavaScript frameworks.\n`$('.btn-navbar...
{"title":"JavaScript - Hide a Div at startup (load)","tags":["javascript","jquery","css","html","hide"],"question_text":"I have a div in my php page that uses jQuery to hide it once the page has loaded. But is there a way to hide it from the very start of loadup?\nThe reason I ask is because for a brief second, you can...
{"title":"Tilde operator in Regular expressions","tags":["php","regex","pcre"],"question_text":"I want to know what's the meaning of tilde operator in regular expressions.\nI have this statement:\n`if (!preg_match('~^\\d{10}$~', $_POST['isbn'])) {\n $warnings[] = 'ISBN should be 10 digits';\n}`\nI found this document e...
{"title":"How to efficiently filter a data frame?","tags":["r","filter","r-faq"],"question_text":"I have a data frame and tried to select only the observations I'm interested in by this:\n`data[data[\"Var1\"]>10]`\nUnfortunately, this command destroys the data.frame structure and returns a long vector.\nWhat I want to ...
{"title":"How to combine two Jar files","tags":["java","applet"],"question_text":"Is it possible to combine two jar files such that in an applet tag I can simply do something like\n`archive=\"jarjar.jar\/jar1.jar\"... ...archive=\"jarjar.jar\/jar2.jar\"... instead of\narchive=\"jar1.jar\"... ...archive=\"jar2.jar\"...`...
{"title":"Can Haskell functions be proved\/model-checked\/verified with correctness properties?","tags":["testing","haskell","functional-programming","formal-methods","formal-verification"],"question_text":"Continuing on from ideas in:\nAre there any provable real-world languages?\nI don't know about you, but I'm\nsick...
{"title":"Best way to automagically migrate tests from JUnit 3 to JUnit 4?","tags":["java","junit","migration"],"question_text":"I have a bunch of JUnit 3 classes which extend TestCase and would like to automatically migrate them to be JUnit4 tests with annotations such as\n`@Before`\n,\n`@After`\n,\n`@Test`\n, etc.\nA...
{"title":"CSS Margins Overlap Problem","tags":["css","margins"],"question_text":"Please see my code, I don't understand why the margins of these divs are overlapping.\n`<div class=\"alignright\">\n <div class=\"social\">\n <a href=\"#\" class=\"twit\"><\/a>\n <a href=\"#\" class=\"fb\"><\/a>\n <\/div><!-- social -->\n ...
{"title":"ElasticSearch, multi-match with filter?","tags":["elasticsearch"],"question_text":"I have a multi-match query in ES, and wish to add a filter.\n`{\n \"multi_match\" : {\n \"query\" : \"this is a test\",\n \"fields\" : [ \"subject^2\", \"message\" ]\n }\n}`\nWhat is the syntax for adding this filter?\nI tried:...
{"title":"What's the Difference Between nil and Nil","tags":["objective-c","xcode"],"question_text":"In Objective C?\nAre they really the same thing?\nHow to test that an object is nil?","answer_text":"`Nil`\nand\n`nil`\nare defined to be the same thing (\n`__DARWIN_NULL`\n), and are meant to signify nullity (a null po...
{"title":"What is the difference between creating JSF pages with .jsp or .xhtml or .jsf extension","tags":["jsp","jsf","facelets","file-extension"],"question_text":"I saw some examples creating the JSF pages with\n`.jsp`\nextension, other examples creating them with\n`.xhtml`\nextension, and other examples choose\n`.js...
{"title":"Using Rsync include and exclude options to include directory and file by pattern","tags":["linux","unix","rsync","darwin"],"question_text":"I'm having problems getting my rsync syntax right and I'm wondering if my scenario can actually be handled with rsync. First, I've confirmed that rsync is working just fi...
{"title":"How to remove PreferenceCategory programmatically?","tags":["android","preferences"],"question_text":"I need to remove a PreferenceCategory programmatically. I could remove the individual preferences with the following code but I need to remove (disable) whole PreferenceCategory as well.\n`PreferenceScreen pr...
{"title":"JavaFX 2.1 TableView refresh items","tags":["java","javafx","tableview","javafx-8","fxml"],"question_text":"I have this common issue, as it appears to be. My table view wont refresh my items after I reset them. I have checked the data and it's the new one.\nI tried multiple solution from internet but no succe...
{"title":"Best equivalent VisualStudio IDE for Mac to program .NET\/C#","tags":["c#",".net","osx","ide"],"question_text":"I'm using my Mac most time at work. At home there's my Windows computer, where I program with Visual Studio my .NET\/C# stuff.\nBecause I want to program outside, it would be great to have an equiva...
{"title":"Creating link to an url of Flask app in jinja2 template","tags":["python","flask","jinja2","url-for"],"question_text":"In my Flask app, I have a view which displays a post\n`@post_blueprint.route('\/post\/<int:year>\/<int:month>\/<title>')\ndef get_post(year,month,title):\n # My code`\nTo display the last 10 ...
{"title":"How to redirect all output to \/dev\/null","tags":["bash","pipe","output-redirect","dev-null"],"question_text":"I want to run a program (google-chrome) in the background, but prevent it from outputting any messages to the terminal.\nI tried doing this:\n`google-chrome 2>&1 1>\/dev\/null &`\nHowever, the termi...
{"title":"Python: printing a file to stdout","tags":["python"],"question_text":"I've searched and I can only find questions about the other way around: writing stdin to a file :)\nIs there a quick and easy way to dump the contents of a file to stdout?","answer_text":"Sure. Assuming you have a string with the file's nam...
{"title":"Preferred\/idiomatic way to insert into a map","tags":["c++","stl","insert","stdmap","std-pair"],"question_text":"I have identified four different ways of inserting into a\n`std::map`\n:\n`std::map<int, int> function;\nfunction[0] = 42;\nfunction.insert(std::map<int, int>::value_type(0, 42));\nfunction.insert...
{"title":"Mongodb and PostgreSql thoughts","tags":["sql","database","postgresql","mongodb","nosql"],"question_text":"I've got an app fully working with PostgreSql. After reading about Mongodb, I was interested to see how the app would work with it. After a few weeks, I migrated the whole system to Mongodb.\nI like a fe...
{"title":"When do function-level static variables get allocated\/initialized?","tags":["c++","c","variables"],"question_text":"I'm quite confident that globally declared variables get allocated (and initialized, if applicable) at program start time.\n`int globalgarbage;\nunsigned int anumber = 42;`\nBut what about stat...
{"title":"Doing a Http basic authentication in rails","tags":["ruby-on-rails","ruby"],"question_text":"Hi I'm from Grails background and new to Rails. I wish to do http basic authentication in rails.\nI have a code in grails which does basic authentication like this:\n`def authString = \"${key}:\".getBytes().encodeBase...
{"title":"Clear file cache to repeat performance testing","tags":["performance","file","caching","disk"],"question_text":"What tools or techniques can I use to remove cached file contents to prevent my performance results from being skewed? I believe I need to either completely clear, or selectively remove cached infor...
{"title":"Given a type instance, how to get generic type name in C#?","tags":["c#","reflection","code-generation"],"question_text":"Given a generic type, including\n`List<string>\nNullable<Int32>`\nhow do i get a generic name for C#?\n`var t = typeof(Nullable<DateTime>); \nvar s = t.GetGenericTypeDefinition().Name + \"...
{"title":"Convert Byte Array to Image and Display in Razor View","tags":["asp.net-mvc","image","asp.net-mvc-3","razor","bytearray"],"question_text":"I am using\nEF 4.1 Code First\nand for the sake of simplicity, let's say I have the following Entity class:\n`public class Person\n{\n public int Id { get; set; }\n public...
{"title":"Should you wrap 3rd party libraries that you adopt into your project?","tags":["refactoring"],"question_text":"A discussion I had with a colleague today.\nHe claims whenever you use a 3rd party library, you should always write for it a wrapper. So you can always change things later and accomodate things for y...
{"title":"Split a module across several files","tags":["module","rust"],"question_text":"I want to have a module with multiple structs in it,\neach in its own file.\nUsing a\n`Math`\nmodule as an example:\n`Math\/\n Vector.rs\n Matrix.rs\n Complex.rs`\nI want each struct to be in the same module, which I would use from...
{"title":"Select \/ assign to data.table variables which names are stored in a character vector","tags":["r","data.table"],"question_text":"How do you refer to variables in a\n`data.table`\nif the variable names are stored in a character vector? For instance, this works for a\n`data.frame`\n:\n`df <- data.frame(col1 = ...
{"title":"conversion of a varchar data type to a datetime data type resulted in an out-of-range value","tags":["sql","sql-server","service","sqlexception"],"question_text":"I have the following piece of inline SQL that I run from a C# windows service:\n`UPDATE table_name SET \n status_cd = '2', \n sdate = CAST('03\/28\...
{"title":"Calling Haskell from C++ code","tags":["c++","haskell","linker","ffi"],"question_text":"I'm currently writing an app in C++ and found that some of its functionality would be better written in Haskell. I've seen instructions on\ncalling Haskell from C code\n, but is it possible to do the same with C++?\nEDIT:\...
{"title":"Clojure: Semi-Flattening a nested Sequence","tags":["clojure","sequence"],"question_text":"I have a list with embedded lists of vectors, which looks like:\n`(([1 2]) ([3 4] [5 6]) ([7 8]))`\nWhich I know is not ideal to work with. I'd like to flatten this to\n`([1 2] [3 4] [5 6] [7 8])`\n.\nflatten doesn't wo...
{"title":"How to grey out a button?","tags":["android","button"],"question_text":"I have a button defined as shown below. When I want to disable it I use\n`my_btn.setEnabled(false)`\n, but I would also like to grey it out. How can I do that?\nThanks\n`<Button android:id=\"@+id\/buy_btn\" style=\"@style\/srp_button\" \/...
{"title":"Make Git \"LF will be replaced by CRLF\" warnings go away","tags":["git"],"question_text":"I have setup Git so it doesn't commit inconsistent line endings. The problem with that is a whole pile of files appear modified even though they are not. What do I type to make these files have the line endings fixed on...
{"title":"Tips for profiling misbehaving Emacs Lisp?","tags":["emacs","profiling","elisp","dot-emacs"],"question_text":"I customize Emacs a lot. Recently, I added something to my .emacs configuration that sporadically pegs my CPU at 100%, but I really don't know what it is.\nIf I press C-g a bunch of times, eventually ...
{"title":"java compiled classes contain dollar signs","tags":["java","class","compilation"],"question_text":"I've been using Eclipse as my development IDE. I also use it to export my application into a .jar file. When I look at my classes in the .jar file, a few of my classes contain the name of that class, a dollar si...
{"title":"How to install applications programatically without opening Play Store (as Google Drive does)","tags":["android"],"question_text":"Today the Google Drive app asked if I wanted to install the new apps Sheets & Docs.\nI've accepted, expecting it to open Google Play Store so I could press install.\nIt didn't\n. ...
{"title":"What's the difference between: $(this.el).html and this.$el.html","tags":["javascript","jquery","backbone.js"],"question_text":"What's the difference between:\n`$(this.el).html`\nand\n`this.$el.html`\nReading a few backbone examples and some do it one way and other another way.","answer_text":"`$(this.el)`...
{"title":"Handle multiple submit buttons in Drupal form API","tags":["drupal"],"question_text":"I have 2 submit buttons and want to perform different actions for each submit button . Here I want to set the form fields which can be done only in form_alter(). Can anyone suggest how to check for multiple submit buttons in...
{"title":"Why can't I install any gems on my Mac?","tags":["ruby-on-rails","ruby","osx"],"question_text":"I tried doing\n`gem install`\nfor just about any gem and I have been getting errors. I think I need to reset and or update something on my computer but not sure what.\nHere is some of the command line code errors:\...
{"title":"WPF or Windows Forms","tags":["c#","wpf","windows","winforms","c#-4.0"],"question_text":"I've been playing around with C# console applications for about a year and I want to move on to creating GUI applications. I have never done any GUI development besides basic Java applications, but I want to continue usin...
{"title":"Do you use the TR 24731 'safe' functions?","tags":["c","security","coding-style","tr24731"],"question_text":"The ISO C committee (\nISO\/IEC JTC1\/SC21\/WG14\n) has published\nTR 24731-1\nand is working on\nTR 24731-2\n:\nTR 24731-1: Extensions to the C Library Part I: Bounds-checking interfaces\nWG14 is work...
{"title":"phpmyadmin logs out after 1440 secs","tags":["mysql","django","phpmyadmin","timeout","logout"],"question_text":"In my local development Ubuntu box I use MySQL and phpmyadmin to work with the database.\nWhenever phpmyadmin is idle for 1440 secs (24min) the session expires. I lose my place and have to login and...
{"title":"Rails 2: Model.find(1) gives ActiveRecord error when id 1 does not exist","tags":["ruby-on-rails","ruby-on-rails-2"],"question_text":"I am using Rails 2.3.5 and in that if I give\n`Model.find(1)`\nand if 1 is not in the database, it returns ActiveRecord error. Should it just be returning\n`nil`\nas in the cas...
{"title":"What is Pseudo TTY-Allocation? (SSH and Github)","tags":["github","ssh","openssh"],"question_text":"I was trying to setup an SSH connection with Github following this tutorial:\nhttps:\/\/help.github.com\/articles\/generating-ssh-keys\nI came across the following command:\n`$ ssh -T git@github.com \n# Attempt...
{"title":"final array in Java","tags":["java"],"question_text":"The following code in Java uses a\n`final`\narray of\n`String`\nand there is no question about it.\n`final public class Main {\n public static final String[] CONSTANT_ARRAY = {\"I\", \"can\", \"never\", \"change\"};\n public static void main(String[] args)...
{"title":"How to use long id in Rails applications?","tags":["ruby-on-rails","activerecord","int","long-integer","bigint"],"question_text":"How can I change the (default) type for ActiveRecord's IDs? int is not long enough, I would prefer long. I was surprised that there is no :long for the migrations - does one just u...
{"title":"Redirecting exec output to a buffer or file","tags":["c","exec","fork"],"question_text":"I'm writing a C program where I\n`fork()`\n,\n`exec()`\n, and\n`wait()`\n. I'd like to take the output of the program I exec'ed to write it to file or buffer.\nFor example, if I exec\n`ls`\nI want to write\n`file1 file2 e...
{"title":"Convert seconds into minutes and seconds","tags":["objective-c","time"],"question_text":"How can I convert seconds into minutes and seconds?\nI am aware that you can convert seconds to minutes like so, but I don't know how I can get the remainder of seconds...\n`int minutes = seconds \/ 60;`","answer_text":"Y...
{"title":"Enum localization","tags":["c#","asp.net-mvc-4","localization"],"question_text":"How do you localize enums for a\n`ListBoxFor`\nwhere multiple options are possible?\nFor example an\n`enum`\nthat contains roles:\n`public enum RoleType\n{\n [Display(Description = \"Administrator\", ResourceType = typeof(Resourc...
{"title":"Iphone UITextField only integer","tags":["iphone","objective-c","casting"],"question_text":"I have a UITextField in my IB and I want to check out if the user entered only numbers (no char)and get the integer value.\nI get the integer value of the UITextField like that :\n`int integer = [myUITexrtField.text in...
{"title":"How can a non-assigned string in Python have an address in memory?","tags":["python","memory-address"],"question_text":"Can someone explain this to me? So I've been playing with the id() command in python and came across this:\n`>>> id('cat')\n5181152\n>>> a = 'cat'\n>>> b = 'cat'\n>>> id(a)\n5181152\n>>> id(...
{"title":"MongoDB SELECT COUNT GROUP BY","tags":["mongodb","group-by"],"question_text":"I am playing around with MongoDB trying to figure out how to do a simple\n`SELECT province, COUNT(*) FROM contest GROUP BY province`\nBut I can't seem to figure it out using the aggregate function. I can do it using some really weir...
{"title":"Ask gdb to list all function in a program","tags":["c","linux","gcc","gdb","x86-64"],"question_text":"How can you list all functions in a program with gdb?","answer_text":"`info functions`\nprints the names and data types of all defined functions. See\n16 Examining the Symbol Table\n.","question_code":[],"ans...
{"title":"objective c categories and inheritance","tags":["iphone","objective-c","ios","inheritance","categories"],"question_text":"If a method is defined in both a class and a category on that class, it is undefined which implementation will be called.\nBut how does this interact with inheritance? Specifically:\nGiven...
{"title":"How to write a dissoc-in command for clojure?","tags":["clojure"],"question_text":"I'm looking to write a function that is similar to assoc-in but removes keys instead of adding it:\n`(dissoc-in {:a {:b 0}} [:a :b])\n;;=> {:a {}}`\nI got up to here:\n`(def m {:a {:b {:c 1}}})\n(assoc m :a (assoc (:a m) :b (di...
{"title":"PHP: how can I get file creation date?","tags":["php","file"],"question_text":"I am reading a folder with lots of files.\nHow can I get the creation date of a file. I don't see any direct function to get it.\nThere are\n`filemtime`\nand\n`filectime`\n.\nAnd if the file hasn't been modified, what will happen?"...
{"title":"SQL query need to get names where count(id) = 2","tags":["sql"],"question_text":"I have a table\n`programparticipants`\n. I am currently successfully querying the IDs where\n`count(name) > 1`\n. What I need now is to query the names that belong to those IDs where\n`count(name) > 1`\n.\nExample, data result cu...
{"title":"Objective-C preprocessor directive for 'if not'","tags":["ios","objective-c","iphone","c-preprocessor","preprocessor-directive"],"question_text":"I understand how to use a preprocessor directive like this:\n`#if SOME_VARIABLE\n \/\/ Do something\n#else\n \/\/ Do something else\n#endif`\nBut what if I only wan...
{"title":"Data structure for maintaining tabular data in memory?","tags":["python","data-structures"],"question_text":"My scenario is as follows: I have a table of data (handful of fields, less than a hundred rows) that I use extensively in my program. I also need this data to be persistent, so I save it as a CSV and l...
{"title":"JSR 303 Validation, If one field equals \"something\", then these other fields should not be null","tags":["java","validation","bean-validation"],"question_text":"I'm looking to do a little custom validation with JSR-303\n`javax.validation`\n.\nI have a field. And If a certain value is entered into this field...
{"title":"Is there any way to convert a Map to a JSON representation using Jackson without writing to a file?","tags":["java","json","jackson"],"question_text":"I'm trying to use Jackson to convert a HashMap to a JSON representation.\nHowever, all the ways I've seen involve writing to a file and then reading it back, w...
{"title":"How to setup a mail interceptor in rails 3.0.3?","tags":["ruby","ruby-on-rails-3","actionmailer"],"question_text":"I am using rails 3.0.3, ruby 1.9.2-p180, mail (2.2.13). I m trying to setup a mail interceptor but I am getting the following error\n`\/home\/abhimanyu\/Aptana_Studio_3_Workspace\/delivery_health...
{"title":"Create NSDate from Unix timestamp","tags":["objective-c"],"question_text":"How do I create an NSDate from a Unix timestamp?\n`channel.startDate = [NSDate dateWithTimeIntervalSince1970:\n(NSTimeInterval)[channelJson objectForKey:@\"broadcastStartedTime\"]];`\nI get this error:\n104: error: pointer value used w...
{"title":"Multi-threading with .Net HttpListener","tags":["c#",".net","multithreading","httplistener"],"question_text":"I have a listener:\n`listener = new HttpListener();\nlistener.Prefixes.Add(@\"http:\/\/+:8077\/\");\nlistener.Start();\nlistenerThread = new Thread(HandleRequests);\nlistenerThread.Start();`\nAnd I am...
{"title":"Converting Twitter bootstrap page into PDF with wkhtmltopdf : span issue","tags":["html","css","twitter-bootstrap","pdf-generation","wkhtmltopdf"],"question_text":"I am using\nSymfony2\nBundle\nKnpSnappyBundle\nto convert an html twig template to a pdf.\nKnpSnappyBundle\nis base on\nSnappy\nwrapper, that use\...
{"title":"Java Reflection: Create an implementing class","tags":["java","reflection","interface"],"question_text":"`Class someInterface = Class.fromName(\"some.package.SomeInterface\");`\nHow do I now create a new class that implements\n`someInterface`\n?\nI need to create a new class, and pass it to a function that ne...
{"title":"What is routes.IgnoreRoute(\"{resource}.axd\/{*pathInfo}\")","tags":["asp.net-mvc","asp.net-mvc-3","asp.net-mvc-routing"],"question_text":"What is\n`routes.IgnoreRoute(\"{resource}.axd\/{*pathInfo}\")`\nI cannot find any .axd file in my project, can I remove this route rule?","answer_text":".axd files don't e...
{"title":"Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues","tags":["cocoa","ios8","xcode6","dynamic-library","ios-universal-framework"],"question_text":"I'm trying to make a dynamic framework for an iOS app. Thanks to the new version of Xcode (6) we can select a Cocoa Touch Framework when we create ...
{"title":"F# collection initializer syntax","tags":["f#","inline"],"question_text":"What is the\ncollection initializer\nsyntax in F#? In C# you can write something like:\n`new Dictionary<string, int>() {\n {\"One\", 1},\n {\"two\", 2}}`\nHow do I do the same thing in F#? I suppose i could roll my own syntax, but seems...
{"title":"RedBean ORM performance","tags":["php","orm","doctrine","propel","redbean"],"question_text":"I would like to know, can Redbean ORM be used for performance oriented scenarios like social networking web apps, and is it stable even if thousands of data is pulled by multiple users at same time? Also I'd like to k...
{"title":"Am I using the Java 7 try-with-resources correctly","tags":["java-7","try-with-resources"],"question_text":"I am expecting the buffered reader and file reader to close and the resources released if the exception is throw.\n`public static Object[] fromFile(String filePath) throws FileNotFoundException, IOExcep...
{"title":"What's the right way to define an anchor tag in rails?","tags":["html","ruby-on-rails","anchor","hyperlink","segment"],"question_text":"It's obvious from the\ndocumentation\n(and google) how to generate a link with a segment e.g.\n`podcast\/5#comments`\n. You just pass a value for\n`:anchor`\nto\n`link_to`\n....
{"title":"Calling Primefaces dialog box from Managed Bean function","tags":["jsf","primefaces","modal-dialog","managed-bean"],"question_text":"Hi I have a managed bean with some functions , based on some condition in that function I will like to call a dialog box\nManaged bean function goes as\n`public String editStude...
{"title":"Why don't most vim color schemes look as nice as the screenshot when I use them?","tags":["vim","colors","terminal","schema"],"question_text":"I have downloaded many vim color schemas and tried them out, but many of them don't look like the official screenshot.\nFor example, vim's own color schema -\n`desert`...
{"title":"Set variable text column width in printf","tags":["c","size","printf"],"question_text":"In order to determine the size of the column in C language we use\n`%<number>d`\n.\nFor instance, I can type\n`%3d`\nand it will give me a column of width=3.\nMy problem is that my number after the\n`%`\nis a variable that...
{"title":"Ruby templates: How to pass variables into inlined ERB?","tags":["ruby","templates","syntax","erb"],"question_text":"I have an ERB template inlined into Ruby code:\n`require 'erb'\nDATA = {\n :a => \"HELLO\",\n :b => \"WORLD\",\n}\ntemplate = ERB.new <<-EOF\n current key is: <%= current %>\n current value is:...
{"title":"How can I uninstall Ruby on ubuntu?","tags":["ruby-on-rails","ruby","ubuntu","uninstall"],"question_text":"How can I uninstall Ruby 1.9.2dev (2010-07-02) [i486-linux]\non ubuntu?\n Need to reinstall - please help","answer_text":"This command should do the trick (provided that you installed it using a dpkg-bas...
{"title":"how can I stick the div after scrolling down a little","tags":["javascript","html","css"],"question_text":"I wanted to stick the 2nd div when we scroll down the page and when the 2nd div meets the top boundary. When it's fixed, it should scroll along with the other pages. How can I achieve this?\n`#settings{\...
{"title":"Difference between $(window).width() vs $(document).width()","tags":["javascript","jquery","jquery-selectors","dimensions"],"question_text":"What is the major difference between\n`$(window).width()`\nvs\n`$(document).width()`\nin jQuery?\nWhether window denotes the browser and document represents the body of ...
{"title":"Ways to speedup Visual Studio 2010","tags":["visual-studio-2010","performance","visual-studio","ide"],"question_text":"There's been a lot of\nnoise\nabout Visual Studio 2010 being slower than its predecessor, VS 2008.\nI was facing the same issue for the last couple weeks, and after an hour of searching aroun...
{"title":"NSLocale currentLocale always returns \"en_US\" not user's current language","tags":["iphone","objective-c","cocoa","internationalization"],"question_text":"I'm in the processes of internationalizing an iPhone app - I need to make programmatic changes to certain views based on what the user's current locale i...
{"title":"How to keep an Javascript object\/array ordered while also maintaining key lookups?","tags":["javascript","data-structures"],"question_text":"I have some data which I originally stored in a generic Javascript object, with the ID as a key:\n`{\n \"7\": {\"id\":\"7\",\"name\":\"Hello\"},\n \"3\": {\"id\":\"3\",...
{"title":"Getting the highest value of a column in MongoDB","tags":["ruby","mongodb","mongodb-ruby"],"question_text":"I've been for some help on getting the highest value on a column for a mongo document. I can sort it and get the top\/bottom, but I'm pretty sure there is a better way to do it.\nI tried the following (...
{"title":"Maintaining Session through Angular.js","tags":["session","angularjs"],"question_text":"I am working a project using the AngularJS framework. I am pretty new to using this framework; in the past I have only worked with pure JavaScript and jQuery. The project is a kind of web designer application for a niche m...
{"title":"How do I transfer production database to staging on Heroku using pgbackups? Getting error","tags":["postgresql","heroku"],"question_text":"On Heroku, I am trying to copy the production database into my staging app using the pgbackups addon. I followed the instructions on the addon page:\nhttps:\/\/devcenter.h...
{"title":"How do I write, \"if typeclass a, then a is also an instance of b by this definition.\"","tags":["haskell"],"question_text":"I have a typeclass\n`MyClass`\n, and there is a function in it which produces a\n`String`\n. I want to use this to imply an instance of\n`Show`\n, so that I can pass types implementing\...
{"title":"How do I change the XSLT debugger's input file?","tags":["visual-studio","visual-studio-2010","debugging","xslt"],"question_text":"I'm trying to debug an XSLT file and I've gotten the Visual Studio debugger to run and prompt for an input file. Unfortunately, when I debug the file again, the same test file is ...
{"title":"List all available versions of a specific package in NuGet Package Manager Console","tags":["powershell","nuget"],"question_text":"What NuGet PowerShell command will return a list of all versions of a specific package?\nI have tried the following, but it only returns one version of NUnit along with a number o...
{"title":"C#: How to Make it Harder for Hacker\/Cracker to Get Around or Bypass the Licensing Check?","tags":["c#","licensing"],"question_text":"First of all, I understand that almost all applications can be cracked (especially written in C#). My question here is to make it a little bit harder to crack.\nSuppose that t...
{"title":"Can jQuery change css style definition? (not individual css of each element)","tags":["javascript","jquery","css","stylesheet"],"question_text":"I haven't seen any docs saying jQuery can change any CSS definition such as changing\n`td { padding: 0.2em 1.2em }`\nto\n`td { padding: 0.32em 2em }`\nbut either hav...
{"title":"How do I reference an existing branch from an issue in GitHub?","tags":["github","git-branch"],"question_text":"Let's say I have a branch named\n`feature\/1`\n. And also issue #1. I want to link that branch to that issue.\nIs there a way to link that branch to that issue\nfrom\nthe issue? Without making a com...
{"title":".NET vs ASP.NET vs CLR vs ASP","tags":[".net","asp.net","asp-classic","clr"],"question_text":"Although I know the terms I used to forget the differences sometimes...So just to maintain a place for reference...Thanks all for your answers.","answer_text":"ASP\n, Active Server Pages (now referred to as ASP Class...