instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Hey, so I have a recipient field in my form you can type a user´s fullname in, example "john derek". Now i have exploded this into $firstname and $lastname list($firstname, $lastname) = array_map('ucfirst', explode(' ', $recipient, 2)); How can i check in the database if there's any full match, take the id. table use...
stackexchange/codereview
I have a thread in PyGTK, inside my mainloop. It's a Timer, so it needed to be joined with .join(). The problem is, I now cannot edit my UI from in that thread - change text and so on - because of the .join(). Is there a way I can change things from outside (well, you know what I mean) the mainloop? Thanks.
stackexchange/codereview
Which one should I use to record update made by users? SYSTEM_USER, or ORIGINAL_LOGIN(), or SUSER_SNAME()
stackexchange/codereview
So getting into the new millenia I rewrote my c++ code with: int main(int argc, wchar_t **argv) If built with either Unicode or MBCS options then when the app is run with a commandline arg, either directly or by dbl-click the filenames passed to argv[] are unreadable = in some mixture of chinese fonts. Thanks for the ...
stackexchange/codereview
Hey guys, I've tried asking this at the wordpress forums, but I'm not getting much useful assistance... I've recently built a site for someone, which I'm currently testing (http://www.audaciousdreaming.com/test/), and I'm having a bit of an issue with Safari. Basically, as can be seen on the site, the drop down menu l...
stackexchange/codereview
I have migrated a project from CVS to SVN. Now I need to rename that project. What can be the best possible way to rename it, keeping the all the history intact. The project folder contains some 100 numbers of C and its header files.
stackexchange/codereview
I have a doubt. I need to get the data from the sever twice every time when I load a page, one to render the HTML and another one to get the data for client side (javascript). So I don't know exactly what it's the best way and fastest. I was trying to implement a session object and store the data once using joinedload ...
stackexchange/codereview
How do I redirect a program to connect to a different URL. I looked at this post: Is it possible to redirect a url to another using a webproxy ( such as fiddler ) I installed fidller on the machine and put this code in the custom rules in the onBeforeResponse method oSession.utilDecodeResponse(); var oBody...
stackexchange/codereview
<%@ tag language="java" pageEncoding="utf-8" isELIgnored="false" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ tag import="com.ocpsoft.pretty.time.PrettyTime...
stackexchange/codereview
(hmm.. long title) If I start out with an NSArray of custom objects (each object is a Person) like this: { surname:Allen forename: Woody, surname:Baxter forename: Stanley, surname:Clay forename: Cassius } ..etc.. You can see that the array is already in surname order. How do I use that array to create a a ...
stackexchange/codereview
how do i unset this option from a input? im using ajax to populate this field and after that i need to show it thanks
stackexchange/codereview
THE SITUATION: I have code in lib/foo/bar.rb with a simple method defined as such: module Foo class Bar def test "FooBar" end end end In my helper, FooBarHelper, I have: require `lib/foo/bar` module FooBarHelper def test_foo_bar fb = Foo::Bar.new fb.test end end In my view, I call this ...
stackexchange/codereview
I'm trying to set up a .flv file that will have buttons for two different pieces of sound. I've been able to get the first piece to load and to play and stop, but when I try to load the second piece, I trip up. I'm still a novice, but do think I understand the basic problem -- Actionscript can't distinguish between one...
stackexchange/codereview
My application downloads images from the web and encloses them in custom Image objects. Using my Image class I can extract particular data from the images. That data is eventually presented to the user. With the model-view-controller paradigm in mind, can my Image class be considered a model class or a view class?
stackexchange/codereview
Is there a way to call setContentView(id) multiple times with different id during one Activity to render different views or do I absolutely have to start a new Activity?
stackexchange/codereview
I'm looking for the best C or C++ code to encode and decode decimal latitude and longitude values from/to double/char. I'd prefer the code convert from double to char[] and vice-versa rather than c++ strings. If you have a code snippet that would be great too. To clarify: I need to convert from a string Degrees/Minute...
stackexchange/codereview
I was wondering was is the recomended procedure to do an sql backup and restore (respecting utf data integrity) from the console. The reason I am asking is because I am currently using a PHP script to do it, but I have problems during the restore with values that should be null but are restored as 0 and they break my f...
stackexchange/codereview
Windows XP/Vista/7 System Properties Advanced tab Settings... button under Performance Advanced tab Change... button The numbers at the bottom of that window in the "Total paging file size for all drives" section Anybody know how I would go about getting those three numbers from within a C++ program? Thanks!
stackexchange/codereview
Consider the following code: def localize(value, localize=None): # do something with the localize argument The localize variable contains information whether the global localization setting should be respected or not. It is called by the same name through three layers of code. What's the lesser evil, shadow the ...
stackexchange/codereview
This has got me for some reason the code below is translating the currency variable to a string and then not getting the actual value from the self named variable... $("#quantity").change(function() { var euroPrice = new Array("12.95", "14.95", "18.95", "21.95"); var gbpPrice = new Array("10.95", "11.95", "16.9...
stackexchange/codereview
I have model form and I need to have one of the fields be read only until after it's saved. I haven't figured out a good way to do this, and below is what I have in my admin.py. class RequestForm(forms.ModelForm): trac = forms.URLField(min_length=400, required=False) impacted_users = forms.ModelMultipleChoiceF...
stackexchange/codereview
I have been creating a custom username/password validator for a WCF service and ran across the configuration item customUserNamePasswordValidatorType. I've been able to make my code work by following examples, but I just don't understand what is going on. Unfortunately, the MSDN article doesn't provide much detail. T...
stackexchange/codereview
Given the following rows of course,section,grade,count of grades within course section: course SECTION grade gradeCount ----------------------------------- 1301 001 C 3 1301 001 C+ 3 1301 001 C- 4 1301 001 D 5 1301 001 D+ 3 1301 001 D- 2 1301 ...
stackexchange/codereview
Long story short, I have a git repo with several branches, and I would like to move it to an SVN repo while maintaining all of the branches and commit history. So far I have not had much luck, most of the methods I have found do not migrate the branches as I would expect. (they are combined, or ignored, or eaten by a g...
stackexchange/codereview
I've got a quick and dirty little make file that does out-of-source builds for a relatively small java project: default: bin/classes/EntryPoint.class bin/classes/manifest jar cvfm ./bin/output.jar ./bin/classes/manifest -C ./bin/classes EntryPoint.class bin/classes/EntryPoint.class: ./src/EntryPoint.java bin ...
stackexchange/codereview
Hashtable docProps = new Hashtable(); docProps.Add("Field1", myvalue); docProps.Add("Field2", "slsl"); docProps.Add("Field3", "wwowowo"); try { DocumentSet ds = DocumentSet.Create(list.RootFolder, "mydocumentset", list.ContentTypes["CustomDocumentSet"].Id, docProps); } This will add the doc...
stackexchange/codereview
I currently have a project I'm working on that has a target of .NET Framework 3.5. I am using Visual Studio 2010; however my coworkers use Visual Studio 2008. I am able to use C# 4.0 features such as optional function parameters, but if they try to build the same code with the same target, they are unable to. It was my...
stackexchange/codereview
How much size does OpenFeint add to your binary?
stackexchange/codereview
I have a dojox.grid.datagrid connected to an dojox.data.jsonreststore. everything works fine, but I cant get the delete-button to work: I have a formatter-function: function getDelete(item) { var url = "if (confirm('Sind Sie sicher, das der Eintrag gelöscht werden soll? Diese Aktion kann nicht Rückgängig gemacht we...
stackexchange/codereview
I know this technically isn't supported (and as far as I can tell it's undefined behavior) but is it really a fatally horrible thing to sample from a texture which is also being written to? I ask because I need to read from a depth texture which I also need to write to, if I can't do this it means I will have to copy t...
stackexchange/codereview
I'm developing a document based app. Each document has three windows (and hence three window controllers). I'd like to set it up so that two of the three windows are shared between different open documents (swapping views as needed). Is this possible? Can anyone point me in the right direction (documentation or example...
stackexchange/codereview
I'm am designing my database/domain for an eCommerce application and I'm having a hard time figuring out how to store products. The website will sell a wide range of products, pens, thongs, tattoos, umbrellas, everything. Each of these product will share a few common attributes, height, width, length, weight, etc but s...
stackexchange/codereview
Looking for a jQuery gallery plugin similar to Galleria or GalleryView but instead of the thumbnail images on the bottom they located on the left or right vertically. Thumbnails also need to have a scroller as well, ie show 5 thumbsnails at a time but can page back and forth to see more thumbnails. Thanks for the help....
stackexchange/codereview
I have been having a problem when I try to compare two Rails models. They should evaluate as the same, but the way ActiveRecord implements == is causing it to fail. What's even stranger is the unit tests are passing. Suppose a User has many Posts, and Posts has many Comments. User also has_many comments. (and this is c...
stackexchange/codereview
when I wanna to run a click once deployed vb.net win-application on my machine it says: "Unable to install or run the application. The application requires that assembly CrystalDecisions.CrystalReports.Engine Version 10.2.3600.0 be installed in the Global Assembly Cache(GAC) first." I have installed crystal Reports 8.5...
stackexchange/codereview
In Visual Studio 2010 you get automatic notifications about extension updates. I don't want to be notified of that. Is there a way to disable that feature?
stackexchange/codereview
The Qt documentation for QThread says to create a class from QThread, and to implement the run method. Below is taken from the 4.7 Qthread documentation... To create your own threads, subclass QThread and reimplement run(). For example: class MyThread : public QThread { public: void run(); }; void MyThre...
stackexchange/codereview
I have a Model called Todo.rb which has an attribute called "asset" which is a string. The string contains the names of Models such as Call, Email, etc. They also contain an asset_id, which is a specific record of the Asset in ActiveRecord. How, from a Todo record, can I assign to asset from that actual ActiveRecord c...
stackexchange/codereview
I have a data-intensive Python script that uses HTTP connections to download data. I usually run it overnight. Sometimes the connection will fail, or a website will be unavailable momentarily. I have basic error-handling that catches these exceptions and tries again periodically, exiting gracefully (and logging errors)...
stackexchange/codereview
What are basic steps to upload multiply files via JavaScript without reloading the web page?
stackexchange/codereview
I have a large number of Access Databases with tables in different formats. I want to read a couple of specific tables from each Access DB and create the same format data in Sql. Clearly I can write code to do that, but I was wondering if it's possible to programmatically drive the Import wizard to do the same job. To...
stackexchange/codereview
package company; public abstract class A { public A(int i) {} public abstract void func(); } public class B extends A { public B(int i) { super(i); } public void func() {} } public class C extends A { public C(int i) { super(i); } public void func() {} } How do I dynamically instantiate company...
stackexchange/codereview
I have a simple server running in node.js using connect: var server = require('connect').createServer(); //actions... server.listen(3000); In my code I have actual route handlers, but that's the basic idea. The error I keep getting is: EADDRINUSE, Address already in use I receive this error when running my applicatio...
stackexchange/codereview
Could you please help me with this puzzle that I am not able to find a nice answer to!! There are 49 cars which race at unique speeds. Also there is a race track in which at maximum 7 cars can be raced together. We need to find the 25th fastest car in the group. We don't have a stop watch to measure time (so we can onl...
stackexchange/codereview
Hi I roll out some site on google apps engine but I'm not really happy about it for this reason: django is not fully supported so no administration etc. using django patch etc. sometimes give me some problem when new release on gae is out a registering domain (with go daddy) and add it to google apps engine (no redire...
stackexchange/codereview
I'm trying to integrate sending mail into my app, but I end up with 2 warnings. I am using Obj-C, the Cocos2d Framework. This is my code. -(void) mailTapped: (id) sender { MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; composer.mailComposeDelegate = self; if ([MFMailComposeVi...
stackexchange/codereview
I have a table which has data like state total A 3 B 6 C 2 D 7 E 4 I need to generate a table from this that has total of A & B (true) together and C, D, E (False) together Result Table Status Total True 9 (sum of A and B ) False 13 (sum of C, D, E) An...
stackexchange/codereview
am using a reorder list in my UI. My reorder list is and SQLDataSource are shown below. I get an error message "Reorder failed, see details below.\r\n\r\nFailed to reorder." Seems trivial but not able to find the issue. Can you please help me with this issue ? SOURCE CODE ...
stackexchange/codereview
I have a very strange issue and I have no idea how to debug it. (Side note: I hate creating GUI's! Anyway... :) I have been following this guide to using drag 'n drop on Silverlight. Right now, what I'm interested in is the reordering in a list. If I follow the example from the site exactly, everything is fine. It wor...
stackexchange/codereview
I'm doing some maintenance work on a database application and I've discovered that, joy of joys, even though values from one table are being used in the style of foreign keys, there's no foreign key constraints on the tables. I'm trying to add FK constraints on these columns, but I'm finding that, because there's alrea...
stackexchange/codereview
I get the following message when my VBA button 's onAction method gets called. The macro may not be available in this workbook or all macros may be disabled In the test.xlsm in ThisWorkbook file I have a very simple code Option Explicit Private Sub Workbook_Open() UpdateMenuSR End Sub Private Sub UpdateMenuSR() Di...
stackexchange/codereview
I'm trying to display some text as a subtitle in my tableView. Here's my code for part of the tableView: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier"; UITableViewCell *cell = [tableView...
stackexchange/codereview
The following code works except the dropdown list is not returned to its original value when the validation fails any ideas? <tr><td valign="top" style="padding-right: 10px;"> &nbsp;&nbsp;<b>Select Account:</b> &nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="m_lstA...
stackexchange/codereview
I'm deploying a Windows service with a Ruby script. After copying files to the server using FileUtils.cp, I run sc \\MYSERVER start MyService via Ruby's cmd syntax. This command returns the following error for each of 20 consecutive attempts, at five second intervals: [SC] StartService FAILED 32: The process cannot ...
stackexchange/codereview
Open Feint has a notion of challenges -- where a player can finish a game and then send a challenge to another user (like a "beat my score"). The app passes along whatever game data it needs to the OF servers and then when the challenge is accepted, the info is downloaded and the challenge is started. Is there somethi...
stackexchange/codereview
When in Xcode editing code for my objective C files, I often press Command-F to bring up the little Find-In-Document banner across the top. Sometimes this gets stuck in case-sensitive search, and when it does that it also won't loop through the entire document and sometimes won't even display the selected found string....
stackexchange/codereview
I have the following two models: class PhotoAlbum < ActiveRecord::Base belongs_to :project has_many :photos, :dependent => :destroy class Photo < ActiveRecord::Base belongs_to :photo_album When the user is on the PhotoAlbum def SHOW page, I want there to be a delete link, so I created the following: <%= l...
stackexchange/codereview
I have a View Model that has some serious nesting. I need to populate it from Entity Framework 4. I tried creating one big linq statement to populate it, but it says it doesn't recognize the .ToList() methods. It compiles fine. Runtime error is LINQ to Entities does not recognize the method 'System.Collections.Gen...
stackexchange/codereview
Is there any way to pass to custom valuator the complete model to validate all properties or properties of particular type? In that case I can see only one solution: to validate model on post action. But may be some one have better more generic idea? Is it achievable by attributes validation or not? If it is not achie...
stackexchange/codereview
select CURRENT_DATE()+1 is returning 20101032 on Oct 31 in MySQL. How can I fix this? The expected date is 20101101. Thank you.
stackexchange/codereview
I am building a distributed messaging system for users to send messages to each other on different linux terminals. The scenario that I am looking at for my question is when I try to write a string to a text file that is over 4095 bytes/chars. This string will be generated from user input. I have read that the ISO C99 ...
stackexchange/codereview
I would like to create a component(extending from spark Panel), which upon a buttonclick should show up next to the button(something like a bubble popping up or like the small box opening up when hovering up on profile links in facebook/twitter). I tried to create a component that implements mx.core.IToolTip and provid...
stackexchange/codereview
I am sure this is a stupid question but I can't figure out how to do it. I need to retrieve a large block of text that is stored in a database. I know how to connect to the database and submit the sql query. What I can't figure out how to do is have it store that text in a string so I can have it echo later on the p...
stackexchange/codereview
I have a couple of lines and I want to show a legend. The problem is, I can't use different styles (--, :, -.) because there are too few of them, and I can't use markers (+, *, etc.) because I need them to show some points on the lines. So the best idea I've come up with is to use numbers. But I can't figure how I can ...
stackexchange/codereview
Please, help me, how I can use html files in my appengine application for Java environment (Java SDK)? When I open it in my browser I got error: HTTP ERROR 404 Problem accessing /myapp/. Reason: NOT_FOUND
stackexchange/codereview
I once write a simple sed command like this s/==/EQU/ while I run it in command line: sed 's/==/EQU' filename it works well, replace the '==' with 'EQU', but while I write the command to a script file named replace.sed, run it in this way: sed -f replace.sed filename there is a error, says that sed: file replace.se...
stackexchange/codereview
Ok so i have a database table called requests with this structure mysql> desc requests; +------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+----------------+ | id | int(11)...
stackexchange/codereview
Can sitemap.xml precessors cope with this ? <?xml version="1.0" encoding="UTF-8"?> <!ENTITY port ":8080"> <!ENTITY host"http://example.com&port;"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>&host;/path/</loc> <!-- ...
stackexchange/codereview
This is for GNU-Prolog I'm having trouble getting a certain predicate to work. Its functionality is that it matches a list of integers that have a domain of 1 to N with no duplicates and length N. Basically what I want to do is have this as inputs and outputs: | ?- row_valid(X, 3). X = [1, 2, 3] ? ; X = [1, 3, 2] ? ;...
stackexchange/codereview
Given a dynamic or non-dynamic class like the following: package { public class MyClass { public var myProperty:String; public var myBooleanProperty:Boolean; public function MyClass() {} } } Flex 3 allows you to assign a value to myProperty like this: myClassInstance["myProperty"] = "myValue"; myClass...
stackexchange/codereview
Can someone tell me how they have done this in some form, be it XML-RPC, SOAP, bespoke etc. Not too worried on the packet format. I am interested in doing some sort of RPC over email, setting up a program to receive commands via email from another application(s) or even from users on a subscription list. Basically the ...
stackexchange/codereview
I am trying to create an instance of ICLRAppDomainResourceMonitor interface, but I found no clue of what coclass implements it. Without that knowledge, I cannot create an object instance of the coclass and retrieve that interface from the coclass object. Could anyone help me on this? Many thanks.
stackexchange/codereview
How do i read the following file which has columns of data with header and space or tab delimited, in common lisp. I also wanted to put the data in to list of list which contains rows. Also how to get the difference in dates in common lisp ID YR MO DA YrM MoM DaM 100 2010 2 20 2010 8 30 110 2010 4 30 2010 9 12 112 20...
stackexchange/codereview
I am trying to implement a memoized Fibonacci number function, and I am running into a compile error that I can't sort out. The following code is what I have so far. var fibs = Map.empty[Int, Int] fibs += 0 -> 1 fibs += 1 -> 1 fibs += 2 -> 2 val fib = (n: Int) => { if (fibs.contains(n)) return fibs.apply(n) else{ ...
stackexchange/codereview
I have projects in my web app... A user can have lets say 10 or more projects at a given point. When I output the user's project list, I'd like that list to be ordered by their last view.. Meaning at the top of the user's project list is the project they most recently visited and at the bottom is the project they visit...
stackexchange/codereview
Is there an easier way in C to set an array to one value than using a for loop and going setting each value one by one?
stackexchange/codereview
I just wondered if someone could give me some pointers (no pun intended) how to do this? I want to set aside 4GB of ram in order to map numbers to memory which saves me traversing a linked list checking if they are there. So instead of having (1,2,3,4,8,34,543,2343) and traversing 8 elements to verify that '2343' is i...
stackexchange/codereview
Possible Duplicate: Sorting an ArrayList of Contacts I am storing DataNode objects in an ArrayList. The DataNode class has an integer field called degree. I want to retrieve DataNode objects from nodeList in the increasing order of degree. How can I do it. List<DataNode> nodeList = new ArrayList<DataNode>();
stackexchange/codereview
I have really tough question. I have a program with six different kinds of MDI Windows. There needs to be a dialog prompt to prompt the graphic dimensions (Height, Width) and then create six different kinds of MDI Window depending on what kind of graphics. Question is: I already got 6 MDI types working (to some extent...
stackexchange/codereview
Say I have an appengine app called foo at foo.appspot.com and my email i.e. adminfoo(at)gmail.com is it's adminstrator. Now, I want to sell this service to blah.com. blah.com has a google app account and 'adds' the foo application and sets the url http://foo.blah.com to point to it. Now, using the new namespace manager...
stackexchange/codereview
How do I put image in rss feed to show up in feedburner newsletter.. <item> <title><![CDATA[TEST ONE TITLE]]></title> <link>www.example.com/test/title</link> <source url="http://www.youtube.com/aaaaa"><![CDATA[TEST ONE TITLE]]></source> <description>&lt;img src="http://www.example.com/img1.jpg" style="border: medi...
stackexchange/codereview
I'm using SO_REUSEADDR option, but I'm not sure why am getting Resource temporary unvailable option. I'm testing client server code on 127.0.0.1 if ( (sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { perror("socket() error!!\n"); exit(1); } if ( setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse...
stackexchange/codereview
If I need a regular expression, I can go to regexlib.com and with a bit of luck, find a regular expression for my requirement. If I need a class for, say "Employee", is there a centralised resource out there where I can just grab the code for a sample Employee object? I say Employee here as a simple example; another ex...
stackexchange/codereview
I am running NAMD simulation on an 8-node cluster with one NFS-shared folder on the head node. However, the simulation sometimes stop midway, complaining "invalid cross-device link". I am not really sure whether this is caused by NAMD and/or NFS but as far as invalid cross-link is concerned, isn't it related to some ki...
stackexchange/codereview
I am initializing an array using #defines in C, but I keep getting error "Expected an Expression" Following is code snippet #include "File2.h" File 1.h Int32 dataBuff[SCRATCH_BUFF_SZ]; File2.h #define SCRATCH_BUFF_SZ ( SAMP_BUFF_LEN \ + CORR_BUFF_LEN \ ...
stackexchange/codereview
The facts: I have two predominant classes: Manager and Specialist. There are several different types of Specialists. Specialists often require the help of other Specialists in order to get their job done. The Manager knows all of the Specialists, and initially each Specialist knows only their Manager. (This is the ...
stackexchange/codereview
Is there a library that makes it possible to write Swing based GUIs similar to the manner done by SwingBuilder in Groovy? I am hoping to develop a Java GUI application without embedding Groovy or another complete programming language in Java, and I find the standard Java syntax rather tedious.
stackexchange/codereview
Trying to troubleshoot a questionable plugin a client is experiencing issues with in production, and one possible issue I see is the fact that they're sending SMTP synchronously from within our heavily-transacted C# web application. In the past I believe I've read or been told that sending SMTP synchronously from withi...
stackexchange/codereview
Is it generally sane to append some random data to an executable binary file? What measures should be taken to ensure safe operation of the resulting executable, like padding before appended data or whatever? A typical C example would be: gcc -o main.o -c main.c gcc -o main main.o -lfoo cat bar.txt >> main The target ...
stackexchange/codereview
Can anyone offer any advice on the best way to fully integrate a wordpress blog into a magento store? I have seen many different approaches of this integration (lazzymonkeys, sonassi etc), but none seem to fully integrate the entire blog, i.e. posts, categories, archives, search etc. So far, I have created a module tha...
stackexchange/codereview
We have a unit test with variable that contains a very long string. Question is how to write this in code, without having problems with line breaks or that the code is difficult to read. In VB there is a line continue character, is there an equivilant in C#?
stackexchange/codereview
I have a Dictionary<string,string[]> Some example values are Key1 Value="1","2","3","4","5" Key2 Value="7","8" Key3 Value=null I want to the array length to be the max of all values which in my case is 5 for Key1 so I can get a result as: Key1 Value="1","2","3","4","5" Key2 Value="7","8","","","" Key3 Value="","","","...
stackexchange/codereview
I need a function that will take in a list of characters and numbers, and then return the numbers added up (ignoring the characters). This is what I have so far: (define (adder lst) (cond ((null? lst) 0) ((number? (car lst)) (+(adder (car lst)) (adder (cdr lst)))) ((char? (car lst)) ...
stackexchange/codereview
I have a huge template file and only few functions are used, and I want to isolate that part for test and comment the other half. How can i find what's the best way to do this ? How can I do this on a Windows system and the template file is .hxx ?
stackexchange/codereview
I am working on a rails app that submits a french translation via ajax and for some reason I keep getting the following error in the log: Encoding::CompatibilityError incompatible character encodings: UTF-8 and ASCII-8BIT Does anyone know how to fix this? FIX:This works on the WEBrick sever Place # encode: UTF-8 at the...
stackexchange/codereview
I have a website which uses Facebook connect for user accounts. I'm having some problems with spam, though. I'd like to restrict Facebook login from any Facebook account that is less than two weeks old. I this this would limit the number of people who make fake accounts to get on my site (after I ban their accounts). I...
stackexchange/codereview
I have stumbled across a bit of code that I was hoping someone could explain to me. This is used in the context of jqGrid. onSelectRow: function(id){ if(id && id!==lastsel){ jQuery('#rowed3').jqGrid('restoreRow',lastsel); jQuery('#rowed3').jqGrid('editRow',id,true); lastsel=id; ...
stackexchange/codereview
So, here is a problem that I am having with asp.net app inside of SharePoint (as page viewer). When the Default page is loaded, it works fine. However, when I try to go to next page, i am getting a null reference exception. It looks like my session variables are becoming null on the next page (even though I set them ...
stackexchange/codereview
I'm trying to measure time between taps. I've gathered code from a couple other posts, but still no luck. I running into issues when I'm taking the difference between two time stamps and trying to make it readable in seconds. // Time elapsed NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:touchesBe...
stackexchange/codereview
The link http://download.oracle.com/javase/6/docs/api/java/util/concurrent/package-summary.html describes several interesting data structures like concurrent skip-list. Is there any known reliable open source representation of these?
stackexchange/codereview