text stringlengths 74 309k |
|---|
{"title":"Why do we not just use Minified JS?","tags":["javascript","jquery","minify"],"question_text":"I see this word alot \"minified\" and i never seem to pick a script (ie. from jQuery plugins) that is \"minified\" but i suppose i should. If i'm right Minified means to remove all unecessary stuff from source code w... |
{"title":"LINQ: combining join and group by","tags":["c#","linq","linq-to-sql","join","group-by"],"question_text":"I have a query that combines a join and a group, but I have a problem. The query is like:\n`var result = from p in Products \n join bp in BaseProducts on p.BaseProductId equals bp.Id \n group p by p.SomeId... |
{"title":"What is start-stop-daemon in linux scripting?","tags":["linux","shell","init.d"],"question_text":"What is start-stop-daemon and how should it be used?\nI am trying to automate a particular program to run. Whenever the system starts, the program should run. For that I am writing script in \"\/etc\/init.d\/\" l... |
{"title":"how to convert 2d list to 2d numpy array?","tags":["python","numpy"],"question_text":"I have a 2D list something like\n`a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]`\nand I want to convert it to a 2d numpy array. Can we do it without allocating memory like\n`numpy.zeros((3,3))`\nand then storing values to it?","answ... |
{"title":"Good text editor for Windows?","tags":["c++","windows","compiler-construction","text-editor"],"question_text":"I'm looking for a text editor, much like TextMate (\nwww.macromates.com\n) on Mac, but I want it to have a built-in compiler.\nFor example, I do not want an IDE like Visual Studio or Eclipse. I'm loo... |
{"title":"How do I get Logcat for multiple devices running at the same time in Eclipse","tags":["android","eclipse","logcat"],"question_text":"I have two android devices connected to the same station. I would like to view the logcat for both while running them in debug mode in eclipse.\nI have had SOME luck with the fo... |
{"title":"Error when installing Ruby 2.1.3 with RVM","tags":["ruby","osx","rvm"],"question_text":"I'm trying to install Ruby 2.1.3 with RVM. I have the latest version of XCode installed and I have a clean install of rvm.\nI'm basically doing\n`rvm autolibs brew\nrvm install ruby-2.1.3`\nEverything looks to be working o... |
{"title":"can I set accessibility identifier in interface builder? Xcode4.2","tags":["ios","accessibility","ios-ui-automation"],"question_text":"I can only set Accessibility Label in interface builder, but in UI Automation,I need Accessibility Identifier to get the UI elements.\nany way to do this?","answer_text":"The ... |
{"title":"Force my local master to be origin\/master","tags":["git","github","branch"],"question_text":"I've let master and origin\/master get stuck in the sidelines, and am no longer interested in the changes on that branch.\nI followed these instructions to get my local master pointing to the right place\nChange the ... |
{"title":"Should application architects write code?","tags":["architecture"],"question_text":"This is an often-asked question that has views on both side. Those in favour will argue:\nTo design a system for coders you must understand how to code (and be coding)\nYou can't design a system without being aware of what is ... |
{"title":"android grid view place items from right to left","tags":["android","gridview","android-gridview","arabic","right-to-left"],"question_text":"I'm working on an android application with\narabic version\n.\nIn one of the interfaces, I have gridView. So to display items in the correct order,\nI have to display it... |
{"title":"Using \"If cell contains #N\/A\" as a formula condition.","tags":["excel","excel-formula"],"question_text":"I need help on my Excel sheet. How can I declare the following\n`IF`\ncondition properly?\n`if A1 = \"n\/a\" then C1 = B1\nelse if A1 != \"n\/a\" or has value(int) then C1 = A1*B1`","answer_text":"Input... |
{"title":"How to log error message in drupal","tags":["php","drupal","error-logging"],"question_text":"How to log our\nown error messages\n(for ex: error due to invalid user date entry) which is generated in\nphp\nprogram to\ndrupal error log\n.","answer_text":"You can use the\n`watchdog`\nfunction\n:\n`watchdog($type,... |
{"title":"How to get the size of the current screen in WPF?","tags":["c#","wpf","xaml","size","screen"],"question_text":"I know I can get the size of the primary screen by using\n`System.Windows.SystemParameters.PrimaryScreenWidth;\nSystem.Windows.SystemParameters.PrimaryScreenHeight;`\nBut how do I get the size of the... |
{"title":"JavaScript XMLHttpRequest using JsonP","tags":["javascript","ajax","jsonp"],"question_text":"I want to send request parameters to other domain\nI already know that Cross Scripting needs JsonP and I have used JsonP with Jquery ajax\nbut i do not figure out how to do Cross Scripting as using XMLHttpRequest\nfol... |
{"title":"Decoding and understanding assembly code","tags":["c","gdb","assemblies"],"question_text":"So a little background. I am a beginner with c and assembly code, we have an \"bomb\" assignment (written in c)which calls methods that require certain passwords, but the code is not visible and I need to determine the ... |
{"title":"How to get file length in Go?","tags":["file","go"],"question_text":"I looked up\ngolang.org\/pkg\/os\/#File\n, but still have no idea.\nSeems there is no way to get file length, did I miss something?\nHow to get file length in Go?","answer_text":"`(*os.File).Stat()`\nreturns a\n`os.FileInfo`\nvalue, which in... |
{"title":"What is the Scala equivalent to a Java builder pattern?","tags":["java","design-patterns","scala"],"question_text":"In the work that I do on a day to day in Java, I use builders quite a lot for fluent interfaces, e.g.:\n`new PizzaBuilder(Size.Large).onTopOf(Base.Cheesy).with(Ingredient.Ham).build();`\nWith a ... |
{"title":"Use of Haskell state monad a code smell?","tags":["haskell","coding-style","monads","state-monad"],"question_text":"God I hate the term \"code smell\", but I can't think of anything more accurate.\nI'm designing a high-level language & compiler to\nWhitespace\nin my spare time to learn about compiler construc... |
{"title":"Configuring the SubLime Linter Plugin to use Ruby 1.9 Syntax","tags":["ruby","sublimetext"],"question_text":"I'd like to get the SubLime Linter plugin (\nhttps:\/\/github.com\/Kronuz\/SublimeLinter\n) to recognize Ruby 1.9 syntax. Has anybody been able to get this to work in SublimeText 2?\nHere is my current... |
{"title":"MYSQL count all rows per table for in one query","tags":["sql","mysql","count"],"question_text":"Is there a way to query the DB to find out how many rows there are in all the tables\nie\n`table1 1234\ntable2 222\ntable3 7888`\nHope you can advise","answer_text":"`SELECT TABLE_NAME, TABLE_ROWS FROM `informatio... |
{"title":"Android NumberPicker: Set min, max, default from XML","tags":["android","xml","layout","numberpicker"],"question_text":"Is there a way to set the minimum, maximum and default values of a\nNumberPicker\nfrom the XML Layout?\nI'm doing it from within the Activity code:\n`np = (NumberPicker) findViewById(R.id.np... |
{"title":"JavaScriptSerializer.Deserialize array","tags":["c#","asp.net-mvc-3"],"question_text":"I'm having trouble deserializing an array in .NET MVC3, any help would be appreciated.\nHere's the code snippet:\n`using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)\n using (StreamReader reader = n... |
{"title":"Does my ASP.NET application stop executing if I overwrite the DLLs?","tags":["asp.net"],"question_text":"Assume that my ASP.NET application is making 4 separate database calls. If after the 2nd call, I overwrite the DLLs in BIN folder, does it stop the application from continuing its processing, hence resulti... |
{"title":"jQuery event when select option","tags":["javascript","jquery"],"question_text":"What's the event to bind for when a select form is selected?\nI have something like this:\n`<select id='list'>\n<option value='1'>Option A<\/option>\n<option value='2'>Option B<\/option>\n<option value='3'>Option C<\/option>\n<\/... |
{"title":"How may I override the compiler (gcc) flags that setup.py uses by default?","tags":["python","gcc","setup.py"],"question_text":"I understand that setup.py uses the same CFLAGS that were used to build python. I have a single C extension of ours that is segfaulting. I need to build it\nwithout\n`-O2`\nbecause\n... |
{"title":"How to use shared memory with Linux in C","tags":["c","linux","fork","shared-memory"],"question_text":"I have a bit of an issue with one of my projects.\nI have been trying to find a well documented example of using shared memory with fork() but to no success.\nBasically the scenario is that when the user sta... |
{"title":"Why does Visual Studio 2008 tell me .9 - .8999999999999995 = 0.00000000000000055511151231257827?","tags":["visual-studio","precision","immediate-window"],"question_text":"When I type this into the Visual Studio 2008 immediate window:\n`? .9 - .8999999999999995`\nIt gives me this as the answer:\n`0.00000000000... |
{"title":"CSS :before and :first-child combined","tags":["css"],"question_text":"I'm using the following code to add separators between my menu items:\n`#navigation_center li:before {\n content: \"| \";\n color: #fff;\n}`\nNow I want the first item not to have a separator in front of it, so I figured out the following ... |
{"title":"Why does SQL keep creating a DF constraint?","tags":["sql","sql-server","sql-server-2008"],"question_text":"I'm trying to create upgrade and backout scripts in SQL. The upgrade script adds a column like so:\n`IF NOT EXISTS (SELECT * FROM sys.columns WHERE Name = N'ColumnName' \n AND object_id = OBJECT_ID(N'[d... |
{"title":"Subclassing int in Python","tags":["python","inheritance","subclass","python-2.5"],"question_text":"I'm interested in subclassing the built-in\n`int`\ntype in Python (I'm using v. 2.5), but having some trouble getting the initialization working.\nHere's some example code, which should be fairly obvious.\n`cla... |
{"title":"How to convert current date to epoch timestamp?","tags":["python"],"question_text":"How to convert current date to epoch timestamp ?\nFormat current date:\n`29.08.2011 11:05:02`","answer_text":"That should do it\n`import time\ndate_time = '29.08.2011 11:05:02'\npattern = '%d.%m.%Y %H:%M:%S'\nepoch = int(time.... |
{"title":"Javascript error - cannot call method 'appendChild' of null","tags":["javascript"],"question_text":"I am new to Javascript (and programming in general) and have been trying to get a basic grasp on working with the DOM. Apologies if this is a very basic mistake, but I looked around and couldn't find an answer.... |
{"title":"Which is the suggested place to modify binded form data in Symfony?","tags":["symfony2","symfony-forms"],"question_text":"I've a form for creating a new\n`Customer`\n. A customer may have a mobile number. Mobile number should be persisted without\n`+`\nor\n`00`\nprefix that user can type. This can be accompli... |
{"title":"How to remove actionPerformed methods in NetBeans","tags":["swing","netbeans","desktop-application"],"question_text":"When a\n`JButton`\nis added to a content pane, we can set an action by double clicking the button or Right click->Event->Action->actionPerformed.Let say, we set somthing to happen. Then we nee... |
{"title":"Do global variables mean faster code?","tags":["c++","c","optimization"],"question_text":"I read recently, in an\narticle on game programming\nwritten in 1996, that using global variables is faster than passing parameters.\nWas this ever true, and if so, is this still true today?","answer_text":"Short answer ... |
{"title":"How to get a UITableview to go to the top of page on reload?","tags":["iphone","cocoa-touch","tableview"],"question_text":"I am trying to get a UITableview to go to the top of the page when I reload the table data when I call the following from\n`- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSI... |
{"title":"How to find sum of multiple columns in a table in SQL Server 2005?","tags":["sql","sql-server","sql-server-2005"],"question_text":"I have a table\n`Emp`\nwhich has these rows:\n`Emp_cd | Val1 | Val2 | Val3 | Total\n-------+-------+-------+-------+-------\n 1 | 1.23 | 2.23 | 3.43 | \n 2 | 23.03 | 12.23 | 2.92 ... |
{"title":"Python urllib2: Reading content body even during HTTPError exception?","tags":["python"],"question_text":"I'm using urllib2 to fetch a a page via HTTP. Sometimes the resource throws a HTTP error 400 (Bad Request) when my request contains an error. However, that response also contains an XML element that gives... |
{"title":"ImportError: No module named datetime","tags":["python","ubuntu-12.04","ubuntu-14.04"],"question_text":"When I upgrade my Ubuntu into 14.04 from 12.04, this time I get this error:\n`ImportError: No module named datetime`","answer_text":"This happened to me when I created a virtualenv and then upgraded from 12... |
{"title":"How to programmatically clear outputcache for controller action method","tags":["asp.net","asp.net-mvc"],"question_text":"If the controller action has the OutputCache attribute specified on an action, is there any way to clear the output cache without having to restart IIS?\n`[OutputCache (Duration=3600,VaryB... |
{"title":"Autogenerate function comments in Eclipse","tags":["java","eclipse"],"question_text":"How to autogenerate xml based function header comments (@param etc) in Eclipse. Is there an equivalent of \"\/\/\/\" shortcut in Visual Studio.","answer_text":"In the line just before the method definition, type\n`\/**`\nand... |
{"title":"Activator.CreateInstance - How to create instances of classes that have parameterized constructors","tags":["c#",".net",".net-3.5"],"question_text":"I have read a few bits and bobs online about this topic but found none that work for me.\nWhat I am trying to do is create a class of a runtime Type.\nI use\n`Ac... |
{"title":"Variable Scope issue with if statements ( PHP)","tags":["php","if-statement","scope"],"question_text":"Alright I seem to have a misconception with variable scope with PHP, forgive my lack of the subject as I come from a java, C# background. Thinking I could make variables accessible to functions or if stateme... |
{"title":"Are SSL certificates bound to the servers ip address?","tags":["websphere","ssl-certificate"],"question_text":"We have two different ldap providers in two different physical office locations.\nWhen I connect my laptop to one location and I 'retrieve from port' (in Websphere 6.1) to import the ssl cert of the ... |
{"title":"What are the benefits of CursorLoaders?","tags":["android","cursor","android-3.0-honeycomb","android-loadermanager"],"question_text":"I use\n`Cursors`\nextensively in my app, to load and occasionally write information from and to a database. I have seen that Honeycomb and the Compatibility Package have new\n`... |
{"title":"Angular JS does not allow preventDefault or return false to work on form submission","tags":["jquery","angularjs"],"question_text":"I have a form I'd like to deliver via AJAX :\n`<form class=\"form-inline ng-pristine\" ng-submit=\"sendForm()\" method=\"post\" action=\"\/sign_up\" accept-charset=\"UTF-8\">\n$s... |
{"title":"How to make \"shaking\" animation","tags":["iphone","objective-c","ios","xcode","uiimage"],"question_text":"In my xcode project I have an UIImage. I want to make it shaking (animation) from left to right a little bit. I wrote this code, however, its not working.\n`-(void)errorShake\n{\n [UIView beginAnimation... |
{"title":"Problem rolling out ADO.Net Data Service application to IIS","tags":[".net","web-services","iis","wcf-data-services"],"question_text":"I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the fol... |
{"title":"How do I set up HttpContent for my HttpClient PostAsync second parameter?","tags":["c#","httpclient","httpcontent"],"question_text":"`public static async Task<string> GetData(string url, string data)\n{\n UriBuilder fullUri = new UriBuilder(url);\n if (!string.IsNullOrEmpty(data))\n fullUri.Query = data;\n Ht... |
{"title":"how to raise warning if return value is disregarded - gcc or static code check?","tags":["c++","c","gcc","compiler-construction","static-analysis"],"question_text":"I'd like to see all the places in my code (C++) which disregard return value of a function. How can I do it - with gcc or static code analysis to... |
{"title":"Verbose level with argparse and multiple -v options","tags":["python","argparse"],"question_text":"I'd like to be able to specify different verbose level, by adding more -v options to the command line. For example:\n`$ myprogram.py \n$ myprogram.py -v\n$ myprogram.py -vv\n$ myprogram.py -v -v -v`\nwould lead ... |
{"title":"How to use Hibernate Criteria objects for multiple and\/or conditions","tags":["hibernate-criteria"],"question_text":"I need to create a Hibernate criteria restriction that ors 3 Conditions. The problem is that the last condition is acutally to conditions using the AND operator.\nMy first condition:\nCriterio... |
{"title":"iOS Universal Development \u00e2\u0080\u0093 Use of Tilde Sign (~) in Xib File and Image Name for differentiation","tags":["iphone","objective-c","ios","xcode"],"question_text":"While developing\n`universal apps`\n, we have to write a\n`conditional code`\nfor each\n`device`\n\u00e2\u0080\u0093 the\n`iPad`\nas... |
{"title":"Display Eclipse tabs on several lines","tags":["eclipse","ide","eclipse-plugin","eclipse-3.5"],"question_text":"I'm using eclipse galileo. Is it possible to display the tabs of my open files on several lines instead of using the\n`>>`\nsign. I still want a unique window to view the code though.\nIf there is n... |
{"title":"Set environment variables for a process","tags":["c#","windows","environment-variables","processstartinfo"],"question_text":"What is the environment variable concept?\nIn a C# program I need to call an executable. The executable will call some other executables that reside in the same folder. The executables ... |
{"title":"Proxy which requires authentication with Android Emulator","tags":["android","authentication","proxy"],"question_text":"Has anybody managed to get the Android Emulator working behind a proxy which requires authentication?\nI've tried setting the -http-proxy argument to\n`http:\/\/DOMAIN\/USERNAME:PASSWORD@IP:... |
{"title":"Rails 3 remote form: How do I specify the content type?","tags":["ruby-on-rails","ajax","ruby-on-rails-3","forms","ujs"],"question_text":"I am using Rails 3.2, I have a form and I want it to be posted via ajax and have the controller return json.\nI am using a form_for helper like so:\n`= form_for(@object, :r... |
{"title":"Ninject: Registering an already created instance with Ninject?","tags":["dependency-injection","ninject","ninject-2"],"question_text":"Can anyone tell me if i can register an already created instance of a class with Ninject so that it will use this instance everytime it needs injecting?\nI suppose you can cal... |
{"title":"Adding resource files to xcode","tags":["xcode","resources"],"question_text":"I'm trying to add some new resource files to a project which was build by another person on another mac. I think that the project has the provision of the previews person.\nUsing right click->Add Files to \"MyProject\" doesn't provi... |
{"title":"What happens technically in this C++ code?","tags":["c++","c++11"],"question_text":"I have a class\n`B`\nwhich contains a vector of class\n`A`\n. I want to initialize this vector through the constructor. Class\n`A`\noutputs some debug info so I can see when it is constructed, destructed, copied or moved.\n`#i... |
{"title":"Scan with filter using HBase shell","tags":["nosql","hbase"],"question_text":"Does anybody know how to scan records based on some scan filter i.e.:\n`column:something = \"somevalue\"`\nSomething like\nthis\n, but from HBase shell?","answer_text":"Try this. It's kind of ugly, but it works for me.\n`import org.... |
{"title":"Goal of C's \"auto\" keyword","tags":["c++","c","c++11"],"question_text":"What is the goal of the \"auto\" keyword in C? With C++ 0x it got new meaning but does it mean that my code will break if I port C code over to a C++ 0x compiler?","answer_text":"It will break if your code contains the\n`auto`\nkeyword.... |
{"title":"Determine if user navigated from mobile Safari","tags":["javascript","iphone","mobile-safari","web-clips"],"question_text":"I have an app, and I'd like to redirect the users to different pages based on where they are navigating from.\nIf navigating from web clip, do not redirect.\nIf navigating from mobile Sa... |
{"title":"Delete all rows in an HTML table","tags":["javascript","html","html-table"],"question_text":"How can I delete all rows of an HTML table except the\n`<th>`\n's using Javascript, and without looping through all the rows in the table? I have a very huge table and I don't want to freeze the UI while I'm looping t... |
{"title":"Good or bad practice in Python: import in the middle of a file","tags":["python","python-import"],"question_text":"Suppose I have a relatively long module, but need an external module or method only once.\nIs it considered OK to import that method or module in the middle of the module?\nOr should\n`import`\ns... |
{"title":"Optimizing Lookups: Dictionary key lookups vs. Array index lookups","tags":["c#",".net","performance","poker"],"question_text":"I'm writing a 7 card poker hand evaluator as one of my pet projects. While trying to optimize its speed (I like the challenge), I was shocked to find that the performance of Dictiona... |
{"title":"Creating subdomains in Amazon EC2","tags":["linux","amazon-ec2","subdomain"],"question_text":"How can I create subdomains on Amazon EC2?\nIs adding virtual host in httpd.conf is enough.. or any other changes also needs to be done?\nThanks","answer_text":"Depends on your server software. But as you mention htt... |
{"title":"Java Executors: how can I set task priority?","tags":["java","multithreading","concurrency","executor","thread-priority"],"question_text":"Is there a possibility to set priority to tasks which are executed by Executors? I've found some statements in JCIP about it's possible but I cannot find any example and I... |
{"title":"Features\/functions that make your app more professional? Coding hobbyhorses","tags":["php"],"question_text":"What\nfeatures\ndo you implement (how) in your PHP web applications because\nyou deem it \"\nmore professional\n\" in some way? Or do you have personal nitpicks\nand code hobbyhorses, specifically sma... |
{"title":"new ios6 architecture error: file is universal (3 slices) but does not contain a(n) arm7vs slice","tags":["cordova","ios6","xcode4.5","armv7"],"question_text":"I have a device that was designed in cordova 1.8.1 and xcode 4.4. I wanted to be able to update it to work on the iPhone 5 and ios 6.However even when... |
{"title":"Invoke method in objective c code from HTML code using UIWebView","tags":["javascript","ios","uiwebview"],"question_text":"I have .html file in my iOS app. HTML file has few div blocks with onClick methods.\nWhen I tap on these blocks I invoke some javascript code in web view, but I need also know about these... |
{"title":"How can I get a Python generator to return None rather than StopIteration?","tags":["python","exception","generator","stopiteration"],"question_text":"I am using generators to perform searches in lists like this simple example:\n`>>> a = [1,2,3,4]\n>>> (i for i, v in enumerate(a) if v == 4).next()\n3`\n(Just ... |
{"title":"Partial list unpack in Python","tags":["python"],"question_text":"In Python, the assignment operator can unpack list or tuple into variables, like this:\n`l = (1, 2)\na, b = l # Here goes auto unpack`\nBut I need to specify exactly the same amount of names to the left as an items count in the list to the righ... |
{"title":"Why is strcmp not SIMD optimized?","tags":["c++","sse","simd","strcmp","sse2"],"question_text":"I've tried to compile this program on an x64 computer:\n`#include <cstring>\nint main(int argc, char* argv[])\n{\n return ::std::strcmp(argv[0],\n \"really really really really really really really really really\"\... |
{"title":"How to set encoding in .getJSON JQuery","tags":["jquery","ajax","json","character-encoding"],"question_text":"In my web app, I submit some form fields with jQuery\n`$.getJSON()`\nMethod. I am having some problems with the encoding. The character-set of my app is\n`charset=ISO-8859-1`\nbut I think these fields... |
{"title":"Test if a string contains any of the strings from an array","tags":["java","string","coding-style","if-statement"],"question_text":"How do I test a string to see if it contains any of the strings from an array?\nInstead of using\n`if(string.contains(item1)||string.contains(item2)||string.contains(item3))`","a... |
{"title":"Why is the result of 1\/3 == 0?","tags":["java","integer-division"],"question_text":"I was writing this code:\n`public static void main(String[] args) {\n double g = 1 \/ 3;\n System.out.printf(\"%.2f\", g);\n}`\nThe result is 0. Why is this, and how do I solve this problem?","answer_text":"The two operands (... |
{"title":"Python: get datetime for '3 years ago today'?","tags":["python"],"question_text":"This must be a duplicate (and documented), but I can't find the answer via Google.\nIn Python, how do I get a datetime object for '3 years ago today'?\nThanks!\nUPDATE: FWIW, I don't care hugely about accuracy... i.e. it's Feb 2... |
{"title":"Live-stream video from one android phone to another over WiFi","tags":["android","video","streaming","video-streaming","live-streaming"],"question_text":"I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connectio... |
{"title":"Unable to commit to Subversion","tags":["svn"],"question_text":"I have a client who had to rebuild his automated build server. He checked out his project folder from my subversion server but is now no longer able to commit - he gets this error:\n`Error: Commit failed (details follow): \nError: Cannot write to... |
{"title":"Calling original method with Moq","tags":["c#","mocking","moq"],"question_text":"I have a ProductRepository with 2 methods, GetAllProducts and GetProductByType, and I want to test the logic at GetProductByType. Internally, GetProductByType makes a call to GetAllProducts and then filters the correct ones.\n`pu... |
{"title":"pig - how to reference columns in a FOREACH after a JOIN?","tags":["apache-pig"],"question_text":"`A = load 'a.txt' as (id, a1);\nB = load 'b.txt as (id, b1);\nC = join A by id, B by id;\nD = foreach C generate id,a1,b1;\ndump D;`\n4th line fails on:\n`Invalid field projection. Projected field [id] does not e... |
{"title":"PHP custom postcard","tags":["php","image","gd"],"question_text":"i am creating a new feature on my site that allow people to send postcard to friends. in this section they can choose the image they want to send (they already uplaoded the image to their profile -> my pictures section)\ni am using the php func... |
{"title":"Unique identifier for an iPhone app","tags":["iphone","ios-simulator"],"question_text":"For an iPhone app that submits images to a server I need somehow to tie all the images from a particular phone together. With every submit I'd like to send some unique phone id. Looked at\n[[UIDevice mainDevice] uniqueIden... |
{"title":"if div has content show div","tags":["jquery","animation","html"],"question_text":"ok heres what i have... it works fine but it looks for a word rather than content. i just want it to show when there is any content..\n`$(document).ready(function(){\n if ($(\"#box3:contains('Product')\").length) {\n $('#third'... |
{"title":"How do I put my website's logo to be the icon image in browser tabs?","tags":["html","favicon"],"question_text":"The image next to the page title in the browser tab - how can you link an image here?","answer_text":"That image is called\n'\nfavicon\n'\nand it's a small square shaped\n`.ico`\nfile, which is the... |
{"title":"Extract the first word of a string in a SQL Server query","tags":["tsql"],"question_text":"What's the best way to extract the first word of a string in sql server query?","answer_text":"`SELECT CASE CHARINDEX(' ', @Foo, 1)\n WHEN 0 THEN @Foo -- empty or single word\n ELSE SUBSTRING(@Foo, 1, CHARINDEX(' ', @Fo... |
{"title":"Test::Unit Rails - How to assert one number is greater than another one?","tags":["ruby-on-rails","assert","testunit"],"question_text":"I am writing my first unit tests with Test::Unit and I have reached a point where I need to compare two numbers. Much to my surprise, I have discovered that none of the follo... |
{"title":"mocking a method that return generics with wildcard using mockito","tags":["java","generics","mockito"],"question_text":"I'm using mockito 1.9.5. \nI have the following code:\n`public class ClassA {\npublic List<? extends MyInterface> getMyInterfaces() {\n return null;\n}\npublic static void testMock() {\n Li... |
{"title":"C function syntax, parameter types declared after parameter list","tags":["c","syntax","function"],"question_text":"I'm relatively new to C. I've come across a form of function syntax I've never seen before, where the parameter types are defined after that parameter list. Can someone explain to me how it is d... |
{"title":"Push View Controller, Black Screen","tags":["ios","uiviewcontroller"],"question_text":"I'm pushing to a new view controller and passing some data to it. When I run the application I can press the button and push to a new view but the screen is completely black. Any help is appreciated.\n`- (IBAction)button:(i... |
{"title":"`goto` in Python","tags":["python","compilation","bytecode","goto"],"question_text":"I must use\n`goto`\nin Python. I read\nthis\nbut my Python implementation (CPython 2.7.1 on Mac) does not have this module, so it doesn't seem to be portable. It should at least work in all Python implementations which suppor... |
{"title":"Using client\/server certificates for two way authentication SSL socket on Android","tags":["java","android","ssl"],"question_text":"I'm working on an Android app that requires both client and server certificate authentication. I have an SSLClient class that I created that works beautifully on regular desktop... |
{"title":"How can I allow an Ant property file to override the value set in another?","tags":["ant"],"question_text":"I have an ant file that does the following:\n`<property file=\"project.properties\" description=\"Project configuration properties\"\/>\n<property file=\"build-defaults.properties\" description=\"defaul... |
{"title":"Appending to crontab with a shell script on Ubuntu","tags":["ubuntu","cron","debian","crontab"],"question_text":"I'm trying to add a line to the crontab on Ubuntu.\nRight now, I'm doing\n`crontab -e`\nand editing the crontab there.\nHowever, I can't seem to find the real crontab file, since\n`crontab -e`\nsee... |
{"title":"How to make a .NET application \"large address aware\"?","tags":[".net","windows","memory"],"question_text":"Assuming I have booted a 32-bit Windows Server with the \/3GB switch, how can I make a .NET application use the additional address space?","answer_text":"The flag is part of the image header, so you ne... |
{"title":"Can anyone help me understand this error? \"definition of implicitly-declared \u00e2\u0080\u0098classA::classA()\u00e2\u0080\u0099\"","tags":["c++"],"question_text":"Heres the code:\n`#include <cstdlib>\n#include <iostream>\nusing namespace std;\nclass classA\n{ \n protected:\n void setX(int a);\n private:\n ... |
{"title":"click command in selenium webdriver does not work","tags":["selenium","selenium-ide","selenium-webdriver"],"question_text":"I have just recently done an export of my selenium IDE code to selenium web driver. I have found that a lot of the commands that worked in IDE either fail to work or selenium web driver ... |
{"title":"Confused as to why this C# code compiles, while similar code does not","tags":["c#","extension-methods"],"question_text":"Let's take the following extension method:\n`static class Extensions\n{\n public static bool In<T>(this T t, params T[] values)\n {\n return false;\n }\n}`\nI'm curious as to why\nthis\nco... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.