instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am making a program in which two players face each other in "combat", each player have a skill level, represented by a number between 1 and 100, this number is used to determine which player is better so for example if player A has 50 and player B has 100 then B has 50% more chances of winning the combat, What would ...
stackexchange/codereview
Hey all, i am trying to turn on a A/V Reciever with a RS232 command using the VB6 comm32. To turn it on it says to use: Command code Parameter code CR Code set example PW ON <CR> PWON<CR> And this is my VB6 code i am currently using that doesnt seem to work... MSComm.CommPort = 2 MSComm...
stackexchange/codereview
Hey guys... today is my first day hacking away on the iphone SDK. Having a blast but have a quick question. I'm trying to move an UIView around the screen dynamically by sending it information from a slider. My slider is working fine but I cant seem to figure out how to get the UIView to move. My .h file... @interfac...
stackexchange/codereview
I'm implementing a custom datasource in my CakePHP application, I've implemented the basic functions for a datasource (read(), listSources(), describe()). The datasource uses Xml as input and I would really like to use find('neighbors') on the Xml and was wondering if Cake "automagically" implements this feature (becau...
stackexchange/codereview
So on 11g I can execute the following plsql without any problems: DECLARE lob1 CLOB; BEGIN SELECT e.xml_col.getClobVal() INTO lob1 FROM "XML"."XML_TABLE" e WHERE KEY_COL=3 ; DBMS_LOB.APPEND(lob1, 'is a test node</test>'); END; But on 9i the same code results in a ORA-22275: invalid LOB locator specified error...
stackexchange/codereview
I'm trying to overload the "<<" operator for a template class. I've the definition of the class in a .h file and its implementation in a .cpp file. /tmp/ccjJIJhO.o: In function `main': main.cpp:(.text+0xad): undefined reference to `std::basic_istream<char, std::char_traits<char> >& operator>><int>(std::basic_istream<c...
stackexchange/codereview
Possible Duplicate: How do you use anonymous functions in PHP? Why should i use an anonymous function? I mean, what's the real deal using it? I just don't really get this. I mean, you use function to make the code more clean or to use it more than once. But Anonymous functions just don't do neither the first nor the...
stackexchange/codereview
I was thinking about a building a CMS, and I want to implement the wordpress-like permalink for my posts. How do I do that? I mean, How do I define the custom url structure for my pages?
stackexchange/codereview
i tried to write program adding ip address using this function DWORD AddIPAddress( __in IPAddr Address, __in IPMask IpMask, __in DWORD IfIndex, __out PULONG NTEContext, __out PULONG NTEInstance ); I have added it but how can I delete it. DeleteIPAddress takes NTEContext as Parameter how can i get it...
stackexchange/codereview
I am trying to include source code in bullet lists with reStructuredText; like this: - List item 1 :: code sample... code sample... - List item 2 :: code sample... code sample... However, I get the following warning: System Message: WARNING/2 Literal block expected; none found. The empty lines in the list ...
stackexchange/codereview
I have a program written in C which should count the number of times the word "the" appears in text files that are given as arguments.But the program keeps giving a segmentation fault error and I have no more ideas on how to solve this.Any help would be appreciated.Thank you! Here is the code: #include <stdio.h> #inc...
stackexchange/codereview
Here is an image: This image is a simple black-to-transparent gradient saved in full RGBA PNG. Here is the same image, converted to indexed-alpha PNG by GIMP (Photoshop produces the same result) As you can see, the gradient is now half-opaque, half-transparent. Here is the same image again, only this time it wa...
stackexchange/codereview
I am using a NSArrayController to display the records in a NSTableView. I am reading back a selected record using [recordArray objectAtIndex:[tableView selectedRow]]. This is working fine when I don't click any of the headers in the table to sort the data. When I click a header to sort the data, the data is sorted on t...
stackexchange/codereview
I'm working on windows xp. How can i write a simple script which would automatically log me out of this account and log into another account on this computer upon execution of a trigger point I set in my application?? Please help.
stackexchange/codereview
I have created a context menu and added menuitems to it like below, <ContextMenu Width="150"> <MenuItem Header="Refresh Data"/> <MenuItem Header="Show Prefilter"/> <MenuItem Header="Show Field List" Command="local:PivotGridCommands.ShowFieldList"/> </ContextMenu> Here i have specified width too. The problem is i...
stackexchange/codereview
How event sourcing can be combined with several types of dictionary objects like Country, Region, Time Zone etc. and dictionary types from particular domain model like Budget or Availability definitions. Some of dictionary objects should be possible to edit in admin UI but some not. For example we decided, that we do ...
stackexchange/codereview
In the following code: using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MyChild x = new MyChild(); System.Console.ReadKey(); } } class MyParent { protected static void TestFunction() { ...
stackexchange/codereview
I am trying to create a database using SQL Server Management Express. The following error occurs: TITLE: Microsoft SQL Server Management Studio Express Create failed for Database 'dbTestDBase'. (Microsoft.SqlServer.Express.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&P...
stackexchange/codereview
table view should a rows to table view when i am scrollig.. how to do that..
stackexchange/codereview
I would like to build a component to play all the audio/media files(especially .flv files) using asp.net.so could you please provide me the necessary code/idea to create the component
stackexchange/codereview
I am looking for a way how I can via c# back up some database from mysql (file backup). And also via c# restore database from backup file to some new location. Can you help me with some ideas how to get started here . Thanks.
stackexchange/codereview
I want to make my borders be percentages because my whole layout is based on percentages and when the screen is small enough one part floats lower because the borders are too big in px. jsFiddle here
stackexchange/codereview
Background: I'm using a public computer running windows 7. I don't have permissions to access to the command line (nor the control panel, nor most of C drive). So, I've written the commands I need to execute as a batch program and saved it in a file called "run.bat" onto the Desktop. I run the program by double-clickin...
stackexchange/codereview
After talking with a friend of mine from Google, I'd like to implement some kind of Job/Worker model for updating my dataset. This dataset mirrors a 3rd party service's data, so, to do the update, I need to make several remote calls to their API. I think a lot of time will be spent waiting for responses from this 3rd ...
stackexchange/codereview
i have a listview and button on the list how can i use both button.setonclicklistener and onListItemClick in listview
stackexchange/codereview
This is very simple so I'm not sure why I can't do this. All I want to do it position some UIImageViews when my app becomes active. I had been using CGAffineTransformMakeTranslation but I can now see that this is not correct because it moves the view a set amount rather than moving it to a set position. What should I b...
stackexchange/codereview
I have an xml file, which contains a set of textual element tags (each contains the decimal offset value and data length of the corresponding binary element) and the whole binary data of all the elements at the end. An example is as follows. <?xml version="1.0" encoding="UTF-8"?> <Package> <element> <offset>0...
stackexchange/codereview
I'm new to Entity Framework and I have some troubles with a query that includes a join. Here's the model I'm using: http://img690.imageshack.us/img690/7132/modelow.png I want to query all models, with the enabled info for a given profile (which I get from the instance info). As first step I'm trying to get all models w...
stackexchange/codereview
Where I can find maven2 repository with jsf 2.0.3? I've searched in Google and saw one of developers say that it is on download.java.net, but my Maven doesn't find it.
stackexchange/codereview
I'm trying to find a distinct List<Author> given a List<BlogPost> where each BlogPost has an Author property. I've found the Distinct() extension method in generics and I'm trying to use it. First, let me explain my loop and where I want to use it, then I'll explain my classes and where I'm having trouble. Trying to us...
stackexchange/codereview
Is there a way to do this with the Term::ReadKey-module? #!/usr/bin/env perl use warnings; use 5.012; use Term::Screen; say( "Hello!\n" x 5 ); sleep 2; my $scr = Term::Screen->new(); $scr->clrscr();
stackexchange/codereview
My program errors out with a Null Reference Exception when it attempts to add to a List Code for the for loop for (int i = 0; i < UserCourses.Length; i++) { CurrentUser.Course_ID.Add(UserCourses[i]); } Code for CurrentUser (which is a new of t...
stackexchange/codereview
My CSS formatting is lost when i use it with MFMailComposeViewController. Below is my sample code. I just insert my table data under the body section. <html> <head> <style type="text/css"> #customers { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; width: 100%; border-collapse: co...
stackexchange/codereview
jsFiddle I'm trying to output images and text horizontally. The text elements use the jQuery Cycle Lite Plugin to cycle over a list of words. As you can see in the jsFiddle above, the cycling text elements are on the page, but for some reason the positioning of the elements is messed up. Some of the text elements appea...
stackexchange/codereview
How to use suppression for custom rules?
stackexchange/codereview
I am attempting to create a classified site, whereby users can register to my site and then add a classified listing. I would like to use AccountController - my basic conundrum is when I add an advert I need it to be linked to a specific user. E.G. User SSMith has created a new listing (View all listings by SSmith) Is...
stackexchange/codereview
I use a variety of 3rd party web APIs, and many of them enforce rate limiting. It would be very useful to have a fairly generic PHP library that I could rate limit my calls with. I can think of a few ways to do it, perhaps by putting calls into a queue with a timestamp of when the call can be made, but I was hoping t...
stackexchange/codereview
Context is important for this question. So context first. I learned Symfony 3 years back and did not used it. Now, it looks it is out from job market. I did not say I have learned much to use that knowledge later in life except that chained style of calling method on object. That I saw first time there ( $obj->test()->...
stackexchange/codereview
I have class with member functions: typedef std::function<bool (const std::string &)> InsertFunction; bool insertSourceFile( const std::string & ); bool insertSourceDir( const std::string & ); bool insertHeaderFile( const std::string & ); bool insertHeaderDir( const std::string & ); I'd like to have a reference t...
stackexchange/codereview
What is the easiest(less code) way to post status on twitter?
stackexchange/codereview
I was working through an example in the concurrency chapter of "More iPhone 3 Development," and can't get KVO on an NSOperationQueue working as expected. I create an NSOperationQueue and observe its operations array using: NSOperationQueue *newQueue = [[NSOperationQueue alloc] init]; self.queue = newQueue; [newQueue re...
stackexchange/codereview
Is there a plugin or something that creates PDF files from a entered by the user form data, when it clicks on the submit button?
stackexchange/codereview
I did something foolish in some interop (using DllImport) at one point, but it still worked on 32 bit machines. What is done differently (and why?) on a 64 bit application that causes Method 1 to behave differently ? Method 1 (wrong way): ref byte param //Signature of `DllImport`ed function ref myarray[0] //Param...
stackexchange/codereview
Is this really needed when we data-attr for the elements in html <input type ="text" name="text1" id ="text1" data-attr="<?php echo $hell ?>">
stackexchange/codereview
I'm trying to provide to a DataGridview (winform) a one statement query in LINQ. The following line assign the sum of records values either to Debt or Credit member depending of the sum. transaction 1---* record var transactions = from t in this.account.transactions select new { Debt = t.records.Sum(x=...
stackexchange/codereview
how to display google map in windows mobile 6.5 as static map or dynamic map.
stackexchange/codereview
How do I flush (empty) the windows file read cache using C++ win32api?
stackexchange/codereview
I have a case that I could not find a proper solution. I need to have template base class and a manager class that does some work to that base class. Here is the code class Base; class Manager { public: void DoSomethingTo(Base * bclass) { if(bclass->PrivateVar == 0) // Some code } } cl...
stackexchange/codereview
Given: if ($variable = get_variable('variable')) { // ... } The *$variable = get_variable('variable')* throws an 'Assignment in condition' warning in Zend Studio. I understand what the warning means, but does anyone know what the rationale behind it is? Is it merely coding conventions, a matter of readability, e...
stackexchange/codereview
I was checking out a tutorial, found at http://www.codecommit.com/blog/scala/scala-for-java-refugees-part-4 This tutorial is from jan. 2008, I see, but I'm using Scala 2.8.0 if that makes a difference. class Color(val red:Int, val green:Int, val blue:Int) case class Red(r:Int) extends Color(r, 0, 0) case class Green(...
stackexchange/codereview
I need to add a table prefix to zend framework configurations. But it seems really complicated matter adding such a configuration (I have to add too many lines of code to do that). Is there a way to set the table prefix in a simple manner? (like other frameworks do). I'm using Zend Framework 1.11
stackexchange/codereview
When trying to attach a database file to: Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 <X64> (Build 7600: ) I get this error message: The database cannot be opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported. Any idea ...
stackexchange/codereview
I am attempting to call SQL stored procedure that does an INSERT. However, when I walkthrough my vb.net code, I get a message saying "Procedure or function sp_InsertARPlanner has too many arguments specified." I have double checked, but the SQL string in VB has the same # of params as in the stored procedure. Any id...
stackexchange/codereview
When a JavaScript code of a web page is implemented, then what happens? I mean when a browser parses an HTML web page, it comes to the JavaScript code of a web page, then it sends the code to its JavaScript compiler. I don’t understand what the output is of the compilation, and how it has been shown to the J-Component?...
stackexchange/codereview
I have created an Interface Builder plugin and want to be notified when the user connects an outlet at design time so that I can perform some action.
stackexchange/codereview
Basically, I have an instance of a Ruby object already but want to update whatever instance variables I can from yaml. There is a to_yaml function that will dump my object to yaml. I'm looking for something in the reverse. For example, my_obj.from_yaml(yaml_stuff) and have it update instance variables from the yaml pas...
stackexchange/codereview
I have the requirement that the content of all messages must be encrypted in some way. For the actual encryption, I can probably leverage the built in X.509 encryption. However, I'm wondering what the best way to do message level encryption is, without having to modify the messages themselves (so no WireEncryptedStrin...
stackexchange/codereview
Note for bounty: please answer only if you know a tool that can monitor what changes in the same db, don't mention tools that compare 2 dbs. A visual tool, like Embarcadero Change Manager is appreciated. I'd like to have a tool that allows me to see only "what changed" in a db, given a specific action. Scenario can be:...
stackexchange/codereview
The following is a simplified version of a database table I'm querying (let's call it Payments): date | userid | payment 20/1/10 | 1 | 10 21/1/10 | 1 | 15 17/1/10 | 2 | 7 18/1/10 | 2 | 9 It records payments made by users on certain dates. I ne...
stackexchange/codereview
I am running a JOGL based application, and it has been crashing when I perform certain drawing operations. However, The line it crashes on is a call to gl.glGenLists(1), so I'm not really sure how this could cause an error in the underlying application, since this line is a trivial line (unless the stack is in some sor...
stackexchange/codereview
Part of my daily work involves transferring of data from my system to client system using MSTSC, is it possible to automate this transfer or is there any command line that i can use instead of connecting to the Jumpbox and then manually moving the files.
stackexchange/codereview
Hay, i have some floats like these 4.3455 2.768 3.67 and i want to display them like this 4.34 2.76 3.67 I don't want to round the number up or down, just limit the amount of numbers shown after the decimal place to 2.
stackexchange/codereview
I often used SWI-Prolog's feature of being able to do listing(predicate). to see how it implements some of its predicates. I want to see exactly what it does with succ/2 because I'm using it on SWI-Prolog but I need it running with Sicstus too which doesn't have it! I've seen what it does in the SWI manual, tried to ...
stackexchange/codereview
I'm using two computers, each with a different version of visual studio. On the visual studio 2008 computer my code compiles. On the visual 2010 computer my code doesn't compile because I'm using the macro max(a,b) which as far as I know is defined in stdlib.h. I cannot just define max(a,b) because it'll be a redefinit...
stackexchange/codereview
This Is Not Homework. I have changed the names of the tables and fields, for illustrative purposes only. I admit that I am completely new to MySQL. Please consider that in your answer. The best way to illustrate the function of the query I need is like this: I have two tables. One table has a 0..1 to 0..n relationsh...
stackexchange/codereview
I have a html list: <div id="UInav"> <ul id="UInavList"> <li>My Activity</li> <li>My Tests</li> <li>Messaging</li> <li>Search</li> </ul> </div> I want to get rid of the bullets and place it snug against the side of the page. How would I do this? I added this CSS, but it only rem...
stackexchange/codereview
table = emp SAL ------ 8000 7000 6000 5000 10000 9000 4000 8000 7000 For the above table, write a SELECT statement to display the Largest and Second largest Sals. Your output should be as below:- first second ------- -------- 10000 9000 i wrote following query but i got fol...
stackexchange/codereview
I have a Windows::Forms application and I want to add a custom control to it (which basically displays some images and links them with some bezier curves I'm drawing). I'm sure I've managed to get Windows Forms designer to display the custom controls in the same project before but I can't get it to work this time. It j...
stackexchange/codereview
Visible='<%# ((Eval('<%# Eval("IsDefault")%>'))="True" ? Eval("False") : Eval("True") )%>'>>
stackexchange/codereview
I am writing a Python function to change the extension of a list of files into another extension, like txt into rar, that's just an idle example. But I'm getting an error. The code is: import os def dTask(): #Get a file name list file_list = os.listdir('C:\Users\B\Desktop\sil\sil2') #Change the extensions ...
stackexchange/codereview
I am developing an Android frontend to a web application using its API. This Android application will expose some extra features if the user is a 'pro'. Therefore I need the Android app to acquire the information whether an account is pro. That is done while getting the token. In other words, when the Android applicati...
stackexchange/codereview
Lets say i got an webview with my website for example. can i add like a watermark(textView this case) on top of the webview? Is this possible to add a component on top of another without having that black space if you try to offset the text. Need an transparent background and place the object on top of the other one th...
stackexchange/codereview
I need to be able to use commands like find. Something similar to this. But archive each exe file in its own tar.gz archive. So for example win.exe will become win.tar.gz and file.exe will become file.tar.gz. find folder_name -name "*.exe" -type f -print -exec tar -zcvf temp.tar.gz '{}' \; Thank you.
stackexchange/codereview
anyone successfully compiled three20 under XCode 4? I tried, and changed all Base SDK to latest 4.2, but there is alway a error: error: There is no SDK with the name or path '..../three20/src/Three20Core/iphoneos4.0' in Three20UICommon and its Unit tests. Anyone has a clue about this? Also, in Xcode 3, I know I can let...
stackexchange/codereview
I'm trying to figure out how to reuse Domain Models in different parts of the application and I have a feeling that the Data Mapper pattern is the way forward. The example below has methods that directly access the methods of the Mapper. class Groups { protected $_groups = array(); public function addGroup($na...
stackexchange/codereview
I'm working on a JavaScript driven site where I will have a lot of stuff that need's to be executed in a certain order. A lot of the stuff involves animations and AJAX-loading. Some pseudo code could look like this: Load JSON formated data Generate HTML-elements using the loaded JSON data and render them inside a div ...
stackexchange/codereview
Using Monotouch, or Objective-C, how do I tell how much RAM is left on an iPad?
stackexchange/codereview
The situation: I have a datagridview with one column (col1). In the datagrid definition (design view), i have created this row, and set the formatting to C2 (or C0, or C - I tried them all). then, I load my datagrid view programmatically : dbl_myValue as double dbl_myValue = 6.99 datagridview1.item(0,0) = dbl_myVa...
stackexchange/codereview
I know the old school method for clearing floats is a class for clear:both, and that it has generally been outmoded. I know the new school method is width:100%; overflow:auto or hidden; But when I've got contents that dynamically expand beyond the boundaries of the parent container I can't use the new school method. In...
stackexchange/codereview
i have to develop a distributed system that consists in having a chat session by TCP sockets with someone from it's IP address, connected to a server that lists all ips connected for the last 3 minutes to it. alongside with this main feature the app must make requests to every ip to get their name and current state, ac...
stackexchange/codereview
Ok, I'm trying to wrap my head around IO in Haskell, and I figured I'd write a short little app dealing with web pages to do it. The snippet I'm getting tripped up at is (with apologies to bobince, though to be fair, I'm not trying to parse HTML here, just extract one or two values): titleFromUrl url = do (_, page)...
stackexchange/codereview
What would be the fastest way to check if a string contains any matches in a string array in C#? I can do it using a loop, but I think that would be too slow.
stackexchange/codereview
I've made some changes to a specific file in a repository, and committed those changes. All under one commit. In that one commit, I also made changes to several other files. How do I unstage the changes I made to that one specific file and not all of the files that were changed in the commit?
stackexchange/codereview
I have a small function that will take a string of css (eg background: red; width: 145px; height: 145px;) and return a CSSStyleDeclaration but if I have a background property (and background-color etc) theCSSStyleDeclaration will have background-color etc set as undefined in Firefox. _parseCSS: function(css) { var di...
stackexchange/codereview
I have a file that contains the output of a file compare thats written to a text file: Comparing files C:\LOGS\old.txt and C:\LOGS\NEW.TXT ***** C:\LOGS\old.txt ***** C:\LOGS\NEW.TXT folder_thats_different ***** I need to pull out the next to last line "folder_thats_different" and put in a new string: folder contains a...
stackexchange/codereview
I have a member search function where you can give parts of names and the return should be all members having at least one of username, firstname or lastname matching that input. The problem here is that some names have 'weird' characters like the é in Renée and the user doesn't wanna type the weird character but the n...
stackexchange/codereview
How do I set my Linux eclipse version to have the same font as the default one on the windows version? What is the font and how do I change it?
stackexchange/codereview
I am using Kohana3. Before redirecting page to the new URL, I want to perform some processing. I tried to use after method of the controller class, but after method of Controller does not execute if request is redirected. Also I tried to use register_shutdown_function, but still its not called when request redirects to...
stackexchange/codereview
I've recently been using Steve Sanderson's knockout js library http://knockoutjs.com/ in my client side web development. I just recently found out that microsoft has contributed code to jQuery for a Data Link plugin that seems to duplicate what I like about knockout. http://weblogs.asp.net/scottgu/archive/2010/10/04/...
stackexchange/codereview
I need to put an image in my page. I want to disable dragging of that image. I am trying lot of things but no help. Can somebody help me out ? I don't want to keep that image as a background-image because I am resizing the image.
stackexchange/codereview
I am planning to do GPS location on iPhone. Can you tell me the information regarding GPS (delegates,methods etc).
stackexchange/codereview
I've done a chunk of work to retrieve some data from a web service but now have the problem of scheduling requests to it and I'm not really sure where to begin. I listen to a jms queue for events and upon receipt of an event I need to make a request to the web service after a duration. The duration varies depending on ...
stackexchange/codereview
It seems the lightbox works now. But the problem is: right on the top of the site, there is a straight line and then with "x" and a round circle as if it's trying to open. Here is the attachment: http://s197.photobucket.com/albums/aa253/tintingerri/Test/?action=view&current=error.png Another thing this lightbox doesn'...
stackexchange/codereview
I am trying to figure out how to persist the playing of a Silverlight MediaElement playing within a Silverlight User Control embedded in an ASP.NET during postback. The scenario goes: Have a media player on a site, press play, continue navigating through site while the music continues playing. What it does right now: O...
stackexchange/codereview
i want to convert the PDF to image.But when the out put image generate it's get blur from original.Here is code $uploadfile = ".pdf[53]"; $img = new Imagick($uploadfile); $img->setResolution(300,300); $img->resampleImage(150,150,imagick::FILTER_UNDEFINED,1); $img->resizeImage(512,700,Imagick::FILTER_LANCZOS,0); $img->s...
stackexchange/codereview
In the code below. If the timout value is 0 (newSocket(Address, 7010, 0); The wait time is "Total Time in MilliSeconds =1024" If the timout value is 1 (newSocket(Address, 7010, 1); The wait time is "Total Time in MilliSeconds =22" Is there any default OS settings (Windows) which can reduce the waiting time for the...
stackexchange/codereview
The table consists of columns calling_party and called_party and the record describes the connection between two users where one plays a role of calling party and the other is called party. The same two users can have two connections - in this case the roles calling/called party are switched when the direction is chang...
stackexchange/codereview
I have tried a lot, but can't seem to get it to work. I was told to use EDT with the following example. SwingUtilities.invokeLater(new Runnable() { public void run() { // Modify the GUI here } }); I have read on this topic a lot and still don't understand. I get what a thread is, but t...
stackexchange/codereview
Does hibernate preserve the order of a LinkedHashSet and if so, how? In case this depends on the type of database, I'd like to know this for PostgreSQL. Background: I know what a LinkedHashSet is for, and the reason I'm asking this is because I'm logging the names of some functions I execute to a 'logError' table that ...
stackexchange/codereview
Is it acceptable keep logic in view templates (in MVC terms and Rails specifically)? Is there any way to avoid something like this? <% if current_user %> Welcome, <%= current_user.name %>. <%= link_to "Sign Out", signout_path %> <% else %> <%= link_to "Sign in with Twitter", "/auth/twitter" %> <% end %> Or am I ...
stackexchange/codereview