instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I'm having the strangest problem with a value changing when I insert it to a MYSQL table. This is for a Wordpress theme. Here's the gist of the code: $user_id = $_COOKIE['user-id']; $wpdb->insert($custom_table,array('user_id'=>$user_id)); The type of the 'user_id' field of $custom_table is int(15). I'm currently test...
stackexchange/codereview
I am getting an exception in Tomcat stating the following: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 6 in the generated java file Only a type can be imported. business.User resolves to a package An error occurred at line: 12 in the jsp file: /join_email_list.jsp U...
stackexchange/codereview
I'm totally new to ajax, but pretty good with PHP. I have a PHP page which currently refreshes every 2 minutes because it has to check for new data in the sql database. It's pretty annoying if you're using it and it keeps refreshing. The database is updated about 3 times a day, but what is shown on that page needs to b...
stackexchange/codereview
i'm doing api calls from php backend like this: $term = "AT&T Park"; $q = '"'. urlencode($term) .'"'; $url = "http://search.twitter.com/search.json?q={$q}&rpp=100"; $api_call = file_get_contents($url); it's not returning anything, but same api call working just fine on my terminal. here is a li...
stackexchange/codereview
I have a ListBox which has its ViewModel - let's call it ListBoxViewModel. List box has ItemsSource="{Binding MyItems}" attribute which corresponds to ObservableCollection<MyItemType> in ListBoxViewModel. ListBox has its ItemTemplate which creates MyItemControl controls in ListBox. The question is that I expect that My...
stackexchange/codereview
Here is the String, for example: "Apple" and I would like to add zero to fill in 8 chars: "000Apple" How can I do so?
stackexchange/codereview
PHP regular expression script to remove anything that is not a alphabetical letter or number 0 to 9 and replace space to a hyphen - change to lowercase make sure there is only one hyphen - between words no -- or --- etc. For example: Example: The quick brown fox jumped Result: the-quick-brown-fox-jumped Example: The qu...
stackexchange/codereview
Please bear with me on this, this is quite difficult to explain and I am not sure if I am using the correct terminology. I need to do a rather complicated select. It is effectively a select statement which conditionally decides what field to use to filter the select. If a certain date field is not null, I need to chec...
stackexchange/codereview
I basically want a dispatcher timer object to only execute once. So I have the basic code: DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 4); dispatcherTimer.Start(); Then inside the click event: pr...
stackexchange/codereview
My purpose is to setup a forum in php just locally on my Windows 7 machine to test how it works. I have installed Apache HTTP Server and PHP v5 successfully. Then I downloaded and extracted the phpbb-forum software and put it in my root folder. Then I realized that I needed some kind of database so I downloaded and in...
stackexchange/codereview
We have a couple of private "Enterprise Services" DLLS that are used in all our Websites for authentication, logging, etc. Since they are private, we also control the versioning and source of these DLLs. Our historic (error prone) steps after creating File | New Project include Add the "Enterprise Services" project ...
stackexchange/codereview
I asked similar question here , I am wondering how you can achieve same result with LINQ PREVIOUS QUESTION Compare Dictionary Rules Get values from dic2 where key match but values does not match or key is missing in dic2. Don’t need to iterate through dic2 for missing/different values in dic1. LINQ CODE can result a...
stackexchange/codereview
I suddenly wonder.. for the home page which points to controller => pages action => display and home... where do i write the controller logic ?
stackexchange/codereview
create table Autorzy(ID int, imie varchar, nazwisko varchar); create table Wydawnictwa(ID int, nazwa varchar, adres varchar, tel varchar); create table Ksiazki(ID int, ISBN bigint, wydawnictwo_id int, data date, ilosc int, tytul varchar); create table KsiazkaAutor(ID int, autor_id int, ksiazka_id int); create table Rec...
stackexchange/codereview
Hello i want in the moment i select a value to post to the process.php page . I have this code: <select name="sweets" id="sweets" > <option value="1">Chocolate</option> <option value="2">Taffy</option> <option value="3">Fudge</option> <option value="4">Cookie</option> and jquery: $("#sweets").change(function () ...
stackexchange/codereview
I have 3 applications running at my end. RootSite RootSite/VirtualDirectory1 RootSite/VirtualDirectory2 I have a login page in three of these applications. When I login in either of these applications the .ASPXAUTH cookie is set but I am seeing that all of the three applications are updating the same .ASPXAUTH cook...
stackexchange/codereview
I have small problem with a simple tokenizer regex: def test_tokenizer_regex_limit string = '<p>a</p>' * 400 tokens = string.scan(/(<\s*tag:.*?\/?>)|((?:[^<]|\<(?!\s*tag:.*?\/?>))+)/) end Basically it runs through the text and gets pairs of [ matched_tag , other_text ]. Here's an example: http://rubular.com/r/f8...
stackexchange/codereview
I'm trying to launch a MacOSX app from a website and pass an authentication token from the web server. I'm trying to do something like myNewURLScheme://myauthtoken (similar to the iTunes itms:// URLs) but this doesn't seem to work. (Admittedly, I'm probably doing it wrong.) Is this the best way to do it? (If not what...
stackexchange/codereview
The information on the Marketplace website and Google Checkout isn't completely clear to me. Is google going to make a deposit to my bank account from Google Checkout for every app I sell, or will it all sit in my Google Checkout account until I decide to move it to my bank? It would seem silly to do the first because ...
stackexchange/codereview
I would like to know the following: Cloneable means we can have a clone or a copy of objects, by implementing the Cloneable interface. What are the advantages and disadvantages of doing that? How does the recursive cloning happen if the object is a composite object?
stackexchange/codereview
I have a set of text boxes and html editors in my form. I am not able to set the proper tab index. The tab index moves from the first text box and skips all the controls in between and reaches the last html editor and the third tab takes me to the address bar and then it moves randomly all over the controls. I now want...
stackexchange/codereview
I am trying to get the following to work: On the first installation of a program, it modifies the environment variables of the system, and therefore you must restart in order for the program to fully work. Doing this in WiX is fairly straight forward, you just schedule a reboot: <InstallExecuteSequence> <ScheduleRe...
stackexchange/codereview
A client has an iOS app that makes fairly heavy use of UiWebViews (with javascript running in them). About 50% of the logic and UI is done with WebViews, the rest is objective-c. He's now interested in having the app ported to be a Mac app as well (because he thinks it would be good as a $2 app in the app store, when...
stackexchange/codereview
Is it safe to assume that all bots' user agents always have URLs in the user agent strings? I, of course, compare the user agent against the list of bots, but the idea here to do a preliminary check before check it against a long list. Perhaps if I could reword my question better, is there any valid non-bot, non-crawle...
stackexchange/codereview
I'm converting a csv file to xml using the following function: I want to repeat the same action if $records[$row] value is the same as the previous time that it looped through. How can I accomplish this? while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); $records[] = $data; $stringDa...
stackexchange/codereview
I've got a receiver set up in my android application to catch android.intent.action.NOTIFICATION_REMOVE intents. On my Evo, it works fine - when a notification is cleared from the notification bar, I catch that event and can run some code. I tried running this on a Samsung Moment though, and it is never caught. So n...
stackexchange/codereview
Anyone knows why the font of this elements are not the same? Using Anchor Element <a style="font-weight: bold; ">bold</a> Using Input Button <input type="submit" value="bold" style="font-weight:bold; border: none; background-color: transparent" />
stackexchange/codereview
I would like to each time the div expands, to add the class 'selecionado' once the expansion is finished. When the contraction is done (the slideUp part) I would like to remove this class. Can I have a help here please? $('#btCategoriaA').click(function() { $('#listaCategoriaA').slideToggle('slow', function() { $...
stackexchange/codereview
Once I receive my access token for a site (say facebook) using OAuth, how important is it to keep this secret? Could anything malicious happen if someone got a hold of one? I was wondering if it would be a bad idea to save the token in a cookie or session.
stackexchange/codereview
I am using Box2D for physics for a game I am making, and I wanted to see if there was a way to use Box2D so that a could take a rectangle and see if it collide with another rectangle without it doing any actual physics. Example: bool RectInRect(rect p1, rect p2) { bool result = Box2D_do_rect_stuff(); return re...
stackexchange/codereview
I want to shorten comments with long text and add a "... [show full post]" behind the cut text to expand the full post. Since long comments on my site usually are lists it may be best to cut them after e.g. 5 rows inside the comment div, but without breaking the html, i.e. the p tag. <html> <head> <style type="text/cs...
stackexchange/codereview
If you download this sample (ipad): http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html and you set a breakpoint at numberOfRowsInSection and also at cellForRowAtIndexPath and you start in landscape then i have the following question: First: the app comes twice in numberOfRows...
stackexchange/codereview
Amazon's Virtual Private Cloud (Amazon VPC) allows me to open a VPN connection to the EC2 cluster. It looks like the number of EC2 instances you can run within a virtual private cloud is 24 hosts - is that correct?
stackexchange/codereview
I am looking to have a video start when a page loads, but once the video has completed, to hide the video (remove the layer possibly). I saw it on a yoga site a few years ago where a video message from the owner appeared over top the content when the page loaded but then dissapeared after the video was done. Not even s...
stackexchange/codereview
module Main where import Control.Parallel(par,pseq) import Text.Printf import Control.Exception import System.CPUTime import Data.List import IO import Data.Char import Control.DeepSeq time :: IO t -> IO t time a = do start <- getCPUTime v <- a end <- getCPUTime let diff = (fromIntegral (end - start)) / (...
stackexchange/codereview
Okay, so now I am confronted with a new problem, and I just don't know what to do next. I have a table where the contents of it is dynamically added from a database on page load, and each item in the table is a link. The link looks like this: $ct->data[$key][3]='<a href="allthread.php?sessid='.SID.'&product='.$ct->data...
stackexchange/codereview
I have two pages in my .net website One is the default.aspx and the other is the login.aspx default.aspx is just a blank page, which is used for redirecting to the login.aspx page In login.aspx, I have a textbox and a javascript onfocus event on that texbox. (There is only an alert method in the javascript function) If...
stackexchange/codereview
On http://caml.inria.fr/download.en.html I can only find the version 3.11.0 for Windows 32. Is there a precompiled OCaml 3.12.0 for Windows 64?
stackexchange/codereview
I have a multi-table setup to handle online purchase transactions. The main table I'm getting data from is a purchase activity table. It contains ShipAcctID, which connects it to an addresses table, and AcctID, which connects it to a users table - sort of. The AcctID field is a reference to the user's account ID, which...
stackexchange/codereview
I was on the point of start using AS3 Signals for my new project because Native Events has a bad reputation, and then I found this: http://code.google.com/p/nineveh-responder/ But I couldn't find more information (in addition to official docs and tuts). What do you think about NResponder? OT: I can't create the tag "NR...
stackexchange/codereview
I need to create a view from several tables. One of the columns in the view will have to be composed out of a number of rows from one of the table as a string with comma-separated values. Here is a simplified example of what I want to do. Customers: CustomerId int CustomerName VARCHAR(100) Orders: CustomerId int Order...
stackexchange/codereview
I have already set the option 'cache: true', but the cache seems only work in IE, but not in Firefox and Chrome. Is that a known issue?
stackexchange/codereview
I have a string that may contain numbers as well as upper and lower case letters. I need to convert all the uppercase letters to lowercase and vice versa. How would one go about this?
stackexchange/codereview
I have encountered a strange problem where if I call getString(R.string.somestringname), from time to time, even after deleting the R file and recompiling, the incorrect string appears. The emulator is not crashing and a valid string is appearing - it's just the wrong one. A sample of my strings.xml: <?xml version="1.0...
stackexchange/codereview
I can install the GetBundles bundle, but when I click on it (Bundles > GetBundles > GetBundles), nothing happens. I've followed multiple guides, and they all lead me to the same situation. Here's an example of one such guide: http://solutions.treypiepmeier.com/2009/02/25/installing-getbundles-on-a-fresh-copy-of-textma...
stackexchange/codereview
createnamedpipe not working in win 7 .how to change security attributes using c# [StructLayout(LayoutKind.Sequential)] private struct SECURITY_ATTRIBUTES { public int nLength; public IntPtr lpSecurityDescriptor; public int bInheritHandle; } public bool Create...
stackexchange/codereview
i am looking for an algorithm ( in pseudo code) that generates the 3d coordinates of a sphere mesh like this: the number of horizontal and lateral slices should be configurable
stackexchange/codereview
I need to rebrand my application, that means create another application resource file with different strings, slash screen and icons. My application is also localized for a second language, i have another resource file with all application string which is translated, that creates me additional, satellite dll. I need to...
stackexchange/codereview
I'm sure there's a way to get a human friendly description of a file's extension in objective-c - cocoa. For example: given an extension "pdf" to get "Portable Document Format", or given "app" -> "Application", or "txt" -> "Plain Text", etc.
stackexchange/codereview
I have a log4j appender defined like: log4j.logger.com.example = DEBUG, filelog log4j.appender.filelog=org.apache.log4j.DailyRollingFileAppender log4j.appender.filelog.File=c:/app.log log4j.appender.filelog.layout=org.apache.log4j.PatternLayout log4j.appender.filelog.layout.ConversionPattern=%d | %m%n log4j.appender.f...
stackexchange/codereview
I have a repeater control in my page. I need to have a radio button in all the rows(Item template) on checking an radio button the remaining radio buttons must unchecked. How to do this? Thanks in advance, Tor
stackexchange/codereview
I have Silverlight application that is using an embedded font. The font works as expected 98% of the time. However, some of the time the font never loads. I don't get any errors, it just renders all text in a fall back font. Has anyone else run into this? Any ideas on what could be causing it?
stackexchange/codereview
I just finished a project with rails 2.3.8. Client won't pay for the migration, so I want to keep it as is. I want to start a new project, which is to build my own homepage. Want to use similar tools but want to go to rails 3.0. Can these versions co-exist on the same machine? If yes, what do I need to do? Found few pa...
stackexchange/codereview
I'm using Factory Girl/Rspec2/Rails 3. In factories.rb, I have: Factory.define :user do |user| user.name 'Some guy' user.email 'some_guy@somewhere.org' user.password 'password' end Factory.define :org_admin, :parent => :user do |user| user.email 'org_admin@somehwere.org' end Factory.define :user_...
stackexchange/codereview
If I have the list: lista=[99, True, "Una Lista", [1,3]] What does the following expression mean? mi_var = lista[0:4:2]
stackexchange/codereview
suppose i want to use javascript to add the following css p:before{content:"Q: "} how can that be done? I tried the following but they don't work. myEle.style.:before='content: "Q: "'; myEle.style.content="Q: "; in general, how do change the value of css pseudo-selectors? such as a:visited, a:link.
stackexchange/codereview
Objective-C's runtime seems to be rather robust, so I was wondering if there's a way to log the name of the function that called the current function (for debugging purposes). My situation is that a bunch of things assign to a property, and rather than set a breakpoint and examine the call stack each time, I'd like to ...
stackexchange/codereview
Hi Guys I have installed LAMP server on suse linux on Amazon. Here is the server info Basic 32-bit Amazon Linux AMI 1.0 (AMI Id: ami-08728661) Amazon Linux AMI Base 1.0, EBS boot, 32-bit architecture with Amazon EC2 AMI Tools. I am trying to pass some special charters through a URL to PHP script but am not able to get ...
stackexchange/codereview
I'd like to produce cross-compiler compatible C++ code. I've produced a somewhat "exotic" code, that push the C++ language in its gray, weird, mysterious areas. Considering my code only depends on boost and the STL, that the issue is to check code compatibility, and not lib compatibility: Would my code compiling both m...
stackexchange/codereview
I have the following in an xml variable @ResultData <EntityKey_x005B__x005D_> <EntityKey> <KeyData xmlns="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey"> <KeyField> <Field>JournalNum</Field> <Value>LJRN000071</Value> </KeyField> </KeyData> </EntityKey> <Enti...
stackexchange/codereview
I am beating my head against the wall on this one. I want to make a simple select tag using the f.select tag but nothing I do works. I put an example below: <%= f.select(:object_field, ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 4'], :class => 'my_style_class')%> Ok, so basically it is a simple list that once the f...
stackexchange/codereview
I've just upgraded to Rails 3, using the instructions from this railscast. When I try to start the server, this is what happens: $ rails s script/rails:6:in `require': no such file to load -- rails/commands (LoadError) from script/rails:6:in `<main>' I can't find this exact error using Google. Anyone know what is ...
stackexchange/codereview
Here's the thing: I need to take a certain Java EE web app and deploy it to Amazon EC2 (which I will need to setup first) starting next month (using the http://aws.amazon.com/free/faqs/ AWS Free Tier Usage - hope it supports Tomcat + MySQL/PostgreSQL). The problem: I have never ever deployed a Java EE app (not even a n...
stackexchange/codereview
I have a simple user control which wraps some logic around an AutoCompleteBox. This question could apply to any ItemsControl control like a dropdown or listbox though. <UserControl> <Grid Background="White"> <sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding myData}" /> </Grid> </UserControl> I wa...
stackexchange/codereview
I have a mapview and i wish to display a ContextMenu when longclick but so far the closest solution i've found is here on anddev , the main reason i do not like that method is because any click activate the ContextMenu instead of a long click. Question: Is there a way to display the ContextMenu of a Map without using ...
stackexchange/codereview
How do i make my program to wait until webpage finish loading before executing next statement. I tried Process::WaitForInputIdle(); but it doesn't wait. ProcessStartInfo pInfo = new ProcessStartInfo("firefox.exe"); pInfo.Arguments = "http://example.com"; Process p = Process.Start(pInfo); p.WaitForInputIdle(); pInf...
stackexchange/codereview
In VB6, when referencing a .NET component, why can't I reference the DLL? Why do I have to reference the .TLB file?
stackexchange/codereview
I have been reading through a lot of things trying to figure out what I am doing wrong. I have been trying to add 4 UITextFields inside of UITableView cells. I have the UITextFields created through IB, as well as the UITableView. I add the textfields to a NSMutableArray and then in the cellForRowAtIndexPath I am adding...
stackexchange/codereview
I'm trying to place a UIPopoverController to display when a UIButton is tapped. However, the UIButton is placed within a UIScrollView and so its frame is offset by the scroll amount. Is there an easy way of finding out a view's frame as it appears in the context of the screen? Or do I just need to do a subtraction betw...
stackexchange/codereview
I have the next array: Array( [id] => 1 [children] => Array( [2] => Array( [id] => 2 [inactive] => true [children] => Array( [4] => Array( [id] => 4 [children] => Array() ) ) ) [3] => array( [id] =...
stackexchange/codereview
I made a usercontrol that contains a togglebutton. When the user clicks on it, it shows a fullscreen-sized popup. I want to add the following functionality: when the user presses the hardware back button and the popup is opened, close the popup. The problem is that only the parent page of the usercontrol has backkeypre...
stackexchange/codereview
I've to do a memo card game in android for my project. As for now i'm at the stage where i try to figure out the basic shape of my app. I've read some tutorials, but i can;t figure out how to modify a lot of dynamically created buttons (ie. in 'for' loop), from xml, or even from the code. To make my question clear here...
stackexchange/codereview
According to w3c </TD> and </TR> tags are optional, so the following table is perfectly valid. <table> <tr> <td>google <td>chrome </table> And all browsers I've tested it with render the table fine. I just wanted to ask if this is generally considered safe to use, or if older browsers, which I don't have acc...
stackexchange/codereview
I have a few linux server and want to monitoring their resources from my windows desktop computer. It'd be great if the application is/have/can (etc...); easy-to-use. widget-like looking on desktop. warning on high resource using.
stackexchange/codereview
I would like to make a list to show the user´s friends, that are online. users id | firstname | lastname | last_access users_friends uID | bID | type | accepted That is how my tabels look like. Firstly I have the user´s id in $USER. The $USER´s id is stored in a row, in users_friends, at column "uID". bID is the id...
stackexchange/codereview
Is there any implementation of blocking queue which guarantees fair take() operation if multiple consumers are removing element from the same queue. I checked LinkedBlockingQueue, LinkedTransferQueue and looks like both of them are unfair. ArrayBlockingQueue provides fair operation but its bounded.
stackexchange/codereview
It's possible to bind more than one signal to one slot (isn't?). So, is there a way to understand which widget sends the signal? I'm looking for something like sender argument of events in .NET
stackexchange/codereview
I have a web application that runs text processing jobs in the background once a message is received on an ActiveMQ which is listened to by a Spring MessageListener....the problem I"m encountering is that once I process around 30 background jobs, ActiveMQ stops processing any messages, Spring message listener loses its...
stackexchange/codereview
I have a generated post script file and want to print using it. How can it be achieved in java either using javax print API or AWT. Is it possible?
stackexchange/codereview
hi I have a question I'am using for my web site wscf in vs2010 that use de model MVP(model,view,presenter) and for my model layer (data acces layer) iam using EF that seguimiento's tables is an intermediate table between be cliente and gventa tables so I have my Insert in seguimiento's table with L2E in my (DAL LAYER)l...
stackexchange/codereview
There is a database table for logging purpose only so old records are useless. Is there an easy way to automatically delete old records and keep most recent records only (say, records created in last 7 days, or, the latest 1 million records). The table uses MyISAM engine and have a timestamp column but do not have prim...
stackexchange/codereview
how can I split a sequence of numbers into subgroups of numbers and get the local minimum and maximum of the subgroups with linq? If I have a sequence of, lets say 11 items { 3, 2, 5, 9, 9, 6, 7, 2, 5, 11, 2 } I want to split this into subgroups with 3 or less items. So I get the following 4 subgroups: { 3, 2, 5 } , ...
stackexchange/codereview
I have used Yii::app()->user->returnUrl but it always redirect me to localhost/index.php. Is there any particular configuration or some pieces of code that other programs that I must write? If you have another solutions let me know it.
stackexchange/codereview
In our case we have some business logic that looks into several tables in a certain order, so that the first non null value from one table is used. While the look up is not hard, but it does take several lines of SQL code to accomplish. I have read about scalar valued functions in SQL Server, but don't know if the re-c...
stackexchange/codereview
using regular expression for searching phrase in the file So... Task: I have some phrase. the phrase contains 2 words. Phrase is devided into two words with next symbols: [\s]* How can i find the phrase using regular expression? This code doesn't work on a file: // file: Main.java class Main { } ...
stackexchange/codereview
I have a stored procedure that adds an object to the database and returns the generated ID number. For reference, its basic structure goes something like this: ALTER PROCEDURE [dbo].[myProc] @Name nvarchar(50), @Creator nvarchar(50), @Text nvarchar(200), @Lat float, @Lon float, @m...
stackexchange/codereview
I'm trying to put tag into JQuery-ui dialog widget. Due to some other problems i need to load this from server as ajax call. Returned is: <div id="ajax-body"> give gift <fb:serverFbml width="650px"> <script type="text/fbml"> <center> <fb:request-form action="${shareGiftUrl}" type="Podíl na Zlaté so...
stackexchange/codereview
i'm having trouble getting the date to be imported into mysql from my form. my form is validated so that the input will always be dd/mm/yyyy i'm currently using $date = date('Y/m/d', strtotime($_POST['night_attending'])); this takes the value from the form and assigns it the year/month/day the problem is that its rea...
stackexchange/codereview
I have this code in C: int main(){ char a[10]; _asm{ mov DWORD PTR[a],eax;} This works well, but why do I actually need the DWORD PTR When the DWORD size is already stated by using eax? IAnd for destination, I dont need any size whe I have pointer, right? Thanks.
stackexchange/codereview
I'm new to yacc/lex and I'm working on a parser that was written by someone else. I notice that when an undefined token is found, the parser returns an error and stops. Is there a simple way to just make it ignore completely lines that it cannot parse and just move on to the next one?
stackexchange/codereview
Say I have a function like this: -(void)activateDict:(NSNumber*)dictID{ } Then I add a action for my button: [aBtn addTarget:self action:@selector(activateDict) forControlEvents:UIControlEventTouchUpInside]; There is a parameter in the activateDict function, which is (NSNumber*)dictID, so when I add the action to bu...
stackexchange/codereview
I wish to build up a website that follows the RESTful architecture. In my site, each user is identified by a permanent username and may manage their own settings. For the settings resource, I'm torn between two URI designs. Option 1: /users/{username}/settings Here is a generic settings resource URL pattern. Only the l...
stackexchange/codereview
I have been trying to understand the MapReduce concept and apply it to my current situation. What is my situation? Well, I have an ETL tool here, in which data transformation happens outside of source and destination data sources (databases). Hence,the source data source is purely used for extract and destination for l...
stackexchange/codereview
I am just confused with a concept. I have been hearing about Ruby as a programing language. Now, many companies/individuals have developed JRuby, which is Ruby implementaion for Java and Jython, which is Ruby implemtation for Python. Can anyone please explain me, how exactly one programming language can be implemented...
stackexchange/codereview
Is it possible to have a div tag that has 1px black borders and a transparent background, so only the borders are showing? is this possible? Any examples? A really appreciate it. Erik
stackexchange/codereview
I use an tooltip. When I hide the native browser function for the tooltip function, (remote Attr title), after an Ajax update there is no content at all! How can I fix this? jQuery('.tooltip').each(function(){ $(this).data('title',$(this).attr('title')); $(this).removeAttr('title'); jQuery(this).hover(functio...
stackexchange/codereview
I am trying to implement serialization for an email application on the android (stroring username, password, server etc.), but in order to test it I have to close the application in the emulator and then re-open it to ensure that it looks and finds the file with the serialized objects. The problem is that when I close...
stackexchange/codereview
How can I match a url like that: 1/2/3/ it means: 1 = http:// www.mysite.com 2 = may be mypage or my-page 3 = may be myparam1 or myparam-1 or my-param-1 --> 1 should be pre-defined --> 2 and 3 may contain only letters or alphanumeric or alphanumeric plus one hyphen or two (-) I need a reqular expression to use with ht...
stackexchange/codereview
Recently, I was asked to implement a class as part of a selection process. I did the program as requested. However, I failed in the test. I am really curious to know what is wrong in my solution. Any help is much appreciated. The question and my solution are given below Question: Implement a thread safe class which fi...
stackexchange/codereview
How can I use jQuery UI buttons style for my ASP.NET buttons? How can I do it in my Skin or some other way?
stackexchange/codereview