instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a Chequing account and a Saving account. I'm exploring how to implement the withdraw method using a Strategy pattern.
Currently, the Chequing and Saving account both inherit from Account. For Saving account, withdrawals should not cause the balance to dip below 100 dollars. With the Chequing account, withdra... | stackexchange/codereview |
I have a partial view that I render on my Home/Index page. Its a short form with a viewmodel for and annotations for validation.
It calls the controller and upon failure(since I don't type anything in and I have [Required] tags in my view model) it re-renders the partial view as a new page.
My question is do I have t... | stackexchange/codereview |
my problem is that I want to have the color of the #promocion area (where the hands animation show) to be equal in height to my Main content area (Fluid, kinda new here and don't know how to do this).
I try to do a height 100% in #promocion but doesn't work in IE...
Check out my CSS & website just a sec...
Thank you fo... | stackexchange/codereview |
Consider an ASP.NET MVC 2 web application project that uses EF4 POCO entities and the repository pattern to store information in a SQL Server database. So far there are 3 projects, 4 if you count the database:
1.) Domain.dll, has no dependencies, exposes POCO's and repository interfaces.
2.) Storage.dll, depends on Do... | stackexchange/codereview |
I am currently writing a Particle System using XNA. What I'd like to do is use an external file (XML for example) and be able to modify this file, whilst the application is running, and once saved, the changes will be reflected in the Particle System.
My original proposal:
Use a FileWatcher (can't remember the exact c... | stackexchange/codereview |
I have always been taught to almost never to use goto statements in programming. However we are required to do so as part of my most recent programming project. I have an if/else statement with various goto statements, and the goto statements are failing to execute. I have no idea why. Any help would be appreciated.
... | stackexchange/codereview |
I'm specifing the size of the windows within the window.open(),
but regardless of the size, I would like this label to be exactly on the center of the screen (vertically and horizontally):
<?xml version="1.0" encoding="UTF-8"?>
<window sizemode="maximized" hidechrome="true" id="weatherWindow" title="Window"
xmlns=... | stackexchange/codereview |
Using the google-api-java-client I have gathered that the library parses the xml based on the classes you create and the keys you make. For example: if you have the following XML:
<entry test="ok">
<link name="somewhere.org"/>
</entry>
Then you could have these two classes:
public class Entry
{
@Key("@test")
publ... | stackexchange/codereview |
I'm trying to run the following in the main of my java class. The code uses the stub to first authenticate and then bring back the collection of lists in a microsoft sharepoint site.
The code is as follows:
ListsStub stub = new ListsStub();
HttpTransportProperties.Authenticator auth = new HttpT
ransportP... | stackexchange/codereview |
I have several Products - Plants relationships that I need to create tables in SQL SERVER. A product (around 8000) is manufactured in all 8 Plants but rarely (3-4 products out of 8000) a Product is manufactured in one/two Plants.
I am thinking to implement relation-ship in either of two ways. (I know 1st approach is be... | stackexchange/codereview |
In my organization, we have a couple of internally developed Python packages. For sake of example, let's call them Foo and Bar. Both are developed in separate Git repositories. Foo is a Pylons application that uses certain library functions from Bar. Neither is publicly distributed.
When we deploy Foo, we typically exp... | stackexchange/codereview |
I need to compute power (10, n)
Is it OK to use Math.Pow (10, n)?
Or should I use a loop?
for (int i = 0; i < n; i++){
x*=10;
}
Which one is better? and why?
| stackexchange/codereview |
Whenever I require a file in ruby or irb I get this error:
LoadError: no such file to load -- (insert any filename).rb
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from /usr/bin/irb1.9.1:12:in `<main>'
It happens ev... | stackexchange/codereview |
Is it possible to configure tkinter or ttk widgets (Label, Entry, Text) with a transparent background so that they can be placed in containers with custom background colors or on top of canvas graphics or images?
I'm also looking for a way to change the background color of a ttk Frame widget?
Do I need to use the new t... | stackexchange/codereview |
I mean when the Dialog pop up, some files according to the filer are in selected state.
Does QFileDialog has a way to do this?
| stackexchange/codereview |
I know this has been asked before, but I'm still undecided on which PDF generation framework to use for my current project.
My requirements
on-the-fly generation of PDF documents (mainly order forms, invoices)
Java based
easy to layout
should be open source
easy to change layout
A lot of people seem to use iText, bu... | stackexchange/codereview |
In a Extjs application, I want to load different values for a combobox editor of a column in editor grid panel. The values would typically come from a server call. How to do this?
| stackexchange/codereview |
I have requirement where on selecting radio button in the main table a child table has to appear below. Any help?
Thanks for the reply, this is my actual requirement.I have two tables Item attributes and Item attributes values. Onclicking Item attributes (i.e)e.g: ticket height checkbox the child table of ticket hei... | stackexchange/codereview |
Hey all, have managed to finish the database; but have run into a problem with something I did in the beginning. Basically, the calculations in the database are done using VBA code. Now I've run into a problem where instead of slecting just the last two years worth of data, it is now slecting and using data from more t... | stackexchange/codereview |
The Academic license of Pex seems to come only in a 32 bit version.
Is there a 64 bit version?
| stackexchange/codereview |
I want this code to represent symbols and not numbers (A, O, X)?
Can someone give me a simple code to make the numbers into symbols? Thanks
int game[3][3];
int x, y;
int lines = 0;
// select a random grid
srand(time(0));
for(x = 0; x < 3; x++) {
for(y = 0; y < 3; y++) {
game[x][y] = rand() % 3;
cout << gam... | stackexchange/codereview |
How can I use/implement the new Graph API from facebook in iOS programming (objective C)? Also parsing the JSON file returned by the API? I can't seem to find any examples out there. Facebook resources doesn't give too many details on iOS development.
| stackexchange/codereview |
I am trying to stream data from a laptop to native code in an android
phone.
Am able to pair with laptop and get data for sometime, but the native
code crashes with the following message later:
"failed adding to JNI pinned array ref table".
Code snippet:
// Java code for Bluetooth read handler
case MESSAGE_READ:
... | stackexchange/codereview |
I am getting the following two errors when trying to publish my site to filesystem in visual studio 2010,
Error 14 Copying file obj\Release\Package\PackageTmp\Areas\Admin\Scripts\homescroller.js to obj\Debug\Package\PackageTmp\obj\Release\Package\PackageTmp\Areas\Admin\Scripts\homescroller.js failed. Could not find ... | stackexchange/codereview |
What are the pros and cons of each? Is there a difference?
CSS Stylesheets in HTML.
| stackexchange/codereview |
Is it possible to get gdb to disassemble machine code interactively. For example:
(gdb) [disassemble command] 0x58 0xef 0x22
If I give the above command gdb should interpret the hex values as machine code and give me back the disassembly. The commands which I know of only disassemble a portion of the memory of the load... | stackexchange/codereview |
I know you can do multiple backgrounds on a single <div> in CSS3, but is it possible to mix an image-referencing background (i.e. url(...)) with a gradient generating background (e.g. -moz-linear-gradient(...))?
If so, what is the syntax?
If not, what is a best-practice to achieve the same result?
Thanks.
| stackexchange/codereview |
The android NDK supports c++, but does it support c++ classes??
If so can you give a simple example and the steps needed to implement the class with the java source.
| stackexchange/codereview |
I am using FileHelpers to write some data out to a CSV file. FileHelpers is great because it lets me easily format the various fields using the FileHelper converters. Here is an example of a FileHelpers DelimitedRecord:
[DelimitedRecord(",")]
public class ShippedRecord
{
public string Customer;
#quoute... | stackexchange/codereview |
I am getting a null pointer exception when trying to set up datasource in spring's tc server. Which is basically a Tomcat at its core. Here is the exception I am getting.
org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.lang.NullPointerException
at java.util.Hashtable.put(H... | stackexchange/codereview |
The Android developer guide (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) states:
`You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity, or use the tabs to change between entirely separate activities. Which method you want for your ap... | stackexchange/codereview |
I am learning GWT and i have read at multiple places that using MVP architecture is best suitable to develop a GWT Application
I have also read that its easy to do testing using the MVP ARCH.Can somebody explain me why its easy to do testing using the MVP architecture.
Also i am working on a project using MVP and i fin... | stackexchange/codereview |
How can I store the latitude and longitude coordinates of the iPhone's current location into two different float variables?
| stackexchange/codereview |
This drives me crazy, it should be easy but I can't...
I need to rewrite URLs like this ones:
www.domain.com/foo/bar/more/evenmore.htm
www.domain.com/foo/bar/more.htm
www.domain.com/foo/bar.htm
www.domain.com/foo.htm
into:
www.domain.com/?var1=foo&var2=bar&var3=more&var4=evenmore
www.domain.com/?var1=foo&var2=bar&var3... | stackexchange/codereview |
Is it possible to add TextView and ImageView on canvas?
| stackexchange/codereview |
Here is what I want to do:
<%= link_to "Approve", brand_user_brand_roles_path(@brand),
:with => "forms[0]['user_brand_role_role_id'].value", :method => "POST", :remote => true %>
I know that this doesn't work. I want to call a controller method remotely, including as a parameter a value that is selected in a field... | stackexchange/codereview |
I have this program which does not work as expected. Help me.
I want to print a row heading.
If input is 4, I want 1|2|3|4 to be output.
It does not work as all, if I hard-code $count value it works partially but the last number is missing.
sub printC {
my $count = @_;
# count = 4 # works partially onl... | stackexchange/codereview |
On my preference screen I have a preference that when clicked opens a color picker dialog. What I would like to do is when the user selects a color, that the text summary of the preference is displayed in that color.
I know I can have the summary set up like this, Currently <font color="#ff0000">this color</font> and ... | stackexchange/codereview |
I edited the form for a list item in InfoPath, and when I print, I just want to print the form itself.
It seems when I use the browser's print function, it still pulls up some elements from the page and it cuts off the content if it's longer than the popup window. Also, some of the elements of the form are hidden when ... | stackexchange/codereview |
First of all, I want to make myself clear that I do understand that there is no notion of vtables and vptrs in the C++ standard. However I think that virtually all implementations implement the virtual dispatch mechanism in pretty much the same way (correct me if I am wrong, but this isn't the main question). Also, I b... | stackexchange/codereview |
i am using declarative_authorization... when i try to access current_user, it gives me the error undefined local variable or method `current_user'... can anyone help me out..?
thnx...
| stackexchange/codereview |
As the title says, I am currently implementing the below code (well about to), is their a better way - as this seems a bit nasty.
Map<Integer, List<Objects>> allObjectsMap = newHashMap(); //guava
for(int i=1:i<myVar:i++){
Map<Integer, Objects> eachObjectMap = getMyObjectMap(i);
for(Map.Entry<Integer, Objec... | stackexchange/codereview |
When I develop with the server on my workstation I can use XDebug from my IDE and debug variables, etc.
Many times the server is on a remote machine where I have only SSH, so I only edit with vi. In that case is there a way to use XDebug? Is there a client I could use from terminal?
| stackexchange/codereview |
I want to write a rspec test that tests if correct layout is used for controller. (Actually I want to test that no layout is used :) ).
I did some googling and also Looked here Testing rendering of a given layout with RSpec & Rails
But all of this does not work for Rails3.
I have used:
controller.layout
and
controller.... | stackexchange/codereview |
I would like to not call a target in build.xml in the case that there is a certain environment variable.
Using Ant 1.7.0, the following code does not work:
<property environment="env"/>
<property name="app.mode" value="${env.APP_MODE}"/>
<target name="someTarget" unless="${app.mode}">
...
</target>
<target... | stackexchange/codereview |
I am working on a script that needs to perform an action in every sub-directory of a specific folder.
What is the most efficient way to write that?
| stackexchange/codereview |
VB.NET 2010, .NET 4
Hello,
I've looked around and can't seem to find a solution to my problem. I have an EventLog object which inherits DataGridView and has a public variable EventList which is a List(Of EventLogItem). EventLogItem has seven properties which describe the event, including Index which is set to EventLi... | stackexchange/codereview |
I'm in the process of migrating one of my projects from VS2008 to VS2010. Now that I converted all of my projects in the solution to .NET 4.0 (Client Profile) when I run the test harness, almost all tests fail with the following exception:
System.Security.VerificationException:
Operation could destabilize the
runt... | stackexchange/codereview |
I have three tables I'm getting info from: User, Field, FieldUserInput. I already know the userId which is what I use to find out what fields the user has input. Then I want to get the value of those fields that the user has input in FieldUserInput.
I first wrote this query in plain old sql but I want to use LINQ as mu... | stackexchange/codereview |
I've created the grid using tables, but can't seem to figure out how to allow the user to select a specific box in the grid. (i.e. user selects 3 boxes, each having xy coordinates, which I would need to store in a database)
Maybe I should not be using tables and instead using divs?
Any help would be appreciated.
NOTE:... | stackexchange/codereview |
Hello everyone :) I'm sorry for the long code listing, but I'm not sure exactly where I'm screwing up here. I'm writing an internal-use-only jquery plugin for editing access control lists.
A component of the ACL editor is the jqGrid plugin, which is an excellent grid implementation, which comes with it's own AJAX loadi... | stackexchange/codereview |
I wrote an android application that scans for wifi connection.
I used the following code:
public class WifiTester extends Activity {
TextView mainText;
WifiManager mainWifi;
WifiReceiver receiverWifi;
List<ScanResult> wifiList;
StringBuilder sb = new StringBuilder();
public void onCreate(Bundle savedIns... | stackexchange/codereview |
Whats the pro's and con's of creating a collection instance on the fly or beforehand, during initialisation for use later.
I have a whole bundle of threads that each need to output a buffer which is enqueued on a priority or intervalheap queue. I was wondering if it would be more effecient in c# to create, a circular ... | stackexchange/codereview |
I have a problem and was wondering if anyone could help or if it is even possible to have an algorithm for something like this.
I need to create a predictive ordering wizard. So based on previous sales, we will determine that that a certain amount of an item is required. E.g 31 apples. Now i need to work out the number... | stackexchange/codereview |
I wanna build an online project by using ASP.NET.
It is an online timetable creator which takes the information from different schools, stored them in a DB then build a timetable object for each school.
First: what type of a website/project should I use in Visual Studio 2010?
Second: how I can store the timetable objec... | stackexchange/codereview |
Now I am facing a situation that I'm building a website without mysql or any other databases.
After consideration, I choose to use Xml file for configurations and data storage (And actually I have really no choice).
My problem is that if different users read and modify the same xml file at one time, will there be any ... | stackexchange/codereview |
I have a class that inherits from X509Certificate2. I want the NotAfter property to be in UTC rather than local time. I'm pretty new to C# and was wondering if what I have below is the best way of doing it?
internal class Certificate : X509Certificate2
{
public new DateTime NotAfter
{
get { return bas... | stackexchange/codereview |
I don't know what's happening when resizing the main window, but on my laptop the SizeChanged event fires only when i release the mouse, on other computer the event fires immediately when the mouse moves, not when released. I use IE 8. And the other computer also uses IE 8.
What might be the cause of this?
| stackexchange/codereview |
i am working on some updation in Hibernate application. in which Struts and Spring used.
we do entries of .hbm file in configration file(.cfg file). but when using spring with hibernate app we do entries in application context.xml.
but i can not find configration entries in entire application.
Is there any other class... | stackexchange/codereview |
I want to change the color of UITableViewCellAccessoryCheckmark and UITextField background color where we type. I found this is not straight forward.
| stackexchange/codereview |
I am using background threads to run intense search processes in order to allow the UI to be fully accessible. After creating each bgw I update a datagridview which shows the different threads and current status. however once they complete, I have no way or at least I dont know of a way to update the status on the data... | stackexchange/codereview |
Hey gang, so I've written a swig wrapper for some C code. I'm trying to bridge the gap between scipy arrays and C arrays, which I know is messy. After a clean compilation (well...not including some warnings...) I'm getting this issue when I load the python-swig-c module:
undefined symbol: PyArray_TYPE
I've added my sw... | stackexchange/codereview |
For example:
In the database we have number representations of fields that correspond to strings in the app. We store the data as an integer for size and speed reasons. During testing we compare what's in the app with SQL statement results. The problem is that we see the numbers in the results but there are strings in ... | stackexchange/codereview |
In a Windows Phone 7 Silverlight application, I have this ListBox:
<ListBox ItemsSource="{Binding Path=Programs}" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Begin... | stackexchange/codereview |
According to this documentation ( http://java.sun.com/docs/books/jls/third_edition/html/lexical.html , 3.10.6) an OctalEscape will be converted to an unicode character. Now I have the problem, that the following code will result in a 2 byte Unicode character with wrong informations.
for (byte b : "\222".getBytes()) {
... | stackexchange/codereview |
Net solution for a website, consisting of 5 projects, and there are a few(less than 10) developers working on the solution. We deploy almost on a daily basis.
The question is, how to setup the SVN repo to support this scenario (the daily deploy), also mentioning that not every commited file should go to production, the... | stackexchange/codereview |
Can any one provide link for jquery pop window (not div element) plugin. Window should open on mouse over/click events with loading image on link before window open. No light box is required.
Example : infolink urls for advertisement
| stackexchange/codereview |
How to call a method in the bean when a JSF page is requested?
Example I have a JSF page "MyPage.jsf" and its backend bean "MyBean" and it has a method "myMethod()".
Is it possible to call the MyBean.myMethod() when MyPage.jsf is requested?
| stackexchange/codereview |
I have a file mkList.txt (but my mkList, have 100 lists with 100 numbers)
[[22,4,55,7..],[77,3,66,23..],[44,56,23,90..]...]
And
I need to know the time that Erlang uses to read the file list using
map/sort and pmap/sort. I did this:
-module(teste).
-export([teste/1]).
-import(lists, [map/2]).
-import(lib_misc, [pmap/2... | stackexchange/codereview |
Sometimes when I run my application it gives me an error that looks like:
Exception in thread "main" java.lang.NullPointerException
at com.example.myproject.Book.getTitle(Book.java:16)
at com.example.myproject.Author.getBookTitles(Author.java:25)
at com.example.myproject.Bootstrap.main(Bootstrap... | stackexchange/codereview |
UIViewController A , B.
A implements Horizontal screen , A turn to B.
how do what? cancel Horizontal screen for B.
B code :
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return NO;
}
Is not ok! Why??
Please help me ! th... | stackexchange/codereview |
I have this problem that I think would require me to do multiple(two) mapreduces to get the expected result. Is this possible in CouchDB? If not, A
are there other database engines that might support this?
| stackexchange/codereview |
I have two divs. Say div1 and div2. By default div2 is invisible.
When the user hovers over div1, I need to display div2. Now if the div2 is hovered then i need to keep displaying this div2 (even if div1 is no longer hovered), otherwise reset the div2's visibility to hidden.
How do I keep div2 visible while hovered?
| stackexchange/codereview |
I'm trying to understand more about how SSH works. I'm using Wireshark to grab the packets going between my machines (OpenSSH running on both ends). I'm stuck at the Diffie-Hellman Group Exchange Reply packet. There seems to be a length (4 Bytes) and value (1 Byte) not accounted for or not described by RFC 4419, just a... | stackexchange/codereview |
The prototype must be:
listMinPos(lst)
I'm able to write the same using two arguments, (list and index), but am not able to even think how it can be possible using only the list argument.
The following must hold:
only 1 argument (the list).
no external libraries.
function should be recursive (no 'let' inside the func... | stackexchange/codereview |
I was searching if UUID generated by cakePHP (32 char long) is faster in performance compared to auto-increment. Comparison in both inserts and Select operation.
Which one should I use UUID generated by cakePHP or by using simple auto-increment of MySQL
Here's is a case-study I found but its not specific to cakePHP
htt... | stackexchange/codereview |
I was using Visual Studio 2008 and a service based database. One day I installed Visual Studio C# Express 2010 and it automatically upgraded SQL Server to SQL Server 2008. I want to use Visual Studio 2008, but it does not support SQL Server 2008.
Please tell me how to downgrade SQL Server 2008 to SQL Server 2005, so th... | stackexchange/codereview |
I am looking for a language, or package in an existing language, that is good for specifying and drawing geometric diagrams.
For example, I would like to draw a hexagonal grid, with its dual triangular grid superimposed on it. Now, I could sit down, put some elbow grease in to work out the trig by hand and come up with... | stackexchange/codereview |
First off, sorry for my english.
I have a problem :(
I want to open the map of the city.
I can use following construction:
NSString *opMap = [[NSString alloc]
initWithFormat:@"http://maps.google.com/maps?q=new+york+21st+street"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:opMap]];
[opMap release];
... | stackexchange/codereview |
I would like to add my_path to include_path and include files relatively to my_path.
Is that enough to set the include_path using set_include_path in the main PHP file of my website, or I must do this in every PHP file ?
| stackexchange/codereview |
How does one display a 'star shaped' bullet point on the iTunes Connect app description page
Thanks
| stackexchange/codereview |
Recently I've been assigned a bug to fix, which from my point of view, was actually a change request. After some investigation it turned out that this bug was caused by a defect in business requirements, but it was still considered as a bug.
I often see change requests being pushed forward masqueraded as bugs. I am jus... | stackexchange/codereview |
i have boost librray 1.44.0 how can i build it?i am using visual studio 2010
thanks
| stackexchange/codereview |
I would like to create a base class that will be inherited by other objects so that they can be stored in the same container. This base class will contain a templated method that defines the function as a setter or getter used for accessing a buffer in a multithreaded system. I want to do something like this guy did ... | stackexchange/codereview |
Basically what I would like to know is if there is any way to add new 'statements' to the .net based languages?
An example of what I'm looking for would be something like introducing a public class MyClass decoratorOf ClassWithLotsOfMethods and in pre-compile time changing that to be a normal class that overrides every... | stackexchange/codereview |
this is my input field:$("<td class='testclass'><input id='field-search' value='' type='text'></td>")
How do I get the value of the input field?
I tried it this way:
var mytest =$('#field-search').val();
alert(mytest);
The result is that I get an alert being undefined though the input field has got a value e.g. 10.
Is... | stackexchange/codereview |
I am updating a smart card application (.net 2 using winscard.dll) to run on Windows 7. Only minor changes are required for 32bit. Under 64bit there appears to be a hang calling SCardConnectA - it sits and does not return. Stopping the smart card service/removing the card allows the application to complete.
The .net ap... | stackexchange/codereview |
I use Entity Framework 4.
How can I perform a Generic Where Lambda Clause.?
I Have many Entity that need the same Where Query.
public Func<SupplierTypeText, bool> GetLmbLang()
{
return (p => p.LangID == 1);
}
public Func<ProductText, bool> GetLmbLang()
{
return (p => p.LangID == 1);
}
public Func<CategoryTe... | stackexchange/codereview |
I am working on making my client open another program by downloading the bytes and using reflection to open it. I have currently got this working on a C# Console Application, but when I try and do it on a Windows Form Application I get this error.
"Exception has been thrown by the target of an invocation."
Here is the ... | stackexchange/codereview |
How can I animate UILabel to disappear like the text would be cleaned from blackboard? The animation is like hiding pieces of text rectangle with couple shape animations. Is it possible with Core Animation? I don't really want OpenGL.
| stackexchange/codereview |
I was trying to find a gem or plugin that had a cool looking calendar control.
Is there anything that someone can recommend?
Is there a way to display a set from 2 different months like dec. 11 - jan. 11?
| stackexchange/codereview |
Ok basically I'm writing a program that takes in two directories and processes them based on what options are supplied. Thing is it's giving me segmentation errors at times when I don't see a problem. The code that is causing the problem is the following:
EDIT: Update the code to include my entire source file
#include ... | stackexchange/codereview |
I've only been working with Boost.Spirit (from Boost 1.44) for three days, trying to parse raw e-mail messages by way of the exact grammar in RFC2822. I thought I was starting to understand it and get somewhere, but then I ran into a problem:
#include <iostream>
#include <boost/spirit/include/qi.hpp>
namespace qi = bo... | stackexchange/codereview |
Has anyone gotten a silverlight socket application to run successfully over the internet? Like have a console server that listens for client. The client uses silverlight sockets where users can go on any web browser and connect to the console server.
| stackexchange/codereview |
How can I count the number of times a particular string occurs in another string. For example, this is what I am trying to do in Javascript:
var temp = "This is a string.";
alert(temp.count("is")); //should output '2'
| stackexchange/codereview |
I am using Spring 3.0.3 RestTemplate for making RESTfull call to service which is deployed in servicemix ESB. Service method returns boolean value, and am unable to receive this in RestTemplate response.
String query = "?userId="+userId;
RestTemplate rest = new RestTemplate();
Map<String, String> params = new HashMap<... | stackexchange/codereview |
About
So this question has been asked time and time again, but I noticed something a little different; see below.
Standard Info:
Bullet displays in FF
Bullet does not appear in IE
Finding
The bullet disappears when setting a hasLayout on the <ul> element, not the <li>; this is often accomplished when doing *{zoom:1}... | stackexchange/codereview |
I'm using Qt Creator.
I'm using the signals and slots editor, and I want to see the code it generates.
How can I see the code?
Thanks!
| stackexchange/codereview |
My environments are
Server Machine: DocuShare Server 6
Client Machine: Windows XP where DocuShare client 6, DocuShare outlook client 3, MS outlook 2007 and our C# application are installed.
We have a C# application to download mail message from DocuShare server using DocuShare API.
The application successfully download... | stackexchange/codereview |
In many functional languages using a recursion is considered to be a good practice. I think it is good because of the way compiler optimizes functional language's code.
But is it a good practice to use recursion in C#, when creating an algorithm? Is it right to say in regards to C#, that recursive algorithms will resu... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.