instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Can anyone help explain why the code below fails to retrieve the html
Dim WebReqeust As WebClient = New WebClient
Dim URL as string = "http://www.professionalorganizervannuys.com"
Dim WebPage As String = WebReqeust.DownloadString(URL)
It fails on this particular URL.
Thanks in advance.
| stackexchange/codereview |
Let said currently I want to pull a XML file from a server which include name, text, video, image & etc. Can HTML 5 directly read the XML and put it into the html body or I can only use JavaScript to pull the information. Will it be the same in the iPhone when using PhoneGap to develop?
Thank in advanced.
| stackexchange/codereview |
I have a form in Wordpress. When it is submitted, the page redirects to another page. But I want the page to stay the same, and for a modal to appear instead of a page redirect.
The following code is from the functions.php file that handles the form submission.
I'm not sure if this where I would introduce a modal. But ... | stackexchange/codereview |
SELECT First 20 Chars of(ColName) from DB
Is this possible?
| stackexchange/codereview |
I have a class called SomeClass which has a method called methodToCall(SomeClass o)
If I instantiate SomeClass like this:
SomeClass itsObject = new SomeClass();
Can I then do this:
itsObject.methodToCall(itsObject);
| stackexchange/codereview |
I put several 3rd party controls in a DPK file in order to install them all with a single click when I (re)install Delphi.
One of the controls in this DPK is Melander's GIFImage.pas. The thing is that the blue dots do not appear in this file when I compile the package. Why?
The file IS compiled. I have deleted the DCU... | stackexchange/codereview |
I am writing a program for linux in C to extract the wpa/wep key from a windows registry hive.
Initially I was hoping to use wine's CryptUnprotectData function, but I realise now that wine uses a different algorithm and just mimics window's version. I also realise that only the user that encrypted the data can decrypt ... | stackexchange/codereview |
I want to set the status GTalk through my Java program.
My application will run on Google App Engine/Java. And will use XMPP API.
Is it possible? And how can I do that? Some code example.
Thanks.
| stackexchange/codereview |
I have the following table with 10 unique rows, BookingID is a FK containing a random number. The number doesn't need to be in sequence.
BookingID, Description
1000 Foo
3000 Bar
1500 Zoo
I need to insert an sequential index called ID which goes from 1..x
how do I do that in SQL Server 2005? I was thi... | stackexchange/codereview |
I am wanting to rename 1k files using python. they are all in the format somejunkDATE.doc
basically, I would like to delete all the junk, and only leave the date. I am unsure how to match this for all files in a directory.
thanks
| stackexchange/codereview |
I have a the string 'Hello', I need to find out what characters occupy which indexes.
Pseudo-code:
string = 'Hello'
a = string.index(0)
b = string.index(4)
print a , b
a would be 'H' and b would be 'o'.
| stackexchange/codereview |
I've used lightbox and fancybox quite a lot but never really seen any reason to choose one over another. There are also a whole bunch I have not used like these http://planetozh.com/projects/lightbox-clones/ . The data on that page is quite old and in many cases incorrect.
Are there any good reasons to choose one over ... | stackexchange/codereview |
I feel my question is somewhat straight forward, but I've added some details of my problem in the "Background Info" section in case it is too vague.
Question
How does the WorkflowServiceHost determine that a persisted activity, that is Idle due to Delay, has reached the Delay timeout? Does it load it into memory and c... | stackexchange/codereview |
Just one quick question, say, Car class extends HashMap(String, String).
1.
for (Car car : carList) {
if (car.isEmpty) {
break;
}
doSomething();
}
2.
for (Car car : carList) {
if (!car.isEmpty) {
doSomethingElse();
}
}
Which of the above two is better?
Thanks.
---- edited ----
Sorr... | stackexchange/codereview |
I got a problem when I parse a complex file which include thousands of lines.
I already implemented my Perl script like this days ago.
my ($head, $tail) = split /=/, $line;
Nearly all my source file $line style as below:
constant normalLines = <type value> /* hello world */
and I can get the output $tail = /* ... | stackexchange/codereview |
How do I parse wiki markup within tags?
For example, I'm creating a template to insert an iframe into my personal wiki page:
Template:iframelink contains:
<html>
<iframe src="http://www.{{{1}}}.com"></iframe>
</html>
However, I can't pass anything to {{{1}}} because it's within the <html> tags.
What work-arounds can ... | stackexchange/codereview |
Attempting to simulate client area based window dragging by returning HTCAPTION under a WM_NCHITTEST (excluding HTCLIENT & appropriate areas) works flawlessly when used with a parent window - however presence of child windows such as tabs placeholder windows, even when set to the extended style WS_EX_TRANSPARENT, cause... | stackexchange/codereview |
What is an example (in code) of a O(n!) function? It should take appropriate number of operations to run in reference to n; that is, I'm asking about time complexity.
| stackexchange/codereview |
I can easily write a predicate to get unique elements from a given list in Prolog e.g.
no_doubles( [], [] ).
no_doubles( [H|T], F ) :-
member( H, T ),
no_doubles( T, F ).
no_doubles( [H|T], [H|F] ) :-
\+ member( H, T ),
no_doubles( T, F ).
However, how can you do the same thing but for something other than a norm... | stackexchange/codereview |
How to invoke Display method extending object class?
static class Tools
{
public static void Display<T>(this T t)
{
Console.WriteLine("generic: " + t.GetType());
}
public static void Display(this object o)
{
Console.WriteLine("object: " + o.GetType());
}
}
class Program
{
... | stackexchange/codereview |
I have a WPF application consuming data using Entity Framework 4 and Self-Tracking Entities. In which I have a window with 2 controls in it, one that shows the "Details" portion of an object using a ContentControl and templates from a merged resource dictionary. Another with a ListBox of Groups the object in question b... | stackexchange/codereview |
can some assist me with my code, everything looks correct checked each line at least 10 times. I've even hardcode in the user/pass for the query and still nothing.
<?php
include "database.php";
$sql = "SELECT UserName, Password, Language, Editor FROM admin_login WHERE UserName='".$_POST['username']."' AND Password='".... | stackexchange/codereview |
I have just made a small little app of a Python wxPython script with py2app. Everything worked as advertised, but the app is pretty big in size. Is there any way to optimize py2app to make the app smaller in size?
| stackexchange/codereview |
I am using the Ext JS library for creating my application. I have a tree panel that has tree nodes and children tree nodes. These tree nodes have leafs that I would like to be able to access. I've been searching for a while, but cannot find a function of property to access the leafs :(
Some code is here:
var i;
var ... | stackexchange/codereview |
I wonder if anyone can help me?
I am having problems understanding why i need to issues DetectChanges on my POCO (non proxy) entities.
Of course i have this line to ensure that proxies are not returned.
context.ObjectStateManager.GetObjectStateEntry(order).State
And doing some research it appears if i need to check... | stackexchange/codereview |
sending and recieving file from tcp socket. Sending the file works however trying to save the file does not work.
#include <cassert>
#include <arpa/inet.h>
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <string... | stackexchange/codereview |
This is more of a challenge question than something I urgently need, so don't spend all day on it guys.
I built a dating site (long gone) back in 2000 or so, and one of the challenges was calculating the distance between users so we could present your "matches" within an X mile radius. To just state the problem, given... | stackexchange/codereview |
I want to display something in an NSOpenGLView, but since there is a total of zero bytes of documentation on it, and the sample code is as big and complex as the documentation should be, I can't get any wise out of it. This is my code so far, and my ANOpenGLView is an NSOpenGLView in a NIB subclassed as ANOpenGLView:
@... | stackexchange/codereview |
this question isn't related to jQuery itself but I found a plugin named Metadata found there and one of the example uses custom tag attribute: <li data="{some:'random', json: 'data'}">...</li>.
Q: Is that cross-browser? Will this fail when validating markup?
Thanks.
| stackexchange/codereview |
I love Python but do not really care for AWK. For purposes of comparison (and to see how a Python-to-AWK master would do this), could someone rewrite the following Python program in AWK? Considering how short it is, some would think that the rewrite would be simple and easy for anyone with a little time.
import os
ROO... | stackexchange/codereview |
I am having problem understanding how Observable.Delay works and when the Dispose() is meant to be called. Would anyone familiar with Rx be able to help please?
The following code snippet:
static void Main(string[] args)
{
var oneNumberEveryFiveSeconds = new SomeObservable();
// Instant echo
... | stackexchange/codereview |
Trying to solve my current problem of drawing an image on an Android MapView and then animate it to represent a moving object, I decided to try to just draw a raw ImageView at a GeoPoint on the map and then try and animate it from there.
This is the code I put in my map activity (extends MapActivity)'s onCreate method... | stackexchange/codereview |
I'm new to C#, and although my office machine is based on windows, my netbook only has linux on it. I installed monodevelop, and so far everything is working fine.
I was just wondering if you had any tips or must dos for any person who is using monodevelop for c# / asp.net programming
Edit
Feel free to recommend open ... | stackexchange/codereview |
Pex automagically generates unit tests for C# code.
Is there anything similar (free or commercial) for C++ code?
| stackexchange/codereview |
I'm trying to use implict localization with MVCSiteMap but it's not working.
Here's my sample Web.Sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true">
<mvcSiteMapNode title="Home" controller="Home" action="Index" cha... | stackexchange/codereview |
2 models
Books (has_many: chapters)
Chapters (belongs_to: books)
Id like to display a list of books, but only books with chapters.
Here's what I have so far:
@books = Book.find(:all,:include => :chapters)
Problem here is that books is returning books w/o chapters (0 chapters)
when dealing with nested resources like t... | stackexchange/codereview |
i am loading some fragments with jquery with following code
var box = $(this).closest(".product-contain").children(".title:first");
box.load(url + " .maintitle", data);
var box = $(this).closest(".product-contain").children(".detail:first");
box.load(url + " .alldetail", data);
(i don't want to load whole .product-con... | stackexchange/codereview |
Now to convert this strings to date time object in Python or django?
2010-08-17T19:00:00Z
2010-08-17T18:30:00Z
2010-08-17T17:05:00Z
2010-08-17T14:30:00Z
2010-08-10T22:20:00Z
2010-08-10T21:20:00Z
2010-08-10T20:25:00Z
2010-08-10T19:30:00Z
2010-08-10T19:00:00Z
2010-08-10T18:30:00Z
2010-08-10T17:30:00Z
2010-08-10T17:05:00Z... | stackexchange/codereview |
I found this ajax file upload script here http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
Which is supposed to add ajax functionality to my file upload form
<div id="dialog" title="Upload Image">
<%
Html.BeginForm("Upload", "BugTracker", FormMethod.Post,new { id="uploadForm", enctype = "multi... | stackexchange/codereview |
I have been using FTP on an iPhone 3GS in my app for almost a year with no problems. On my new iPhone 4 FTP fails all the time when using the 3G network. I have tried on 4 other iPhone 4's with the same result. I have tried multiple FTP servers with the same result.
Steps to Reproduce:
1) Turn off wifi on iPhone 4.
2... | stackexchange/codereview |
i test re on some pythonwebshelll, all of them are encounter issue
if i use
a=re.findall(r"""<ul>[\s\S]*?<li><a href="(?P<link>[\s\S]*?)"[\s\S]*?<img src="(?P<img>[\s\S]*?)"[\s\S]*?<br/>[\s\S]*?</li>[\s\S]*?</li>[\s\S]*?</li>[\s\S]*?</ul>""",html)
print a
it's ok
but if i use
a=re.findall(r"""<ul>[\s\S]*?<li><a href=... | stackexchange/codereview |
Am currently working on a tool created by a colleague of mine and would like to improve performance. Basically, it's a tool for drawing on screen and uses a combination of Sprites and the Graphics class to draw a line segment every time the mouse is moved when the mouse button is down. Here is the drawing bit:
// on M... | stackexchange/codereview |
I have a simple console program written in C and want to abort a text input with CTRL + Z. How is it possible?
Edit: Here is some code (untested).
#include <stdio.h>
int main()
{
float var;
while(1)
{
scanf("%lf", &var); // enter a float or press CTRL+Z
if( ??? ) // if CTRL+Z was pressed
... | stackexchange/codereview |
I have an ecommerce site based off of this tutorial.
Now, in the cart.php page, whenever someone updates the quantity and proceeds to click the Update Cart button, they are greeted with the following notices:
Notice: Array to string conversion in /home/aquadual/public_html/fiverrproject/plaincart/library/config.php on ... | stackexchange/codereview |
our svn server has a trunk called Dev and Branches live in
/Branches/Release/1.0/
/2.0/
/2.3.4/
i cloned it with something like git svn clone -T Dev ... -b Branches ...
when I run git branch 2.1 remotes/Release/2.1 i get:
fatal: Not a valid object name: 'remotes/Release/2.1'.
How d... | stackexchange/codereview |
Is there any way to tell when the containers are finished being made for a ListView?
A detailed explanation of what I've done so far
I have a ListView control that has a DataTemplate in one of its columns that contains a CheckBox Control.. I've figured out how to access the CheckBox dynamically using the object that t... | stackexchange/codereview |
I am generating some methods on the fly. The method body varies based on a certain criteria.
I was relying on class_eval to generate conditional code.
%Q{
def #{name}
#{
(name != "password") ? "attributes[:#{name}]" :
"encrypt(attributes[:#{name}])"
}
end
}
Recently I have star... | stackexchange/codereview |
I'm writing a query in SQL in which i have to find the youngest senior person from a data given to me.
SSn DOB
22 1950-2-2
21 1987-3-3
54 1954-4-7
The data is in the manner. And I need to find the age first so that I can write the condition of senior customers which is age >50. Since I dont have age paramete... | stackexchange/codereview |
I'm still fairly new to rails but I've done file uploading before. I'm trying to implement very basic file uploading - nothing fancy, just upload the file, save it, and make a record of it. So here's my method for saving the file:
def self.save(upload,name)
directory='public/uploads'
ext=File.extname(upload.ori... | stackexchange/codereview |
I am using wxpython's CustumTreeCtrl. Since some of the items in my tree-hierarchy are supposed to have different textcolours it would useful if these items also keep their textcolours when selected. However, when an item is selected the background colour is automatically changed to blue (that can be controlled with Se... | stackexchange/codereview |
Hi I have multiple jQuery-UI autocomplete instances running on a single page.
<div id="div1">
<input name= "city[1]" class= "city" id="city1" />
<select name = "select1" class = "zipcodes" id = "zipcodes1"></select>
</div>
<div id="div2">
<input name= "city[2]" class= "city" id="city2" />
<select name = "select2" cla... | stackexchange/codereview |
Does anyone know how to add an existing xcdatamodeld folder to an XCode project? xcdatamodeld is actually a folder, even though the OS recognizes it as a file, much like a [namehere].app folder. When I try to add the xcdatamodeld into XCode, all I get is a folder group with the name of the xcdatamodeld folder; that loo... | stackexchange/codereview |
I have an array of type Person, which contains string objects: FirstName, LastName, login.
I have this bound to a dropdownlist.
Now along with this array, I also want to display one more item called "Desk". How can i do that?
My current code is:
Person[] traders = GetTraders();
ddl_trader.Items.Clear();
ddl_trader.Data... | stackexchange/codereview |
I have an app on the market that is for rooted devices only. I have tested the app extensively on a rooted and unrooted G1, MT3G and Cliq with no errors. I am receiving a number of low ratings from people with supposedly rooted devices, saying that the app tells them that they are not rooted (of course, they usually do... | stackexchange/codereview |
I want to determine which view touches occurred in for the entire application, for the purpose of logging touches so that I can go through the logs later and determine what the user did. I know I could subclass UIView and override touchesBegan/Ended to log those, but I am using many instances of UIButton, UISlider, etc... | stackexchange/codereview |
According to this site:
http://iosdevelopertips.com/cocoa/date-formatter-examples.html
there is a class that handles formatting, which takes in a set of constants/enums (e.g. NSDateFormatterShortStyle) to the "setDateStyle" property/method.
Somehow the NSDateFormatter knows to retrieve the proper locale-specific date f... | stackexchange/codereview |
Thanks to the invaluable assistance of several Stack Overflow participants, I'm very close to the desired results ... here's a recap and update, for interested parties:
I have a series of product modules, each of which contains (among other things) the product's name and a 'compare' checkbox. My objective is to generat... | stackexchange/codereview |
I use python binding to igraph to represent a directed tree. I would like to find all possible paths from one node in that graph to another one. Unfortunately, I couldn't find a ready to use function in igraph that performs this task?
EDIT
The concerns on infinite number of paths
the graph I'm talking about is actual... | stackexchange/codereview |
I have a many-to-many relationship. Just like in the example from the documentation:
Person.java
private Set<Key> favoriteFoods;
Food.java
private Set<Key> foodFans;
How do I get all "favorite foods" of a certain "food fan", if i have retrieved a "Person" object and i have the favoriteFoods key set. Is there ... | stackexchange/codereview |
I need to apply the border shadow on border-bottom by CSS3. I just want to apply CSS3 shadow on bottom. Is this possible?
| stackexchange/codereview |
In my code, I have a form with radio buttons. The first radio button is displayed but the second (Repeat Every Week) is not? If I remove the comment markers then it all works fine. But why is it happening?
<!------------>
<%= radio_button_tag 'repeat_daily', 'freq' %>Repeat Every Day<br/>
<!------------>
...some code..... | stackexchange/codereview |
I looked around for this, but all the examples I could find used XAML, which made the solution too static. Here is what I want to do:
I would like to populate a DataGrid's columns, rows and attributes from an XML file to be specified at run time. Nothing about the DataGrid's attributes can be fixed; the XML drives it... | stackexchange/codereview |
I'm working on a Rails app.
I want to test with rspec my method "start!" of my model Backup.
So here the specs (all are methods, too):
Backup should copy files to folder /backups
Backup should check md5 sum
Backup should delete original files
For my tests, I create fake files, based on fixtures :
MyFile.all.each{|r| ... | stackexchange/codereview |
I wasn't expecting to come across this error. I imagine I'm doing something wrong somewhere else.
I have an MVVM application.
My model can serialise its self using a BinaryFormatter. This was working fine.
Today I added in an event handler to my model, and the viewmodel that contains the model subscribes to this event.... | stackexchange/codereview |
is there a Rails 3 jQuery global loading event?
I'd like to display a LOADING banner anytime jQuery is AJAX loading... and remove it when it's done...
Ideas? Thanks
| stackexchange/codereview |
I have a WP Blog with a few DIVs generated through PHP loops. I would like to be able to show additional about a DIV when someone clicks on it.
The code looks like this:
<div class="story item-1">
<div class="story item-2">
<div class="story item-3">
<div class="story item-4">
(etc. Could be any number of these.)
Clic... | stackexchange/codereview |
Okay, I'm not trying to do anything super complex, I have searched, and searched, and roamed every blog and forum I can find. I am about to tear my hair out because no one just outright shows it working.
I want to use an IDictionary in my Model. Nevermind the reason why, that's irrelevant. I just want to do something ... | stackexchange/codereview |
I am using the newest jqueryui and have a link on my homepage that bring a dialog with a form. Now on Firefox, IE and the others no problems. Only on chrome. it just won't work. You click and it's just quiet.
Here is the simple code that gets the dialog:
var diagopt = {
autoOpen: true,
title: 'Get a Quo... | stackexchange/codereview |
Question on how to go about pushing out our PHP code. Previously, we would simply run our test suite, commit changes, and then svn up on the productions servers to "push" out changes. I'd like to change this because I'm not too comfortable having svn on the production servers for multiple reasons.
I was thinking of jus... | stackexchange/codereview |
I have been looking at the w3 page on css selectors and have not found any promising leads, so I thought I would ask...
Is there a way to style a single element with two classes differently than if it was one class?
Example:
a.foo {
color: red;
}
a.bar {
color: yellow;
}
a.foo.bar {
color: orange;
}
<a class=... | stackexchange/codereview |
I built the demo on my Ubuntu 10.04 using the headers found in this PPA and with the build_all.sh script found in the same directory as camshiftdemo.c. All I got is a Could not initialize capturing... message.
Then I tried to build it with this line (found it after building the demo with CMake in the building directory... | stackexchange/codereview |
What's the equivalent F# declaration to this C# declaration:
using NR = ICSharpCode.NRefactory;
| stackexchange/codereview |
How to send an email with AutoIt? Just need a clean example and explanation, containing:
to
from
subject
message
| stackexchange/codereview |
Using ASP.NET Web Forms with an UpdatePanel, and using jQueryUI dialogs with a <asp:Button> inside.
First, my code looked like this simple dialog demo with a show: 'blind' effect, but I had the issue that jQuery moves the dialog outside the form, preventing the ASPNET controls from posting back to the server. So, I use... | stackexchange/codereview |
Is there a way to sort std::map by the data rather than the key? Right now my code duplicates the entire map in to an array just to do this.
| stackexchange/codereview |
I'm writing this question to maintain a register of design patterns associated with Scala, standards patterns or only from this language.
Associated questions:
Scala Catalog of functional Design Patterns
Design patterns for static type checking
Thanks to all who contribute
| stackexchange/codereview |
I'm trying to build a script that will add the currently selected text to the end of a file. So far it looks like cat selected_text >> quotes.txt.
Is there any way, either in command line or in C/C++ to get the currently selected text from the currently active window?
| stackexchange/codereview |
I am aware of few efforts in constructing Linq queries dynamically, such as this, and this.
None seem to be ideal as I would like to avoid putting expressions in a string, and omitting a where if it is not needed.
My main concern is that the query is optimized for the database, and dynamically omits unnecessary claus... | stackexchange/codereview |
Friend's
I have list of places in my database,when i click search option from my UI i have to fetch the data from database and the listed below the textbox,and then i select the corresponding place to search on google maps,it works fine for android platform below 2.1,but when i use 2.2 i'm getting force close... | stackexchange/codereview |
I have a question about the cell truncation (replaced with "..."):
How to display the replacement "..." on the left side of a cell when the column is right-aligned?
I'm using non-equal-width font, so I cannot just count the characters to do some string manipulation as a workaround, I need a solution. I believe there sh... | stackexchange/codereview |
Im new to shaders and I'm trying to learn the basics.
But everytime I change some code in my vertex shader it results in an error.
"Validation Failed: Program is not successfully linked."
Im using the standard openGL project for the iphone as a starter in Xcode ( with a 2d cube moving in y-position).
From ... | stackexchange/codereview |
I've been looking at the use of the role attribute for HTML5/XHTML in the W3C: http://www.w3.org/TR/wai-aria/roles and was wondering if there are any sites that use this or examples of how/when to use the role attribute.
I understand how it works, but would like to see how other people have used in their sites/projects... | stackexchange/codereview |
I'm looking at implementing django-threadedcomments and am wondering if it is able to restrict threading to replies made by a moderator/owner, similar to how Yelp handles user reviews and business owner replies.
For example the comments would look like:
"Comment 1" by User1
"Comment 2" by User2
"Reply 1" by O... | stackexchange/codereview |
I'm using NHibernate to persist my Item class to a SQL database. The Item class has a property Item.Tags of type ICollection<Tag> which I am mapping using the following NHibernate configation.
<set name="Tags" table="TagLinks" cascade="all" lazy ="false">
<key column="ItemId" />
<many-to-many class="Tag" column="Ta... | stackexchange/codereview |
What's the best way to tie my tables (like Customer, Orders) to the Users in the membership tables. Is there a way to tie it using an int somehow?
| stackexchange/codereview |
From the documentation I've found this example:
We can animate any element, such as a simple image:
<div id="clickme">
Click here
</div>
<img id="book" src="book.png" alt="" width="100" height="123" />
With the element initially shown, we can hide it slowly:
$('#clickme').click(function() {
$('#book').fadeOut('sl... | stackexchange/codereview |
I have a login script that checks for a registry key and if the key is not found it runs a script that creates an outlook signature from info in AD then adds a key to the registry. The script has run perfectly on about 20 machines that i have tested it on, however it doesn't work correctly on 3 machines. For these 3 ma... | stackexchange/codereview |
I have a table where some rows have a class of "parent" and some have a class of "child". The "child" rows always appear under the "parent" and you can toggle their visibility. What I want to do is use tablesorter to sort only the parent rows based on their "Last Edit Date" column, right now the childrens' "Last Edit D... | stackexchange/codereview |
We are trying to use custom routes in an ASP.NET MVC application to generate this url: 'http://example.com/Person/unnecessaryinfo-42'. The "unnecessaryinfo" is the name of the id which will make the URL hackable for the user. Below is the code for our route map. This works but my controller action ends up with "unneces... | stackexchange/codereview |
I want to be able to create multiple user accounts with the same login (because of the case a user deletes his account... and then sign up with the same login). I am using authlogic and rails3_acts_as_paranoid.
But there is a problem: Authlogic validates the uniqueness of the login field - and IGNORES the default_scope... | stackexchange/codereview |
I have this in my webconfig file...
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
timeout 2880 means how much sec or min its going to take?
How to show when my session time out I need to display SessionTimeout.aspx page...
Thanks
| stackexchange/codereview |
I am working on calculaitng the size [memory used] of a java object [hashmap] . It contains elements of different data types [at runtime] so [ no-of-elem * size-of-element] is not that good an approach. The code right now does it by series of
if (x)
do something
else if (primitives)
lookup size and calculate
Howe... | stackexchange/codereview |
I have List<T> and I want to find two random name from that List<T> starting with some condition from List using .NET 2.0.
I know its very easy with LINQ but I am stuck with 2.0
I am wondering if I can do something like this
List<foo> list = new List<foo>();
List<foo> newlist = new List<foo>();
Random r = new Random()... | stackexchange/codereview |
Let's say I have the following method:
public static int CountNonNullMembers<T>(this IEnumerable<T> enumerable)
{
if (enumerable == null) throw new ArgumentNullException("enumerable");
int count = 0;
foreach (var x in enumerable)
{
if (x != null) count++;
}
return count;
}
And I have t... | stackexchange/codereview |
The footprints and clock app on a HTC sense phones use a slider control on the bottom buttonbar (see this movie for an example: https://docs.google.com/leaf?id=0B9hmEy_z2CRzOTJmYTVlNDktYjkwMS00YTM5LTk3ODQtYmIzODU4Yzk1YjA0&hl=en&authkey=CMWwwegG).
From the hierarchy viewer I can see that they use a custom control for t... | stackexchange/codereview |
I'm having trouble to get the -webkit-tap-highlight-color property to apply to a div - I'm at a loss as to why it isn't. Copying all the styles that apply to it below. The desired outcome is a back button as shown here: http://building-iphone-apps.labs.oreilly.com/ch03.html#ch03_id35932102
.backButton {
font-weight: ... | stackexchange/codereview |
We're developing a new site and we added some list drop downs. The client looked at it on his Dell running Windows 7 and IE8. Unfortunately, it's doing an odd stair stepper effect with the lists when they drop down instead of going straight down like they should. I don't know whats going on. Here's the site Love-Wise.
... | stackexchange/codereview |
I am trying to turn my array into an arraylist and I am having trouble modifying this part of my class. I don't have my complete class but this part of it.
public boolean add(String title, int productID){//true or false statement
if ( numberOfRecords == list.length() ){ // I get an error here at list.lengt... | stackexchange/codereview |
Our project is an Eclipse RCP application using Hibernate as an ORM. I recently learned about JFace databinding, in which the GUI and data models can be synchronized automagically.
I put together a short test implementation along the lines of Lars Vogel's excellent JFace Data Binding Tutorial and was fairly impressed ... | stackexchange/codereview |
How do I destroy all but the newest n records using Rails' ActiveRecord?
I can get the newest n records using order and limit but how do I destroy the inverse?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.