instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am relatively new to javascript and I have watched two tutorial videos by Douglas Crockford on the subject. He recommends creating object oriented design in javascript in the following way, through the use of nameless functions and closures:
function Class() {
var privateVar1,
privateVar2;
function privateMetho... | stackexchange/codereview |
I'm having a problem : i can' find a way to save properly my UITextView in a NSString.
I have created 4 UITextViews and i want them to be saved in the same file.
Heres the code :
-(void)destinataireTextView {
self.destiView = [[[UITextView alloc] initWithFrame:CGRectMake(200, 160, 150, 120)] autorelease];
[se... | stackexchange/codereview |
Well , the problem is the next :
canvas = GreenCanvas.get(0).getContext('2d');
grad = canvas.createLinearGradient(0,0,255,0);
grad.addColorStop(0, 'rgb('+r+','+0+','+b+')');
grad.addColorStop(1, 'rgb('+r+','+255+','+b+')');
canvas.fillStyle = grad;
canvas.fillRect(0,0,256,34);
256 pixels . from for e... | stackexchange/codereview |
If a function A calls n^c functions B that runs in O(n^2) time, what is the time complexity of function A? Is it just polynomial (n^c) as well as c has just gotten bigger?
| stackexchange/codereview |
Is it possible to place a viewflipper and sliding drawer in the same screen
| stackexchange/codereview |
I'm using a WebView to open some files saved to the app. Is there a way to link to the app's directory where files saved at runtime would be, in a similar way that file:///android_asset/ does? By link I mean loadUrl( *path* ) and also in the HTML markup of the file being opened <img src="*path*" />
As oppose to using... | stackexchange/codereview |
Working in Office 2007, I'd like to add a filename field in my document header. The document will later be a PDF, so I don't want the extension.
I've played with Insert -> QuickParts -> Field, to no avail. I've got a gut feeling that it requires a formula...
Thanks in advance if you can help.
| stackexchange/codereview |
I am adding more to my language using bison and in the rules i am getting a little confused.
How do i name expressions that have {} such as class, functions, switch etc VS expressions that need a semicolon at the end of them (Int i;)
I had them as typeExprWO VS typeExpr but i mixed them up having WO meaning without the... | stackexchange/codereview |
I want to extract the titles, images and text from any kind of Feed Rss ( feedburner, xml, etc ).
How can I do this with javascript ?
For example, I want to extract the stuff above from this feed:
http://feeds.mashable.com/Mashable
and from this feed:
http://casadipacheco.blogspot.com/feeds/posts/default
| stackexchange/codereview |
I'm trying to know if there's a way in ActionScript 3 to load a PNG image and make some sort of button or sensible area applicable only for the visible area of that PNG??
Maybe there's a simple way to define a polygonal area on execution time, I mean, dynamically and make it sensible to mouse events??
Thanks!
| stackexchange/codereview |
I'm looking at some open source code and trying to understand why the author has done something in a particular way.
The class is a wrapper around NSArray to create a stack data structure with push, pop, etc.
One method is topObject which returns the topmost object on the stack and its implementation is:
- (id)top {
... | stackexchange/codereview |
I'm seeing in the console:
"Unhandled error (no delegate or
delegate does not implement
didFailToReceiveAdWithError:):"
Although didFailToReceiveAdWithError is being invoked (I can see that with check points and in the console log)
Does someone has any reasonable explanation? It's like it's working and not worki... | stackexchange/codereview |
I'm building a GUI application and try to adhere to the MVC principle as good as I can.
Therefore my model fires PropertyChangeEvents with the help of PropertyChangeSupport so the GUI knows what to update when.
The model of my application is nested, i.e. I have a main model class that contains some properties or Lists ... | stackexchange/codereview |
I have a stored procedure that is called to validate a user during login.
If success it returns the user entity, and that works good! My question is if it doesn't work, I'll raise an error in the SP, How do I catch this error and use it in the best way? Right now I'm getting nullrefference, this is the code:
Store pro... | stackexchange/codereview |
I'm switching over from Eclipse to IntelliJ. In Eclipse, Ctrl+O in the editor, shows a hover popup that allows to search for a method in the class you're editing.
What is the equivalent shortcut for that in IntelliJ?
| stackexchange/codereview |
I'm trying to take a SQL Server 2008 R2 Expression db and restore it on my local SQL Server 2008 standard, however it gives me the error:
The media family on device 'C:\jtoth\Backups\ucampus.bak' is incorrectly formed. SQL Server cannot process this media family.
R2 is version 660 and standard is 655 and I know that yo... | stackexchange/codereview |
I have a school project and i want to dedicate this for New Year, the project that i came up is a Text-Firework, i am using characters and symbols as the Explosion particles, and just constantly changing their X and Y position inside Paint().
I am confused on how to use Paint and Thread together. The problem is it's n... | stackexchange/codereview |
I have a question regarding Model Binding in MVC
Say I have a simple POCO like below.
public class Person
{
public Title Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool LeadPassenger { get; set; }
}
I have a controller that passes a collection ... | stackexchange/codereview |
I have a window which has a usercontrol in it . This usercontrol's RequestObject property bound to SearchArgumentObject property of ViewModel of the window.
This is listing from my window class
<Grid DataContext="{Binding SearchArgumentObject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<guiLib:RegCardSea... | stackexchange/codereview |
I have a problem with Internet Explorer browser while reading the contents of the DIV element using jQuery('DIVID').html() method. I insert a simple XML string to the DIV element. But when I try to read the content back using jQuery, some of the data is missing. It works fine in Firefox.
My code looks as shown below.
<... | stackexchange/codereview |
In Drupal 6, how do you print a taxonomy term as a CSS body class?
I have found this snippet that lets you print almost every aspect of Drupal content as a body class, but it doesn't include taxonomy terms:
http://www.davidnewkerk.com/book/122
Being able to print taxonomy terms as a body class is essential for theming ... | stackexchange/codereview |
greetings all
i have an application which are made with Spring framework and deployed on apache,tomcat
and i see on tomcat manager that there are many un-used sessions in the application
and i want to trace when this session are created and who is creating them, how to do so ?
| stackexchange/codereview |
Here is my problem. It seems that datapicker does not show up when clicked the first time on the dynamically added input (I have to click two or more times on it or best if I click above the input (label area)), does anyone see the problem. I tried a lot of live(), bind() .hasDatapicker and #datep1 variants. If possibl... | stackexchange/codereview |
I have a grid bound to a linqed SP thus:
Session["results"] = db.spGetCaseByNumberOrSurname(txtCaseNum.Text.Trim(), null).ToList();
gvResults.DataSource = Session["results"];
on the sorting of it, i would like to be able to do this..
protected void gvResults_Sorting(object sender, GridViewSortEventArgs e)
{
... | stackexchange/codereview |
When there is no database connectivity to the application, I catch the ActiveRecord::RecordNotFound exception in the rescue_action_in_public method and try to render the page which doesn't have any database access.
When this happens, I dont want the Mysql:Error exception to be logged, because for the whole period of D... | stackexchange/codereview |
I am doing matrix operations on large matrices in my C++ program. I need to verify the results that I get, I used to use WolframAlpha for the task up until now. But my inputs are very large now, and the web interface does NOT accept such large values (textfield is limited).
I am looking for a better solution to quickly... | stackexchange/codereview |
i'm trying to use clucene-0.9.21b and libcue-1.3.0 in Qt Creator on Kubuntu Lucid. this code is compilable:
project.pro
SOURCES += main.cpp
LIBS += -lcue
INCLUDEPATH += /usr/include/libcue-1.3/libcue
main.cpp
extern "C" {
#include <libcue.h>
}
int main(int argc, char *argv[]) {
return 0;
}
so is this:
project.pro
S... | stackexchange/codereview |
So I'm sending data to my MySQL database through a HTML form.
When I send a word with special characters like "ñ" or accents "á, é, í.." and when I check the result in the tables those characters are displayed as "ã±".
I tried pretty much everything:
my html form page header has
<meta http-equiv="Content-Type" content... | stackexchange/codereview |
Anyone knows such a function in javascript?
| stackexchange/codereview |
I need to place small gap between UITableViewCell, is there way that I can achieve this?
| stackexchange/codereview |
I am using this in a method:
+ (void) getA:(NSString *)dbPath {
if (sqlite3_open([dbPath UTF8String], &database) == SQLITE_OK) {
const char *sql = "select a from a_table";
sqlite3_stmt *selectstmt;
if(sqlite3_prepare_v2(database, sql, -1, &selectstmt, NULL) == SQLITE_OK) {
whil... | stackexchange/codereview |
I am new to IPhone development. I need to take the current date from device and send to a server in JSon format. The server expects this date to be in milliseconds as since January 1, 1970, 00:00:00 GMT(Unix time) .
I have noticed IPhone has some methods to get the current time in SECONDS, well, should be very easy to... | stackexchange/codereview |
Suppose i have my mailbox configured and i have a special folder for mails with attachments in outlook 2007. What i want to do is
i. either configure outlook to save the attachment of mails coming in a specified folder (Mails with Attachments) to specific folder in my computer drive in a desired folder
ii. Or if i can... | stackexchange/codereview |
I am using Gnuwin32 binaries on a Windows environment.
When I want to find files of a certain type, let's say PDF, I usually run:
find . -iname '*.pdf' -print
This works perfectly on any UNIX system.
find.exe . -iname "*.pdf" -print
But under Windows, having replaced single quotes with double-quotes, it only works wh... | stackexchange/codereview |
I've been developing a Rails application and I've decided to implement a mixture of Test Driven Development and Behavioral Driven Development.
However the application I am building uses a web application user interface framework known as MochaUI which is built on top of the Mootools framework.
I have just finished wri... | stackexchange/codereview |
This is my unit test (it's quite meaningless but proves a point
Config entity = new Config("key", "value");
Session.SaveOrUpdate(entity);
Config config = Session.Query<Config>().SingleOrDefault(c => c.Key == "key");
Assert.IsNotNull(config);
it fails...but I don't think it should (note, if I flush it, it doesn't ... | stackexchange/codereview |
Is there any ways i can have a function inside cuda kernel. I mean my cuda kernel gets pretty long and hard to debug at one point. Thanks.
| stackexchange/codereview |
I need a way to get complete hard drive info on OS X, meaning all hard drive model names, SATA/ATA controllers, volumes, disk identifiers, etc. I checked out diskutil, but it doesn't contain SATA controller info, system_profiler has all the information I need but its XML output is not necessarily organized as well as I... | stackexchange/codereview |
I would like to know that how to change UIAlert's cancel button text during runtime.
| stackexchange/codereview |
I'm trying to parse HTML in the browser. The browser receives 2 HTML files as strings, eg. HTML1 and HTML2.
I now need to parse these "documents" just as one would parse the current document. This is why I was wondering if it is possible to create custom documents based on these HTML strings (these strings are provide... | stackexchange/codereview |
I've got following code:
$('table.tableElements thead|tbody tr').children().hover(function(){
// How can I do this ↑
});
I'd like to catch all tr's of thead OR tbody but not tfoot.
How can I do this?
| stackexchange/codereview |
What I'm wondering is, am I allowed to do this
client_db.clients[numberOfClients].sock = listener.Accept();
For my networking class I'm writing a chat client and a server that it connects to. I have an array of client objects that contains various info about each of the people connecting to the server. Before when dea... | stackexchange/codereview |
I was wondering whether it is is possible to modify a user's password using Jabber Net. If so, is there a neat way to verify first that the old password is indeed valid before modifying it to the new one?
| stackexchange/codereview |
I have a jQuery sliding panel that is not displaying a jQuery carousel within it.
Example: http://www.warface.co.uk/clients/warface.co.uk/
Click Show Dashboard to display the Sliding Panel.
I have the buttons (previous/next) displaying but not the carousel. I have added the carousel below also for example.
I have the C... | stackexchange/codereview |
I have a problem naming the elements in my application's data model.
In the application, the user has the possibility to create his own metamodel. He does so by creating entity types and a type defines which properties an entity has. However, there are three kinds of entity types:
There is always exactly one instance ... | stackexchange/codereview |
Overlap in terminology makes search for answers difficult for this one.
I'm looking for advice on the best way to implement a multiple-column display of my QuerySet that fills each column top to bottom over X columns. Meaning that the number of items in each column equals the QuerySet count divided by X (number of colu... | stackexchange/codereview |
I have a database I have created in Delphi that’s still in the testing phase
I found it easy to give access to my database through Java in the form of a *.dll
but this is not just a standard database (its very cutting edge with Nodes).
It’s taken me a lot of learning to get to this point. I very much appreciate the hel... | stackexchange/codereview |
i am trying to install a package using rpm, for which i have created a different database using rpmdb --initdb --dbpath $HOME/myrpmdb and specifying that path in the --dbpath while insatlling.
The error i am getting is
root@jason:su rpm --dbpath $HOME/myrpmdb -ivh XXX.rpm
error: Failed dependencies:
/bin/sh is needed... | stackexchange/codereview |
I am involved in migrating a legacy application built in .NET 1.1 to .NET 4.
Is UIP (User Interface Process) still available in the latest released of EnLib 5? If no, what are my options?
Regards,
Karan Misra
| stackexchange/codereview |
I need the memory usage and processing time for an application loaded through another application. I am using C#. Currently I am using Process.WorkingSet to get memory usage
similarly Process.TotalProcessTime to get time for execution, but it doesn't give any value. So have you make any suggestions?
| stackexchange/codereview |
I have three monitors.
I normally run one maximized xterm on each monitor, attached to the same GNU screen session.
Can a similar model be used for vim? Is it possible to have three vims running, all sharing the same "vim session":
Each vim window showing a different vim tab
vim settings shared between all windows
No... | stackexchange/codereview |
Hi can anybody tell how to add webview in list view in android
Thanks
| stackexchange/codereview |
I'm lost here. I'm using this script to give users the opportunity to enter their username lijke this:domain/username
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ userpage.php?user=$1 [NC,L]
</... | stackexchange/codereview |
I am trying to write a shell script that waits until the number of files in a specified directory ( say ~/fit/) has reached a predefined number. What I've got so far is:
limit = 10
while [ls ~/fit/ | wc -l -lt $limit]
do
sleep 1
done
This says -lt is an invalid option to wc. I also tried
[$limit -gt ls ~/fit/ | wc... | stackexchange/codereview |
I have an enum that looks a little bit like this:
public enum Numbers {
ONE(1), TWO(2), THREE(3);
public final int num;
public Numbers(int num) {
this.num = num;
}
}
I want to be able to convert from argument to enum, for instance from the int 1 to the enum ONE. Is there any built-in mechanism in Java En... | stackexchange/codereview |
Glut seems rather old, and SDL also as if it's not the youngest anymore - what is being used as (cross-platform) window manager for OpenGL nowadays?
| stackexchange/codereview |
I'm trying to create a cuda program that counts the number of true values (defined by non-zero values) in a long vector through a reduction algorithm. I'm getting funny results. I get either 0 or (ceil(N/threadsPerBlock)*threadsPerBlock), neither is correct.
__global__ void count_reduce_logical(int * l, int * cntl, ... | stackexchange/codereview |
I have a UIView as the container/holder view. Inside that I have a group of UIViews (icons)
Think of this as similar to the iPhone's SpringBoard- you have an SBIconList (UIView subclass) with a group of SBIcons (also UIView subclasses)
So far, each icon of my icons is draggable, but I'm having problems writing the coll... | stackexchange/codereview |
Using E4X, i can easily access nodes in XML using javascript as follows:
<script language="javascript">
xmldata = <books><book><title>AA</title></book></books>; // notice the no string quotes
alert(xmldata.book.title);
</script>
However, the application returning the data to me is returning XML as string. How can i ... | stackexchange/codereview |
I have an object which I am not sure is an NSString or not (could be NSNull, for example when reading a json into an NSDictionary) and I would like to get an NSString* if it is a valid string, nil otherwise.
Is there an accepted way of doing this except writing my own function?
+(NSString*)stringWithMaybeString:(id)may... | stackexchange/codereview |
Hello all i have one problem between 2 class of JSF Manage bean.
i have 2 class JSF Manage bean one class use for login, one use for user add/edit/delete user table and edit his information when his login.
my login class
import com.DAO.UserBean;
import com.entity.IUser;
import java.io.Serializable;
import javax.ejb.EJB... | stackexchange/codereview |
I'm writing a loop in C, and I am just wondering on how to optimize it a bit. It's not crucial here as I'm just practicing, but for further knowledge, I'd like to know:
In a loop, for example the following snippet:
int i = 0;
while (i < 10) {
printf("%d\n", i);
i++;
}
Does the processor check both (i < 10) and... | stackexchange/codereview |
I have posted a message to my facebook wall through my web site, that contains also a picture. What I want now is hide the link of the picture that is shown there but still make the picture work as a link.
I am using:
$facebook->api('/me/feed', 'post', array('message'=> $message, 'description'=> $description, 'picture'... | stackexchange/codereview |
Using IBM Informix Dynamic Server Version 10.00.FC9
I'm looking to set multiple field values with one CASE block. Is this possible? Do I have to re-evaluate the same conditions for each field set?
I was thinking of something along these lines:
SELECT CASE WHEN p.id = 9238 THEN ('string',3) END (varchar_field, int_fie... | stackexchange/codereview |
How do I know what action is triggering a particular event?
org.w3c.dom.events.EventListener refreshAnnotationsListener = new org.w3c.dom.events.EventListener() {
@Override
public void handleEvent(org.w3c.dom.events.Event event) {
// how do I know the action which triggered this event?
}
};
I guess... | stackexchange/codereview |
I am using this code:
#menu {
margin: 0;
padding: 0;
display: block;
overflow: auto;
}
#menu li {
margin: 1px;
padding: 0;
float: left;
}
#menu li a {
display: block;
padding: 2px;
padding-left : 15px;
padding-right: 15px;
font-family: "Tahom... | stackexchange/codereview |
I'm currently creating integer constants in the following manner.
public class Constants {
public static int SIGN_CREATE=0;
public static int SIGN_CREATE=1;
public static int HOME_SCREEN=2;
public static int REGISTER_SCREEN=3;
}
When i try to do this in enum manner
public enum PAGE{SIGN_CREATE,SIGN_CR... | stackexchange/codereview |
What happens when I annotate a class with serializable? Can I serialize them into json or XML? How is this done?
| stackexchange/codereview |
Sorry for this simple question .
I have a Stored Procedure that return an int value , I'm trying to call this sp from my asp.net linq to sql project .
int currentRating = db.sproc_GetAverageByPageId(pageId);
But i get this error :
Cannot implicitly convert type `'System.Data.Linq.ISingleResult<PsychoDataLayer.sproc_... | stackexchange/codereview |
I am using a GridView and I require the user to be able to filter using 2 controls. One simply filters the type of row - there is a column called action, and the user selects one of the distinct values from the database in a dropdown box, and the gridview only displays the rows with that value in the action column. On ... | stackexchange/codereview |
I have the following string:
schema(field1, field2, field3, field4 ... fieldn)
I need to transform the string to an object with name attribute as schema and the field names as another attribute which is a list.
How do I do this in Python with a regular expression?
| stackexchange/codereview |
I have an ImageView declared in main.XML . I want it to be Zoomed .
How can this be done in Android?
| stackexchange/codereview |
How i can share a image from from my app to facebook in android?
| stackexchange/codereview |
I have a custom validation rule to check if two passwords entered are the same, and if they arent I wish to have a message that says "Passwords do not match".
The rule works, however, when the passwords don't match it simply displays the normal error message, what's going on?
var $validate=array(
'passwd2' => a... | stackexchange/codereview |
I have a controller action that uses a sql query:
$tag = $this->params['tag'];
$this->set('projects', $this->Project->query('SELECT * FROM projects INNER JOIN projects_tags ON projects.id = projects_tags.project_id INNER JOIN tags on projects_tags.tag_id = tags.id WHERE tags.tag LIKE $tag'));
As you can see a... | stackexchange/codereview |
Hello I cannot figure out why I get this error.
I've got a list with inputs which values contain lat/long/name/address.
Printing the markers on the map works fine, using the infowin workED fine, till I realized that it only openend the same info in all windows. Soo, obviously I needed to attach this (the marker i just... | stackexchange/codereview |
Is there a method of exporting a company file to IIF from the command line in QuickBooks? I'm running QuickBooks Enterprise 9.0 Professional Services Edition.
| stackexchange/codereview |
I noticed that in many community Objective-C classes and in Apple's frameworks they name some of the variables using a convention that prefixes variables with an underscore, such as: _name. What is the reason for having the underscore. Should I be doing this in my own classes? If so where and when should I use it?
| stackexchange/codereview |
I am trying to learn XNA (4.0) multiplayer networking for the PC only environment.
For development, I read that using local profiles (with SystemLink) for PC-only environment does not require me to worry about Xbox Live Licenses. Using
Guide.ShowSignIn (1,false);
causes the Xbox Live sign-in to come up. But I am stuck... | stackexchange/codereview |
From our application we use OLE automation to build a fairly complex Word-document. I would like to make Word invisible while the document is being made, since there is a lot of pasting and insertions that takes quite a long time.
I use the following code to establish a Word connection:
function ConnectToWord : TWordA... | stackexchange/codereview |
I'am writing a code using Google-Ajax-Feed-API to get feed from site. Here is my code for the same.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google AJAX Feed API - Simple Example</title>
<script type="text/... | stackexchange/codereview |
Why do system objects like nil, true or false have a fixed object id in Ruby. Also I tried printing out the object ids of numbers, they are the same and follow an odd number sequence pattern. Any explanation for this?
[nil,true,false].each { |o| print o.object_id, ' '}
4 2 0 => [nil, true, false]
>> (0..50).each { |i|... | stackexchange/codereview |
How do you refresh the beauty tips plugin? I'm trying to change beauty tips applied to an element when on a click event. I would be happy either
disabling the beauty tip for that element when it is clicked or
changing the content of the beauty tip when it is clicked.
It seems like I can change the "options" array n... | stackexchange/codereview |
I am working on the drag and drop feature. I had a working code for that feature. Its written in rails 2.3.5. When I am shifted to rails 3, I used the same code. Actually drag and drop is working, but the position automatically changes in rails 3. In 2.3.5, position will not change.
<% for item in section_menu_items do... | stackexchange/codereview |
I would like to produce a kernel density estimation in R, and am somewhat bamboozled by all the different packages. I need to be able to:
Specify weights
Specify bandwidth size
Specify bin size
How would you go about this? Bonus points for a code snippet.
| stackexchange/codereview |
I have created a stack class which holds std::vector. I have written stack operation like pop() and exch() like
int Stack::pop()
{
if (v.size() < 0)
throw("Error : Stack Underflow");
int tos = v.back();
stack.erase(v.end()-1);
return tos;
}
void Stack::exch() // Exchange top 2 element
{
if (v.size() <... | stackexchange/codereview |
Question: Why can't I push elements into a 2d array that's inside of a while loop that parses through a SQL result set?
I need some help here as to why this happens. The way data is stored into a 2d array can be done several ways, but for my purposes, I need to use the push method.
Here's some code that works:
my @tt... | stackexchange/codereview |
This is probably a super easy question, but I just wanted to make 10000% sure before I did it.
Basically Im doing a formula for a program, it takes some certain values and does things when them.....etc..
Anyways Lets say I have some values called:
N
Links_Retrieved
True_Links
True_Retrieved.
I also have a % "scalar" i... | stackexchange/codereview |
I am trying to use initWithContentsOfURL:encoding:error: like this :
NSURL *url = [[NSURL alloc] initWithString:@"http://my_url.com/my_file.xml"];
NSError *error = nil;
NSString *my_string = [[NSString alloc] initWithContentsOfURL:url
encoding:NSUTF8StringEncoding
error:&error];
I get a empty my_string variable.
I tr... | stackexchange/codereview |
why the following code works in safari but not in IE6 ? It opens the window but doesnt trigger the alert.
<script>
function fnOpenChild()
{
var openChild = window.open('child.htm');
openChild.onload = function() {
alert("im the child window");
};
}
... | stackexchange/codereview |
I have been trying to build a game bot in vb.net. One of the main problems is getting access to the text the game prints on the screen so I have been trying to hook the games calls to the windows api drawtext and textout functions. I have been hunting for examples of how to set up a hook in vb.net for a long time wit... | stackexchange/codereview |
Is there an easy way to strip trailing zeros from decimals so that
select amount from table
gives you 2.5 instead of 2.50 or 3 instead of 3.00?
| stackexchange/codereview |
hi i am new to android what i did is creating a list with strings and implementing the search using edit text,my code for this is as fallows
((EditText)findViewById(R.id.EditText01)).setOnKeyListener(new OnKeyListener()
{
public boolean onKey(View v, int keyCode, KeyEvent event)
{ String enteredText = ((Edit... | stackexchange/codereview |
I have function on client side that get file, make a byte array from it and send that array to the web service on server!
This is the function on client side:
Public Function GetFile(ByVal filename As String) As Byte()
Dim binReader As New BinaryReader(File.Open(filename, FileMode.Open))
binReader.BaseStream.Po... | stackexchange/codereview |
I have two tables a and b as follows to implement a simple block list where users can block other users.....
Table A
+------------+--------------+------+
| Name | phone |userid|
+------------+--------------+------+
| Mr Sasi | 01225 708225 | 1 |
| Miss Brown | 01225 899360 | 2 |
| Mr Black | 01... | stackexchange/codereview |
I am working on a Wordpress-based project, and I just added a new template to the installation by uploading a template file. I was creating a new page that will use my new template, when suddenly, the "Template" dropdown in the "Page Attributes" box is gone.
I am using Wordpress 3.0.1.
Update:
I saw a site which told... | stackexchange/codereview |
I am working on a rails app that on the view side makes an Ajax call every 5 minutes or so to a controller to check if there are any new messages that were created for a particular user. Now I know the way of Rails (or MVC for that matter) is to use Fat Models/Skinny Controllers, how would I call my model from my contr... | stackexchange/codereview |
Calling a WCF service from Java
Following on from the above question, does anyone know how to get wsimport to see WCF properties marked with the [MessageHeader] attribute, and hence generate fields for said properties on the generated Java proxy classes?
Unfortunately the requirement has now come up (from another vendo... | stackexchange/codereview |
A SO user asked a question to which the answer effectively was "use a locking mechanism".
While researching my answer, I discovered that there seems to be no simple, inter-process-reliable locking mechanism in PHP. flock() has a big fat warning:
On some operating systems flock() is implemented at the process level. Wh... | stackexchange/codereview |
I am trying to deploy a simple "Hello World" .NET 4.0 REST-style WCF service on WinXP (IIS5). It works fine in Cassini.
I tried to adapt the info here to me:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
but something is not clicking. Can anyone lend ideas or comments? Yes, I must stay wit... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.