instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Are the files accessible from an SDK API call?
stackexchange/codereview
Here's an example (an alert box will pop up with the results). Run this in Firefox then Chrome and/or Safari http://jsfiddle.net/QeaVM/ Notice how FF correctly includes the left and right margins in the calculation of outerWidth. Notice how Safari/Chrome incorrectly state that the outerWidth of #Container is equal to t...
stackexchange/codereview
I'm starting a facebook app using iframe method. I am using flex and so far I am able to connect to fb (login and out). Now I am trying to retrieve current logged in user name. In the document I see this function is what I need. Facebook.getSession(). A tutorial in adobe site uses desktop api and it works for desktop (...
stackexchange/codereview
I would like to know how I can achieve the following using the nginx rewrite module, I do not have much experience with regex. I would like to redirect a URL from www.example.com/foo/1/bar/2/ rewrite to: www.example.com:9000/foo/1/bar/2/ thanks
stackexchange/codereview
I want to split this string and put the values in to my tables of database.I am thinking of using string tokenizer class or some other way. please let me the best method and how to implement it practically with code.
stackexchange/codereview
I am trying to publish some artifacts to the maven central repo and since the current version of gradle (0.9-rc2) does not handle pgp I thought I would give it a try by 'porting' the ant xml version while waiting for gradle 1.0 which hopefully will support it out of the box. I wrote the following in gradle: def mvn = ...
stackexchange/codereview
So I've started tackling Javascript and jQuery, and I've put together an event handler for certain link's 'click' events; it takes the href and pulls the content from the appropriate '#container' and loads it into the target container... <script type="text/javascript"> $(function(){ $('#journeyNav ...
stackexchange/codereview
I was wondering if anyone had any pointers for parsing json data consumed from a URL in Asp.Net. I've found plenty of docs about Model Binding json datatypes but this is coming from a URL and I cant seem to find an example for that. The closest thing I've found is datacontractjsonserializer but again, I cant seem to ...
stackexchange/codereview
I read that git-walk next / git-walk prev will allow you to move through changesets committed linearly so that you can play them back in a presentational setting within your local working copy. Does hg have any equivalent commands? (And of course I don't mean the typical -r arguments selecting revisions, I mean moving ...
stackexchange/codereview
In my Android app, I have a Bitmap object and an int[]. One algorithm in my app copies the Bitmap pixel values to the int[] and then modifies the values in the latter. I want to save the contents of the raw int[] to disk as quickly as possible. What is a fast and memory efficient way to do this? (i.e. calling a .writeI...
stackexchange/codereview
I'm trying to do a high school project, where i want to create a remote control car with mecanum wheels using matlab. Would anyone know if this is possible and how it is done? I have ordered matlab now and it being shipped, therefore i can mess around with it soon.
stackexchange/codereview
in java we have this name space "javax.persistence". this namespace allows you to create a data base when you running your application with no necessary to open sqlserver and create a database and table in it it created automatically. is there a name Space in vb.net works the same as "javax.persistence" or not? if yes ...
stackexchange/codereview
groupon.com is a great example when you register they take your credit card information. once a limited amount of people have purchased a coupon a mass amount of credit cards get charged. what is the best method of doing something like this and at the most safest possible way? one thing that i will be doing is encrypt...
stackexchange/codereview
I would like to use javascript (JQuery) to ask the server for XFBML code via ajax. The XFBML code will then attached to the DOM. Here it is the php code: echo " <fb:serverFbml> <script type=text/fbml'> <fb:fbml> <fb:request-form action='http://myserver.com/invited.php' method='po...
stackexchange/codereview
I noticed that the event type is just an arbitrary string in seam which will be used in component.xml or annotations. Sometimes it is error-prone if I missspell them, for example "org.jboss.seam.security.notLogedIn", actually it should be "org.jboss.seam.security.notLoggedIn". Is there any alternative way to handle eve...
stackexchange/codereview
I have an OpenGL based game for the Mac. Mac OS X 10.5 compatibility required, going back to pretty much any Mac that can reasonably handle Leopard, going back to G4 Powerbooks. I'm building my sprite sheets/texture atlases, for feeding to OpenGL, and need to set a maximum texture size. Q. What's the maximum texture si...
stackexchange/codereview
I am new to web programming and am having a problem calling a JavaScript function on a form button click. Instead of calling the function and executing the alert() it will reload the page, and reset the data that was entered into the text boxes. I am sure this is a simple error, but I am having trouble figuring this on...
stackexchange/codereview
I recently had a problem to escape value returned by a yield in a template. In my layout, i yield the meta description so that i can define it from my template <meta name="description" content="<%= yield :html_description %>" /> And here is my template, that unfortunatly, does not escape the value as expected: <% cont...
stackexchange/codereview
I know there is no way to block or ignore ctrl+Alt+Del within a program. But thats not what I want. Is there a way to only be notified if it WAS pressed? No interaction required, only notification. Thank you!
stackexchange/codereview
i am using below code try { Class.forName("org.gjt.mm.mysql.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdb","root","root"); // cust is the DSN Name } catch (Exception e) { System.out.println("Exception "+e); } got this exception duri...
stackexchange/codereview
i have a problem with a drop-box that isn't populated correctly. echo"<td>Selectati numarul de telefon:</td> <td><select name='mobil'> <option value='--'>---</option>"; while($apelantRow = mysql_fetch_assoc($apelantResult)) { $apel=(string)$apelantRow['nrtel']; echo "<option value='".$apel."'>$apel</option>"; ...
stackexchange/codereview
Do any browsers support the HTML5 context menu attribute?
stackexchange/codereview
Is it possible to remove a string (see example below) from a PHP array without knowing the index? Example: array = array("string1", "string2", "string3", "string4", "string5"); I need to remove string3.
stackexchange/codereview
I am trying to come up with a way of developing a folder / library program for my my music collection that will display my music in order and also have the name / image under the song. This will be a desktop program on my Windows system. I am doing this for college and not sure exactly which languages to use. I have be...
stackexchange/codereview
#include <math.h> #include <stdio.h> int main(void) { double x = 4.0, result; result = sqrt(x); printf("The square root of %lf is %lfn", x, result); return 0; } This code does not work because it is taking the square root of a variable. If you change the sqrt(x), to sqrt(20.0), the code work...
stackexchange/codereview
Im using Facebook's SDK for my site so users can login with their FB account. The problem is that if they are logged into FB and go to my site, the get auto logged in(only if they have accepted to use it on my site.) Is it possible to make it so they have to press the login button if they want to login?
stackexchange/codereview
I have a large JSON object that I created with Python, and I'm needing to display the information on a webpage now. My problem is the size of it; there are nested arrays and objects within, and it is several layers deep at points. I wrote an extremely inelegant (and buggy) JavaScript function to pull the data out, but ...
stackexchange/codereview
What is the way to use Sql Server's table hints like "NOLOCK" while using LINQ? For example I can write "SELECT * from employee(NOLOCK)" in SQL. How can we write the same using LINQ?
stackexchange/codereview
I've got a std::set<int> which has n items in it. And I want to get rid of n-k bigger elements and keep the first (least) k elements. How should I do so? Is there a pre-defined function for this?
stackexchange/codereview
I'm using the 960.gs frameowrk and http://www.cssstickyfooter.com and want to have a separate back ground colour for the main content div. This div won't stretch the background to the bottom of the page. HTML: <div id="wrapper"> <div id="content" class="container_12"> <div class="grid_12" id="hea...
stackexchange/codereview
I'm trying to write a Servlet in eclipse configured to use Tomcat 5.5 and I get the following error when I try to run it: Several ports (8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start...
stackexchange/codereview
I am using the Boost library under c++ to parse a load of text. I seem to be having a problem with this string text text text Seat 6: player_name (11,111) text text text I am trying to match on the middle bit, the seat number can be anything between 1 and 9, the player_name can be any character a-zA-Z and include num...
stackexchange/codereview
I am currently attempting to run a rather CPU intensive application for a research project on a computer running OSX 10.4. There is no way that even a fast MacPro could handle this amount of processing. I'm fairly new to the concept of distributed processing, but it seems to me that I have two options: 1) try to set up...
stackexchange/codereview
Using Rails3 and Ruby 1.9.2, I am new, just learning Ruby/Rails-- When I run irb I end up with irb(main):001:0> which is fine. However when I run rails console I also end up with irb(main):001:0> and I thought, based on the book I'm reading and online tutorials that I should be seeing >>. Is the Rails Console I'm think...
stackexchange/codereview
I just started to document a rails application. I know this is actually done by rdoc, so I followed some rdoc guides regarding syntax and so on, but I got stuck when I tried to describe attributes of models, validations and the relationship between models, mostly because these things are part of ActiveRecord. So I wond...
stackexchange/codereview
I am writing a PHP script that imports a csv and inserts into a table but i need to get the first row so i can have the field names..here is my csv id artist song 11 NewBee great stuff 10 anotherNewbee even better 6 NewArtist New song As you can see the first row is the n...
stackexchange/codereview
I am attempting to process a plain text file. It is basically an index of names and associated number fields formatted like so: Nowosielski, Matthew, 484, 584, 777 Nowosielski, Matthew, 1151 Nunes, Paulino, 116 Nussbaum, Mike, 1221, 444, Nussbaum, Mike, 156 Which I would like to process into this Nowosielski...
stackexchange/codereview
Preface: I taught myself how to use Django a couple of years ago, developed a webapp, handed the keys to my clients, and haven't had to do much with the app since then, nor have I developed with Django since then. The Problem A lot of users cannot log in successfully, and this appears to be a persistent problem for tho...
stackexchange/codereview
If you are in a 3rd nested loop in PHP, you can do break 3; and break all loops up 3 levels. break seems to work in C. But if I do break 3 I get a syntax error. I guess it doesn't support it. What is the best way to break multiple loops? Should I set a flag which is checked up the loops - and breaks if it is set? Is th...
stackexchange/codereview
I want my JS to load certain information that needs to come from the server. Examples would be URLs, language specific messages, etc. What is the best way to get this information from the server to the JS? Right now, I have such values stored in an actual JS file. I don't like this approach because information is dupli...
stackexchange/codereview
How can I move a song that's in a playlist to a different position within the list with an AppleScript command? I already have the song and the playlist, and the one is already in the other; I need only to change the position. My goal is to sort the tracks that the user has selected; ideally, I'd want to move the first...
stackexchange/codereview
How can I call the Sub on the content page? On the content page, there is let's say this: Public Sub MySub() End Sub On the master page I have this: Dim cph As ContentPlaceHolder = CType(Page.Form.FindControl("ContentPlaceHolder1"), ContentPlaceHolder)
stackexchange/codereview
I have map in m android app but it doesn't work well. I spent last two hours looking in code line by line but I don't know what is the problem. I done all like in tutorial http://mobiforge.com/developing/story/using-google-maps-android. I set in manifest uses google maps. Map shows marker, doesn't show map ( instead in...
stackexchange/codereview
I open my Firefox extension window in a browser's tab. Is it possible to set a favicon for that tab?
stackexchange/codereview
Is there a quick way to find out when last change took place in some table? EDIT: I realize that i can add a column which will hold a change date, but i am wondering if there is some kind of metadata that can be accessed by EF. My db is hosted on SQL Server 2008.
stackexchange/codereview
I'm trying to remove any currency symbol from a string value. using System; using System.Windows.Forms; using System.Text.RegularExpressions; namespace WindowsFormsApplication1 { public partial class Form1 : Form { string pattern = @"(\p{Sc})?"; public Form1() { InitializeCo...
stackexchange/codereview
On the UISearchBar, there's an X element that allows you to clear all of the contents at once. Is there a way to get notified when this happens? UISearchBarDelegate::searchBarCancelButtonClicked is fired only when the "Cancel" button is tapped.
stackexchange/codereview
Hey all, for a few of my college assignments I've found the need to check neighbouring cells in 2-dimensional arrays (grids). The solution I've used is a bit of a hack using exceptions, and I'm looking for a way to clean it up without having loads of if statements like some of my classmates. My current solution is for ...
stackexchange/codereview
I'm using a virtualized treeview in WPF to display a 3 level deep hierarchy with a larger number of child nodes (5000+). <TreeView Grid.Row="0" Grid.Column="0" Name="TestTree" ItemsSource="{Binding}" VirtualizingStackPanel.IsVirtualizing="True"> ... </TreeView> What happens is that if I expand the child nodes on the ...
stackexchange/codereview
How do I display a simple popup for text entry on iPad. I want a small popup to display in the middle of the screen with one line for text entry and two buttons. A UIPopover doesn't seem appropriate as there is nothing the popover would point to. UIActionSheets don't allow for text entry. A Modal view is too large ...
stackexchange/codereview
To preface my question, couple things to note. I don't want to store said file on the sdcard in this case. The file also cannot be storage directly in the apps local files directory. It needs to be in a subdirectory, so it cannot write the file using openFileOutput() and MODE_WORLD_READABLE. The app may download fil...
stackexchange/codereview
I have done this many times but can't remember the syntax for the life of me and am obviously asking Google the wrong questions. If I have an MXML file like this (MyExample.mxml): <s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe...
stackexchange/codereview
How can I set the RoR model's property (database column) to default for a column do generate a GUID in mysql? Does the column have to be a unique identitifier or can I have it be a string of length 36 also?
stackexchange/codereview
While part way through entering a new record(child), that is incomplete and can't be saved, I want to be able to add a record to another model(parent) and then use it to complete the original record(child). The parent has many required attributes, not just a single field. I want to do it in as dry a way as possible usi...
stackexchange/codereview
I after some ajax stuff I put some number into input field ,and when I try to get that field to paste it in uploadify as script data, it paste empty string, but if I type same value in input field and that try to paste field in uploadify as script data, than works normally. How to make some live event, or something, t...
stackexchange/codereview
i'm using Elcipse+PyDev and Pyscripter sometimes for Python 2.7 Yesterday i installed PyTables from compiled binaries and : import tables h5f = tables.openFile(r'D:\sample.h5','w') h5f.createGroup('/','Box') h5f. So, when I type "h5f." IDE don't show me all the methods, only a few! Can't do anything with It, installed...
stackexchange/codereview
I am trying to create a board game in Java however i am pretty new to GUI's. The problem is that the coloured panels are being added to the grid layout and so are the images so they end up being packed side by side. I would like the images to be on top of the other color panels so it looks like a board with pieces (the...
stackexchange/codereview
I'm getting this message each time I activate my plugin: The plugin generated 80 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. The only way I was able to suppress the message ...
stackexchange/codereview
I have a dll that is loaded and file-locked by a process, and I would like to update it with a newer version. I'm looking for an alternative to terminating the process to release the file lock before updating the dll. It is okay that the existing live processes still uses the old version, as long as newly instantiated ...
stackexchange/codereview
I need to connect to a MS SQLServer 2008 service from PHP on Ubuntu, and I would like to do so using PDO. I believe I have installed all the prerequisite libraries, and I am indeed able to connect using tsql on the command line and using mssql_connect() in code. I can't figure out what the proper DSN is, or if there ar...
stackexchange/codereview
I'd like to study how headers are sent and received. I know about PHP's header function and think I can just look at an actual request header (e.g. using Firebug) and make identical requests to a server (including spoofing the User-Agent). Is this correct? The other problem is how do I get the header responses back? I ...
stackexchange/codereview
I have an ASP.NET site which uses a 3rd party activeX control. I have to pass a few parameters to the OBJECT tag in the HTML page. If i hardcode these parameters into the HTML everything works. I would like to place the parameters in my web.config with app settings "key/value" pairs. My problem is i cannot read the ap...
stackexchange/codereview
I am doing preliminary design of an iPhone app and I'm trying to find the answer to the following question: Does the MFI system allow an external accessory to restrict which particular iPhones are plugged into it? I presume that I can add something to the external accessory protocol to do authentication/authorization. ...
stackexchange/codereview
I have a problem to solve using FSTs. Basically, I'll make a morphological parser, and in this moment i have to work with large transducers. The performance is The Big issue here. Recently, i worked in c++ in other projects where the performance matters, but now, i'am considering java, because the java's benefits and ...
stackexchange/codereview
I'm currently using Selenium RC with Test::More & Test::WWW::Selenium to conduct GUI testing of a web app. Are there any similiar tools/Perl modules that I can use to test flex/flash components? Thanks.
stackexchange/codereview
I'm looking for a simple way to provide a tutorial for my app. I want the tutorial to show something on screen and be moved to the next screen as they move through the tutorial. Any ideas?
stackexchange/codereview
I'm searching for a functionality in NHibernate to add or remove user accounts of the current database. Is there a built-in function? Or do I have to make it manually for each database? Thank you very much, Mark
stackexchange/codereview
I have the procedure block: begin for i in (select grantee ,table_name ,privilege from user_tab_privs_made where grantee='TEST') loop revoke i.privilege on i.table_name from i.grantee; end loop; end; and the error occurs:
stackexchange/codereview
I'm programming in Qt Creator and encountered a problem. I made a singleton class, and I'm trying to connect it to a slot in the widget, but it doesn't take the pointer that returns from Singleton::getInstance() as the same instance that emits the signal. My code is as follows: class Widget : public QWidget { ...
stackexchange/codereview
I am working on a time series based calculation. Each iteration of the calculation is independent. Could anyone share some tips / online primers on using utilising parallel processing in Matlab? How can this be specified inside the actual code?
stackexchange/codereview
I am trying to implement the RSA algorithm, but for some reason my code below doesn't produce correct results (note that only the relevant code is shown). BigInteger n = p.multiply(q); BigInteger totient = (p.subtract(BigInteger.ONE)).multiply(q.subtract(BigInteger.ONE)); Random rand = new Random(); BigInteger e; do {...
stackexchange/codereview
When I update the bean: <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="cache" value="true"/> <property name="prefix" value=""/> <property name="suffix" value=".vm"/> <property name="toolboxConfigLocation" value="tools.xml" /> </bean> With the...
stackexchange/codereview
I'm using a custom LinkedList class that goes like this: public class LinkedList { // Get and Set methods are NOT necessary! private LinkedList next; private final String word; public LinkedList(String word, LinkedList next) { this.word = word; this.next = next; } Now my task ...
stackexchange/codereview
Marcus here. I have encounter a problem which i have difficulties in solving. Apparently, i have an example of the coding of windows 7 phone connecting to dotnetzonereader. Well i tried changing the url address to www.google.com but it is unable to do so. Over here I'm not referring to the internet explorer in windows ...
stackexchange/codereview
code as following: const CRSAPublicKey& iRSAPublicKey = mRSAKeyPair->PublicKey(); const TInteger& e = iRSAPublicKey.E(); HBufC8* exponent8 = e.BufferLC(); //failed to get the right result,it's garbled TInt ei = e.ConvertToLongL(); //converted successfully,ei=65537 can anyone tell me why BufferLC() doesn't work?is s...
stackexchange/codereview
I have tried with Keyboard.Sendkeys(“{BACKSPACE}”); but it didn’t work.
stackexchange/codereview
I have an xml file <RTT> <AgencyList> <agency Name="Bart" Ditection="Outbound"> <RouteList> <Route Name="Fremont" Direction="test"> <Stop ID="25" Name="BayFare"/> </Route> <Route Name="SFO" Direction="Test"/> <Ro...
stackexchange/codereview
I have an integer which I want to convert to class Date. I assume I first need to convert it to a string, but how? My attempt: v <- 20081101 date <- as.Date(v, format("%Y%m%d")) Error in charToDate(x) : character string is not in a standard unambiguous format Using paste() works, but is that really the correct wa...
stackexchange/codereview
I am looking for a toolkit/library that will allow me to extract phonemes from audio files. I see on the CMU Sphinx website that sphinx3 can be used to output phonemes, however I haven't been able to successfully build it on my windows box. Apart from the library, what is the best way to go about building your own?
stackexchange/codereview
What are the efficient algorithms for finding a vertex tour in a weighted undirected graph with maximum cost if we need to start from a particular vertex?
stackexchange/codereview
Okay, these are the errors I can't backtrace at all. So I was hoping you had any idea. When I recently rebooted my server (The server is a home computer, and just runs Windows 7 as a development machine) with Sharepoint 2010, a whole list of problems occurred. The major error was that when I deployed my Visual Studio 2...
stackexchange/codereview
Working through Expert F# and it uses some examples that use Async.BuildPrimitive and Async.Spawn however they are undefined. I am using .NET 4.0.
stackexchange/codereview
In virtumart 1.1.5 i need paypal pro payment method .there is any option for configure PayPal pro payment method?and what pay pal sandbox details needed PayPal pro payment method.
stackexchange/codereview
I want to check the change of html hidden field using jquery and i tried for this but the change event did not worked. Somebody has and idea how to handle this?
stackexchange/codereview
Can you please explain me the inotify mechanism? I’ve searched in the web about it, but what I understood is that if I want to see the changes in a file I have to do polling with the “read” function. Is there any callback function which will notify me when the file has a change without polling? Thanks,
stackexchange/codereview
I am wondering if it is possible to prevent YQL from URL encoding a key for a datatable? Example: The current guardian API works with IDs like this: item_id = "environment/2010/oct/29/biodiversity-talks-ministers-nagoya-strategy" The problem with these IDs is that they contain slashes (/) and these characters should n...
stackexchange/codereview
I'm new to iPhone development. Just wondering what the difference is between the MPMoviePlayerController and the MPMoviePlayerViewController. Also, more generally, what is the difference between a controller and a view controller? I know that you use a controller to construct a view (as with MPMoviePlayerController.vie...
stackexchange/codereview
I am working on the acts_as_taggable_on plugin, but there is something I can't really understand (even if it is just a very simple code line). puts "before: " + cache.inspect # cache.delete_if { |key, value| key.id == owner.id && key.class == owner.class } # original code line cache.delete_if { |key, value| true } # m...
stackexchange/codereview
I am trying to write a unit test for handling a file upload controller using Spring 3. Now if I send the image over to my service method through the controller everything works fine. But when doing a straight unit tests I am getting a null pointer exception. It appears that the property "dfos" inside the DiskFilteItem...
stackexchange/codereview
I'm currently having a really long list of university names that are not sorted in alphabetical order. What the user needs to do is quickly find the university's name he/she wants, however the user may or may not know the specific university name, it is requested that the user type one or two keywords and the required ...
stackexchange/codereview
The following works s = select([tsr.c.kod]).where(tsr.c.rr=='10').group_by(tsr.c.kod) and this does not: s = select([tsr.c.kod, tsr.c.rr, any fields]).where(tsr.c.rr=='10').group_by(tsr.c.kod) Why? thx.
stackexchange/codereview
The Windows Internal book 5th edition has the following comment in page 360. The stack size for the initial thread is taken from the image—there’s no way to specify another size. I understand that for Windows OS, each thread is given 4K or 16K (depending on system) stack, and the size is fixed. Then how about the s...
stackexchange/codereview
I want to take the path of the local directory and put each directory on the path in a different line. I've tried to do it using cut: pwd | cut -f 1- -d\/ --output-delimiter=\n but it doesn't change the '/'s into EOL, but puts n's instead. What am I doing wrong?
stackexchange/codereview
Both "netstat -p" and "lsof -n -i -P" seems to readlinking all processes fd's, like stat /proc/*/fd/*. How to do it more efficiently? My program wants to know what process is connecting to it. Traversing all processes again and again seems too ineffective. Ways suggesting iptables things or kernel patches are welcome t...
stackexchange/codereview
My ASP.NET MVC web application is supposed to calculate the roots of a second-degree polynomial (quadratic) but I'm erroneously getting Nan responses. I believe this is due to my improper setup, so let me post some of my code here: View: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inher...
stackexchange/codereview
I'm working on a API-Server with Rails 3 wich is pretty handy so far but I'm running across a error all the time and I'm not sure wether it is because of my Apache Setup or the Rails App. When I try to do a HTTP DELETE or PUT request on http://sample.domain/uri/id via XHR, curl or HTTP-Client.app Rails or Apache respon...
stackexchange/codereview
I just installed GIT in my CentOS Linux server and configured it. When I create a new repository using git init it works fine and gives output of the command also. But whenever I try to clone the remote repository into my local computer folder it gives the following message: fatal: '/public_html/repositories/git-test/...
stackexchange/codereview
How could I allow a string to match alphanumeric characters and a comma character And have the input be a minimum of 6 and 50 max; Now, it matches nothing, with or without the comma in it? test = "dam, Amsterdam"; if( test.match(/^\w{6,50}\,$/) ){ thanks, Richard
stackexchange/codereview
I'm having some weird problems with NSHTTPCookieStorage in my iPhone app. When I invoke the login action on my web service, the service sends back an auth cookie named "auth" as well as some other cookies. When I log the user out, I call a logout action on the server which removes the cookies. If I print the result o...
stackexchange/codereview
I need to add a getlocal method to DateTime in Ruby 1.9.2, as per the suggestion on this page. How do I do this? Thanks for reading
stackexchange/codereview