text stringlengths 74 309k |
|---|
{"title":"Doctrine2 - \"class\" is not a valid entity or mapped super class","tags":["php","doctrine2"],"question_text":"I get exception\n`Uncaught exception 'Doctrine\\ORM\\Mapping\\MappingException' with message 'Class \"Users\" is not a valid entity or mapped super class`\nevery time when I run the next code:\ntest.... |
{"title":"How to create an Array with AngularJS's ng-model","tags":["javascript","angularjs"],"question_text":"I'm trying to create an array holding telephones, i have this code\n`<input type=\"text\" ng-model=\"telephone[0]\" \/>\n<input type=\"text\" ng-model=\"telephone[1]\" \/>`\nBut i can't access $scope.telephone... |
{"title":"Align Div at bottom on main Div","tags":["html","css"],"question_text":"I have two divs, one inside the other and I would like the small div to be aligned at the buttom of the main div.\nHere's my code so far. Currently, the button is at the top of main div, instead I want it positioned at the bottom. Any hel... |
{"title":"Spring Boot: Overriding favicon","tags":["spring-mvc","favicon","spring-boot"],"question_text":"How can I override the favicon of Spring Boot?\nNOTE\n: Here is my another question that provides another solution which does not involve any coding:\nSpring Boot: Is it possible to use external application.propert... |
{"title":"Web-scraping JavaScript page with Python","tags":["python","web-scraping","urlopen"],"question_text":"I'm trying to develop a simple web scraper. I want to extract text without the HTML code. In fact, I achieve this goal, but I have seen that in some pages where JavaScript is loaded I didn't obtain good resul... |
{"title":"How do I replace part of a string in PHP?","tags":["php"],"question_text":"I am trying to get the first 10 characters of a string and want to replace space with\n`'_'`\n.\nI have\n`$text = substr($text, 0, 10);\n $text = strtolower($text);`\nBut I am not sure what to do next.\nI want the string\nthis is the t... |
{"title":"What is the preferred way to store state between init and update for custom knockout binding?","tags":["knockout.js"],"question_text":"Currently I am storing the state using jQuery data for the dom element.\n`ko.bindingHandlers.customValue = {\n init: function init(element, valueAccessor, allBindingsAccessor,... |
{"title":"3 dimension (X, Y and Z) graph using D3.js","tags":["d3.js","graph","3d","data-visualization"],"question_text":"I am searching for a graph which has\n3 dimensions (X, Y and Z)\non\nD3.js\n. Please let me know if there are any\ndata visualization site\nwhere I can find such graph or there is one on\n`d3js.org`... |
{"title":"setUserVisibleHint called before onCreateView in Fragment","tags":["android","android-fragments","callback"],"question_text":"I am working on\n`ViewPager`\nand using\n`Fragment`\nthere I found\nsetUserVisibleHint() called before onCreateView() in Fragment\nI am using\n`Fragment`\nfrom support library\n`androi... |
{"title":"'join' for Applicatives?","tags":["haskell"],"question_text":"I'm looking for the following function:\n`Applicative f => f (f a) -> f a`\nHoogle\nshows me\n`join`\n:\n`>:t join\njoin :: Monad m => m (m a) -> m a`\nIs there a function that matches my desired signature?","answer_text":"There is no such function... |
{"title":"How to pass multiple enum values as a function parameter","tags":["swift"],"question_text":"How would I do the following - passing two NSStringDrawing options as a function parameter in swift:\n`CGRect boundingRect = [string boundingRectWithSize:CGSizeMake(280.0, NSIntegerMax)\n options:NSStringDrawingUsesLin... |
{"title":"python dictionary update method","tags":["python","dictionary","variables"],"question_text":"I have a list string tag.\nI am trying to initialize a dictionary with the key as the tag string and values as the array index.\n`for i, ithTag in enumerate(tag):\n tagDict.update(ithTag=i)`\nThe above returns me {'it... |
{"title":"Java - Best way to print 2D array?","tags":["java","arrays","printing"],"question_text":"I was wondering what the best way of printing a 2D array was. This is some code that I have and I was just wondering if this is good practice or not. Also correct me in any other mistakes I made in this code if you find a... |
{"title":"NSData from Byte array in Swift","tags":["ios","swift"],"question_text":"I'm trying to create an\n`NSData`\n`var`\nfrom an array of bytes.\nIn Obj-C I might have done this:\n`NSData *endMarker = [[NSData alloc] initWithBytes:{ 0xFF, 0xD9 }, length: 2]`\nI can't figure out a working equivalent in Swift.","answ... |
{"title":"Why does parameter pack expansion work differently with different C++ compilers?","tags":["c++","templates","c++11","parameters"],"question_text":"Parameter pack expansion is reversed by the VS2015 compiler.\nI have the following code:\n`#include <iostream>\n#include <vector>\ntemplate <typename... T>\nvoid f... |
{"title":"Eclipse debugging HashMap: Logical Structure using Key and Value's toString() method","tags":["java","eclipse","debugging","eclipse-plugin"],"question_text":"I have recently started to use Eclipse after using IntelliJ for a few years. When debugging Map using IntelliJ, if the key or object implements toString... |
{"title":"How do I get the current mouse screen coordinates in WPF?","tags":["wpf","mouse-coordinates"],"question_text":"How to get current mouse coordination on the screen?\nI know only\n`Mouse.GetPosition()`\nwhich get mousePosition of element, but I want to get the coordination without using element.","answer_text":... |
{"title":"How can I show\/hide component with JSF?","tags":["java","javascript","jsf"],"question_text":"How can I show\/hide component with JSF?\nI am currently trying so do the same with the help of javascript but not successfull.\nI cannot use any third party libraries.\nThanks| Abhi","answer_text":"You can actually ... |
{"title":"IF statement: how to leave cell blank if condition is false (\"\" does not work)","tags":["excel","if-statement","excel-2010","worksheet-function"],"question_text":"I would like to write an IF statement, where the cell is left blank if the condition is FALSE.\nNote that, if the following formula is entered in... |
{"title":"Determining if UILocalNotification fired with app in foreground or background","tags":["iphone","objective-c","ios4","uikit","uilocalnotification"],"question_text":"When receiving a\n`UILocalNotification`\nThe method\n`application:DidReceiveLocalNotification`\nis called when the app is in Foreground.\nWhen th... |
{"title":"what is the true difference between lemmatization vs stemming?","tags":["python","nlp","nltk","lemmatization"],"question_text":"When do I use each ?\nAlso...is the NLTK lemmatization dependent upon Parts of Speech?\nWouldn't it be more accurate if it was?","answer_text":"Short and dense:\nhttp:\/\/nlp.stanfor... |
{"title":"How do I vertically center an H1 in a div?","tags":["html","css","responsive-design"],"question_text":"First of all, my apologies. I know there are various solutions posted for this issue here, but for the life of me I can't get any of them to work.\nFor a responsive website I'm trying to center an h1 in a di... |
{"title":"Focus-follows-mouse (plus auto-raise) on Mac OS X","tags":["osx","focus","mouse"],"question_text":"(I don't want to hear about how crazy I am to want that! :)\nFocus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this m... |
{"title":"Why does Lua have no \"continue\" statement?","tags":["loops","lua","language-design"],"question_text":"I have been dealing a lot with Lua in the past few months, and I really like most of the features but I'm still missing something among those:\nWhy is there no\n`continue`\n?\nWhat workarounds are there for... |
{"title":"Cannot reinitialise JQuery DataTable","tags":["javascript","jquery","json","jquery-datatables"],"question_text":"I'm using jquery datatables to display data inside grid. On init page load script take DateTime.Today and process them further, problem is after init page load, when I'm trying to take users input ... |
{"title":"Rails Routes - Limiting the available formats for a resource","tags":["ruby-on-rails","routing","routes"],"question_text":"I have a series of resources that I want only available if accessed via the JS format. Rails' route resources gives me the formats plus the standard HTML. Is there a way to specify that o... |
{"title":"Comparing chars in Java","tags":["java","comparison","char"],"question_text":"It's been a while since I've done any Java so my syntax is not the greatest at the moment.\nI want to check a char variable is one of 21 specific chars, what is the shortest way I can do this?\nFor example:\n`if(symbol == ('A'|'B'|'... |
{"title":"Find out where MySQL is installed on Mac OS X","tags":["mysql","osx"],"question_text":"How do I find out where MySQL is installed on Mac OS X 10.7.9? I have MAMP installed so I presume that it is bundled with this install?","answer_text":"To check MySQL version of MAMP , use the following command in Terminal:... |
{"title":"ActiveRecord::StatementInvalid: Could not find table","tags":["ruby-on-rails","unit-testing","rubymine"],"question_text":"I am trying to run\n`users_test.rb`\nfile which just has\n`test \"the truth\" do\n assert true\n end`\nI do have a likes table, still I am getting this error. Why so?\n`Your bundle is comp... |
{"title":"How do I initialize a CMake variable with the result of a shell command","tags":["cmake"],"question_text":"Is there a way to set a variable in a CMake script to the output of a shell command? \nSomething like\n`SET(FOO COMMAND \"echo bar\")`\nwould come to mind","answer_text":"You want the\n`execute_process`\... |
{"title":"Getting ClassCastException when trying to insert RelativeLayout dyanmically?","tags":["android","android-layout","android-widget"],"question_text":"`setContentView(R.layout.main2);\n out= new ArrayList<TextView>();\n llay =(RelativeLayout) findViewById(R.id.displayPoll);\n RelativeLayout.LayoutParams lparams ... |
{"title":"how to parse hex or decimal int in Python","tags":["python"],"question_text":"I have a string that can be a hex number prefixed with \"0x\" or a decimal number without a special prefix except for possibly a minus sign. \"0x123\" is in base 16 and \"-298\" is in base 10.\nHow do I convert this to an int or lon... |
{"title":"IIS: Idle Timeout vs Recycle","tags":["asp.net","iis","windows-2003-webserver"],"question_text":"In IIS there are two areas (well, more than two) where recycling can occur:\n1) Under the \"Process Model\" section -> \"Idle Timeout\" (default 20 minutes)\nand\n2) Under the \"Recycle\" section -> \"Regular Time... |
{"title":"How to assign Date parameters to Hibernate query for current timezone?","tags":["java","hibernate","timezone"],"question_text":"When you assign a date to a named SQL parameter Hibernate automatically converts it to GMT time. How do you make it use the current server timezone for all dates?\nLets say you have ... |
{"title":"Finding Signed Angle Between Vectors","tags":["java","python","math","trigonometry","angle"],"question_text":"How would you find the signed angle theta from vector a to b?\nAnd yes, I know that theta = arccos((a.b)\/(|a||b|)).\nHowever, this does not contain a sign (i.e. it doesn't distinguish between a clock... |
{"title":"Using Tempdata in ASP.NET MVC - Best practice","tags":["asp.net-mvc","asp.net-mvc-3","asp.net-mvc-2","tempdata"],"question_text":"I am using ASP.NET MVC 3 to build a web application.\nWhat I am trying to do is pass values between two controllers, though there are many ways to do this I am particular intereste... |
{"title":"window not defined error when using extract-text-webpack-plugin React","tags":["reactjs","webpack"],"question_text":"I'm using webpack to build my react components and I'm trying to use the\n`extract-text-webpack-plugin`\nto separate my css from my generated js file. However, when I attempt to build the compo... |
{"title":"Is the name IsFemale inappropriate for a database column?","tags":["naming-conventions"],"question_text":"Just browsing our db schema and found a field named 'IsFemale'\nIs the name good, or is it kinda laughable?","answer_text":"You should stick with the\nISO standard\nif at all possible.","question_code":[]... |
{"title":"PopupWindow animation not working","tags":["android","android-animation"],"question_text":"I has a nice PopupWindow which I want to appear with an animation. I do it like this:\n`popup.setAnimationStyle(R.anim.appear);\npopup.showAtLocation(popupMenuLayout, gravity, offsetX, offsetY);`\nI then set up a listen... |
{"title":"What copy protection technique do you use?","tags":["copy-protection"],"question_text":"I'm thinking about adding some kind of copy protection to one of my tools.\nDo you have any experience with that?\nHave you developed your own protection techniques or did you buy 3rd party software?\nDo you think it is a ... |
{"title":"Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo:","tags":["javascript","jsf"],"question_text":"i have an txtBox and its id is : beginDateTxt\nbut jsf makes it\n`j_idt8:beginDateTxt`\nin jquery i try to reach it like that\n`<script type=\"text\/javascript\">\n $(document).ready(functi... |
{"title":"C++ HTML template framework, templatizing library, HTML generator library","tags":["c++","template-engine"],"question_text":"I am looking for template\/generator libraries for C++ that are similar to eg. Ruby's Erb, Haml, PHP's Smarty, etc.\nIt would be great if I it would sport some basic features like loops... |
{"title":"Eclipse Short Cut: File Search","tags":["eclipse","keyboard-shortcuts"],"question_text":"I have looked and looked but I cannot find a shortcut for \"File Search\" in Eclipse.\nI even downloaded the\nmousefeed plugin\n.\n(It is pretty cool whenever you do something with the mouse. A little popup comes up and t... |
{"title":"How to execute Python code from within Visual Studio Code","tags":["python","vscode"],"question_text":"Visual Studio Code\nwas recently released and I liked the look of it and the features it offered, so I figured I would give it a go.\nI downloaded the application from the\ndownloads page\nfired it up, messe... |
{"title":"Game Architecture","tags":["c#","architecture","xna","xna-4.0"],"question_text":"I have a question about a XNA game I'm making, but it is also a generic question for future games. I'm making a Pong game and I don't know exactly what to update where, so I'll explain better what I mean. I have a class Game, Pad... |
{"title":"Can file uploads time out in PHP?","tags":["php","upload"],"question_text":"Hi im quite new to PHP, i have created a form for very large csv files to be uploaded to my server. Some one mentioned to me that the browser can time out due to the uploading file being to big, is this true? and if so, can it be prev... |
{"title":"Yii : how to count records in a model?","tags":["php","yii"],"question_text":"I have following code to fetch data from a model.\n`$notifyModel = Notification::model()->findByAttributes(array(\n 'user_id'=> Yii::app()->user->uid\n ));`\nNow I want to count the number of rows fetched. \nNeither\n`$notifyModel->... |
{"title":"can AWS Lambda connect to RDS mySQL database and update the database?","tags":["amazon-web-services","amazon-rds","amazon-iam","aws-lambda"],"question_text":"I am trying to connect AWS Lambda function to RDS mysql database.\nI just wanted to update the database from my lambda function. Is it possible to acces... |
{"title":"Angular ng-class if else","tags":["javascript","html","angularjs","ng-class"],"question_text":"I'd like to know how to do to make the False ng-class.\npage.isSelected(1) is TRUE if the page if the page is selected, else FALSE\n`<div id=\"homePage\" ng-class=\"{ center: page.isSelected(1) }\">`\nI therefore wa... |
{"title":"C# Generic Static Constructor","tags":["c#","generics"],"question_text":"Will a static constructor on a generic class be run for every type you pass into the generic parameter such as this:\n`class SomeGenericClass<T>\n {\n static List<T> _someList;\n static SomeGenericClass()\n {\n _someList = new List<T>();... |
{"title":"Swift: Creating an array of UIImage","tags":["ios","arrays","uiimage","swift"],"question_text":"Using Swift, I'm trying to create an array of UIImage objects for a simple animation. Contextual help for\n`animationImages`\nreads, \"The array must contain UI Image objects.\"\nI've tried to create said array as ... |
{"title":"Create image from view\/screen in Android","tags":["android","bitmap"],"question_text":"Is it possible to create a bitmap image from a view or the screen in Android?","answer_text":"There are a couple of ways to do it. A simple one is to do the following:\n`Bitmap b = Bitmap.createBitmap(theView.getWidth(), t... |
{"title":"How do I change facebook messenger bot webhook?","tags":["facebook","facebook-messenger"],"question_text":"I have successfully implemented a facebook bot. It's working fine. I was trying to change the webhook url now as I have to port it to a different server with a new domain.\nThere is an option to change t... |
{"title":"How to remove notification from notification bar programatically in android?","tags":["android","notifications","android-notifications","android-pendingintent"],"question_text":"Any body have idea how can we remove notification from application programmatically which is called using Pending intent.\nI have us... |
{"title":"Equivalent Javascript Functions for Python's urllib.quote() and urllib.unquote()","tags":["javascript","python","url","encoding"],"question_text":"Are there any equivalent Javascript functions for Python's\n`urllib.quote()`\nand\n`urllib.unquote()`\n?\nThe closest I've come across are\n`escape()`\n,\n`encodeU... |
{"title":"How to detect online\/offline event cross-browser?","tags":["javascript","jquery","javascript-events","offline","connectivity"],"question_text":"I'm trying to accurately detect when the browser goes offline, using the HTML5 online and offline events.\nHere's my code:\n`<script>\n \/\/ FIREFOX\n $(window).bind... |
{"title":"Getting info about bad memory address in LLDB","tags":["iphone","exc-bad-access","lldb"],"question_text":"I am trying to debug an EXC_BAD_ACCESS in my iPhone app. It is crashing on a method call and on the line of the method is\n`EXC_BAD_ACCESS (code=1, address = xxx)`\n.\nBefore, I would have just used\n`gdb... |
{"title":"Which is faster, Hash lookup or Binary search?","tags":["algorithm","hash","hashmap","lookup","binary-search"],"question_text":"When given a static set of objects (static in the sense that once loaded it seldom if ever changes) into which repeated concurrent lookups are needed with optimal performance, which ... |
{"title":"I need CSS3 transition to work in IE9","tags":["internet-explorer-9","css-transitions"],"question_text":"I create a greeting card for a client with css transition but I did not know that it was not compatible with IE9.\nThe greeting card is this\nhttp:\/\/voeux.geekarts.fr\/v4.html\nIs there a a way to get th... |
{"title":"how to change a css class style through javascript?","tags":["javascript","html","css"],"question_text":"according to the book that I am reading, it is better to change a css, by class when you are using javascript for changing css. but how? can someone give a sample snippet for this ?","answer_text":"Suppose... |
{"title":"Copy value of watch variable in visual studio without escape characters","tags":["visual-studio","debugging"],"question_text":"Ok, this one has been driving me bonkers for ages and VS 2010 hasn't improved this. Say I have a variable like so\n`string szSql = \n@\"SELECT \n Foo, Bar\nFROM\n Table\nWHERE\n Foo =... |
{"title":"Using JSLint in Notepad++","tags":["javascript","notepad++","jslint","lint"],"question_text":"I have seen other text editors use extensions to allow syntax checkers such as\nJSLint\n, is this possible with Notepad++?","answer_text":"I have managed to get two lint programs to run using the\nnotepad++\n's\nNppE... |
{"title":"Android Studio does not install latest application on device","tags":["android","android-studio"],"question_text":"I'm following some tutorials about building apps in Android Studio, but for some reason it's not launching\/installing the latest version of my app when I click 'run'. I have to manually uninstal... |
{"title":"Multiprocessing Bomb","tags":["python","multiprocessing"],"question_text":"I was working the following example from\nDoug Hellmann\ntutorial on multiprocessing:\n`import multiprocessing\ndef worker():\n \"\"\"worker function\"\"\"\n print 'Worker'\n return\nif __name__ == '__main__':\n jobs = []\n for i in ra... |
{"title":"Dynamically instantiate a Ruby class similar to Java","tags":["java","ruby"],"question_text":"How can this line in Java be translated to Ruby:\nString className = \"java.util.Vector\";\n...\nObject o = Class.forName(className).newInstance();\nThanks!","answer_text":"`Object::const_get('String').new()`","quest... |
{"title":"iOS bounds change after rotating to landscape, then back to portrait","tags":["objective-c","ios","uiview"],"question_text":"When my application launches, an NSLog of my view's bounds shows the following:\n`NSLog(@\"My view frame: %@\", NSStringFromCGRect(self.view.bounds));\nMy view frame: {{0, 0}, {320, 548... |
{"title":"Making a table row into a link in Rails","tags":["ruby-on-rails"],"question_text":"I am trying to make a row in a table link to the edit page. I know the links are being created, because I can print them out. I am close, but am missing something important. What do I change to make the link work properly?\n`<h... |
{"title":"Highcharts remove zero value labels","tags":["jquery","highcharts"],"question_text":"I'm implementing highcharts in my site, however is proving challenging from a presentation point of view.\nMy data loads fine, but for the series, some of the values are zeros. I would like to display the label when not zero,... |
{"title":"Cascading style sheets use \"id\" or \"class\"","tags":["html","css"],"question_text":"when styling specific html elements, i tend to always use the class attribute. the css code looks cleaner imo.\nwhy do both exist which one should you use and when ?","answer_text":"id\ns\nid\nentify elements.\nclass\nes\nc... |
{"title":"What is the value of '\\n' under C compilers for old Mac OS?","tags":["c++","c","mac-classic"],"question_text":"Background:\nIn versions of Mac OS up to version 9, the standard representation for text files used an ASCII CR (carriage return) character, value decimal 13, to mark the end of a line.\nMac OS 10, ... |
{"title":"List all files changed by a particular user in subversion","tags":["svn"],"question_text":"Is it possible to get a list of all files modified\/added\/deleted by a particular user?\nThe goal is to get an idea of what a user did for the day (or date range).","answer_text":"Here's an example, using the\nsvn log ... |
{"title":"Android Data Binding using include tag","tags":["java","android","data-binding","android-button","android-databinding"],"question_text":"main.xml:\n`<layout xmlns:andr...\n <data>\n <\/data>\n <include layout=\"@layout\/buttons\"><\/include>\n....`\nbuttons.xml:\n`<layout xmlns:andr...>\n <data>\n <\/data>\n ... |
{"title":"Spring boot @ResponseBody doesn't serialize entity id","tags":["java","json","spring","spring-boot"],"question_text":"Have a strange problem and can't figure out how to deal with it. \nHave simple POJO:\n`@Entity\n@Table(name = \"persons\")\npublic class Person {\n @Id\n @GeneratedValue\n private Long id;\n @... |
{"title":"Favor composition over inheritance","tags":["java","design-patterns","inheritance"],"question_text":"Favor composition over inheritance\nis very popular phrase. I read several articles and at the end each article says\nuse inheritance when there is pure IS-A relationship between classes.\nAn example from\nthi... |
{"title":"How to represent arrays within ember-data models?","tags":["javascript","ember.js","ember-data"],"question_text":"Is it necessary to use\n`DS.hasMany`\npointing to a\n`DS.Model`\nwhen a model contains an array? Even if the array elements are not really models (no IDs or endpoints of their own)? Is there a bet... |
{"title":"Haskell: Force floats to have two decimals","tags":["haskell","floating-point","precision"],"question_text":"Using the following code snippet:\n`(fromIntegral 100)\/10.00`\nUsing the Haskell '98 standard prelude, how do I represent the result with two decimals?\nThanks.","answer_text":"Just for the record:\n`... |
{"title":"Coordinates of selected text in browser page","tags":["javascript","html","cursor","selection","textselection"],"question_text":"I need the coordinates in pixels of the beginning of the text selection (anywhere on the page, not in a textarea).\nI tried using the cursor coordinates but this didn't work quite w... |
{"title":"Execution failed app:processDebugResources Android Studio","tags":["android","android-studio","bitbucket"],"question_text":"I'm using bitbucket so I can work with other developer but it seems that we can't get it to work flawlessly. I got this error after pulling the changes from him:\n`Execution failed for t... |
{"title":"Can .NET convert \"Yes\" & \"No\" to boolean without If?","tags":[".net","casting","boolean"],"question_text":"You would think there would be a way using DirectCast, TryCast, CType etc but all of them seem to choke on it e.g.:\n`CType(\"Yes\", Boolean)`\nYou get:\nSystem.InvalidCastException -\n Conversion fr... |
{"title":"When should I use static methods in a class and what are the benefits?","tags":["oop","static-methods","static-variables"],"question_text":"I have concept of static variables but what are the benefits of static methods in a class. I have worked on some projects but I did not make a method static. Whenever I n... |
{"title":"How to set timeout for a line of c# code","tags":["c#","timeout"],"question_text":"Possible Duplicate:\nSet timeout to an operation\nHow can i set timeout for a line of code in c#.\nFor example\n`RunThisLine(SomeMethod(Some Input), TimeSpan.FromSeconds(10))`\nrun\n`SomeMethod`\nwith 10 second time out.\nThank... |
{"title":"Linker Error in Xcode 4.2 Developer Preview","tags":["iphone","xcode","ios","deployment","target"],"question_text":"`d \/Users\/yariksmirnov\/Library\/Developer\/Xcode\/DerivedData\/Goozzy-cugjuvvsrzjqwvfiicxtykbqagux\/Build\/Products\/Debug-iphonesimulator\/Goozzy.app\/Goozzy normal i386\ncd \/Users\/yariksm... |
{"title":"How to use youtube-dl from a python program","tags":["python","youtube-dl"],"question_text":"I would like to access the result of the shell command:\n`youtube-dl -g \"www.youtube.com...\"`\nto print its output\n`direct url`\nto file; from within a python program:\n`import youtube-dl\nfromurl=\"www.youtube.com... |
{"title":"How to use .htaccess in WAMP Server?","tags":[".htaccess","mod-rewrite","wampserver"],"question_text":"I searched in web for 2 days and I try to use htaccess in my local wamp but I can't! I know there is something wrong but I don't know where...\nFirst:\nI activated \"\nrewrite_module\n\" in the apache menu, ... |
{"title":"How do I share a global variable between c files?","tags":["c","extern"],"question_text":"If i define a global variable in a\n`.c`\nfile, how can i use the value of the same variable in another\n`.c`\nfile?\nfile1.c\n`#include<stdio.h>\nint i=10;\nint main()\n{\nprintf(\"%d\",i);\nreturn 0;\n}`\nfile2.c\n`#in... |
{"title":"CSS: Vertically align div when no fixed size of the div is known","tags":["html","css","vertical-alignment"],"question_text":"How do I align a\n`<div>`\nwhich contains an image (or flash) vertically with CSS. Height and width are dynamic.","answer_text":"This is a pure CSS2 solution for horizontally and verti... |
{"title":"ActionBar background image","tags":["android","android-3.0-honeycomb","android-actionbar"],"question_text":"I've inherited the Holo Light Theme and customized the background of the ActionBar with the following:\nContent of styles.xml\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n<style name=\"Act... |
{"title":"Visualization of calendar events. Algorithm to layout events with maximum width","tags":["javascript","algorithm","calendar","visualization"],"question_text":"I need your help with an algorithm (it will be developed on client side with javascript, but doesn't really matter, I'm mostly interested in the algori... |
{"title":"How to initialize member-struct in initializer list of C++ class?","tags":["c++","list","constructor","struct","initializer"],"question_text":"I have the following class definitions in c++:\n`struct Foo {\n int x;\n char array[24];\n short* y;\n};\nclass Bar {\n Bar();\n int x;\n Foo foo;\n};`\nand would like... |
{"title":"Specify the from user when sending email using the mail command","tags":["linux","email","redhat"],"question_text":"Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this.\nWe are running Redhat Linux 5.","answe... |
{"title":"line breaks in alert messages","tags":["objective-c","ios","ios5","uialertview"],"question_text":"A noob question.\nI have an alert:\n`\"alertMessage\" = \"This is my message: 1 2 3. And another one: 5 6 7\";`\nwhich I am displaying with:\n`NSString *asd = NSLocalizedString (@\"alertMessage\", @\"\");\nNSStri... |
{"title":"\"or die()\" in Python","tags":["python"],"question_text":"Is anyone using anything like this in Python:\n`def die(error_message):\n raise Exception(error_message)\n...\ncheck_something() or die('Incorrect data')`\nI think this kind of style is used in PHP and Perl.\nDo you find any (dis)advantages in this [s... |
{"title":"Setting up a Gmail Account to work with ActionMailer in Rails 3","tags":["ruby-on-rails-3","actionmailer"],"question_text":"I have a contact page form that is setup to send an email to a Gmail account. Only problem is it won't send. I believe I have narrowed the error down to my settings inside of the initial... |
{"title":"Check if two line segments are colliding (only check if they are intersecting, not where)","tags":["algorithm","math","intersection"],"question_text":"I need a fast algorithm for checking if two non-infinite lines are crossing. Have to be fast because it'll run on a cell phone a lot.\nThe algorithm do only ha... |
{"title":"How to printf long long","tags":["c","long-integer","pi"],"question_text":"I'm doing a program that aproximate PI and i'm trying to use long long, but it isn't working.\nHere is the code\n`#include<stdio.h>\n#include<math.h>\ntypedef long long num;\nmain(){\n num pi;\n pi=0;\n num e, n;\n scanf(\"%d\", &n);\n... |
{"title":"Mysql 5.6 headaches on Mac OSX","tags":["mysql","ruby-on-rails-3","mysql2"],"question_text":"Several of my colleagues and I have recently upgraded from MySQL 5.5 to MySQL 5.6 using homebrew on our Macs to test locally before upgrading our servers. Since this upgrade, we all have been experiencing intermittent... |
{"title":"How to automatically change the text size inside a div?","tags":["jquery","html","css","font-size"],"question_text":"I have a background image with a\n`div`\n. I want to write some text, but this text should change the font size through the\n`div`\n.","answer_text":"I understand your question this way, you wo... |
{"title":"Scala: method\\operator overloading","tags":["scala"],"question_text":"The following example is from the book 'Programming in Scala'. Given a class 'Rational' and the following method definition:\n`def add(that: Rational): Rational =\n new Rational(\n this.numer * that.denom + that.numer * this.denom,\n this.... |
{"title":"Acronyms in Camel Back","tags":["java","naming-conventions","camelcasing"],"question_text":"I often see Java class names like\n`XmlReader`\ninstead of\n`XMLReader`\nMy gut feeling is to completely upper case acronyms, but apparently many people think differently. Or maybe it's just because a lot of code gener... |
{"title":"How to disable textbox from editing?","tags":["c#","winforms","textbox"],"question_text":"I want to use a text box to display some text. I can not disable it, because then the scroll bar will not work.\nHow can I prevent editing within the multi-line textbox, yet make it appear as if it is enabled, so that th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.