instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Is it possible to validate a collection of objects in JSR 303 - Jave Bean Validation where the collection itself does not have any annotations but the elements contained within do?
For example, is it possible for this to result in a constraint violation due to a null name on the second person:
List<Person> people = new... | stackexchange/codereview |
I've got a property in a class defined as an int. I retrieve the int value (which is 15) and assign it to a UISlider.value and it is always displaying at the max even though the max is set to 100 - it's because the value being assigned/retrieved is much larger than it should be. I'm sure this is a simple misunderstandi... | stackexchange/codereview |
I have a string like this
"/folder1/folder2/folder3/IMG_123456_PP.jpg"
I want to use JavaScript / jQuery to replace the 123456 in the above string with 987654. The entire string is dynamic so cant do a simple string replace. For example, the string could also be
"/folder1/folder2/folder3/IMG_143556_TT.jpg"
"/folder1/f... | stackexchange/codereview |
I feel as though there should be a simple way to do this, but searching around gives me no good leads. I just want to open() a pipe to an application, write some data to it, and have the output of the subprocess sent to the STDOUT of the calling script.
open(my $foo, '|-', '/path/to/foo');
print $foo 'input'; # Should ... | stackexchange/codereview |
I am trying to create a footer that sticks to the bottom of the page. I have:
<body>
<form id="form1" runat="server">
<div id="wrap">
<div id="content">
<uc2:logo ID="logo1" runat="server" />
</div>
</div>
<uc1:footer ID="footer1" runat="server" />
</form>
</body>
Here ... | stackexchange/codereview |
var row = document.getElementById('my_id');
var newRow = row.parentNode.insertRow();
newRow.Id = myCounter;
var newCell2 = newRow.insertCell(0);
newCell2.innerHTML = 'some text';
I'm trying to create a new row and a new cell in that row. The above code works in FF but not in IE. What am I doing wrong?
| stackexchange/codereview |
Is there a nice LINQ (or other) method of creating a new array by performing a transformation on each element of an existing array?
E.g. an alternative to:
List<int> numbers = new List<int>();
foreach(string digit in stringArray)
{
numbers.Add(Convert.ToInt32(digit));
}
return numbers.ToArray();
| stackexchange/codereview |
I'm looking for a tool that will allow me to utilize native HTML5 drag-n-drop, as well as fill in support for past browsers.
Does such a thing exist? Modernizr's page (https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills) lists nothing.
| stackexchange/codereview |
How to concatenate these strings?
_T("http://www.google.com/") + _T("intl/en/privacy.html")
| stackexchange/codereview |
Hi I am new to java and I am developing a java web application i would like to run some code at application start up.
In .Net i would use the global.asax file, how can i do this in java.
Thanks for any help
| stackexchange/codereview |
I am a Java programmer and don't know much about VB.
My task:
Create an exe. When I run the exe it will read a text file, and after that it will display the content. After that the application code ends.
What i have done:
I have created a project and created a button on the form. On click of the button I have given th... | stackexchange/codereview |
How can I grep a pattern that can include spaces, commas etc using exec or system in PHP, and return one string separated by a comma each result. If needed, I can make use of awk or sed to separated by comma.
So for instance, if the pattern to search is: hello worl
then return:
$result = 'hello world, hello worlds, hel... | stackexchange/codereview |
Hey all,
Looking for feedback if anyone has a good way to, when you finalize the code, run one last Junit run and create a PDF-version of the junit report.
| stackexchange/codereview |
This question was asked here.
jqGrid column not aligned with column headers
But the border-right-color style doesnt seem to work for me.
I am using jqGrid 3.8 and IE 8
This is my setup for jqGrid
shrinkToFit:true,
colModel :[
{name:'leid', index:'leid', width:70, label:'LEID'},
{name:'cdr', index:'cdr', width:40,... | stackexchange/codereview |
I have the following table structure:
+----------+------------------------+------+-----+------------------------------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+------------------------+------+-----+---------... | stackexchange/codereview |
I have a web application that let's people make sound effects. Sometimes the sound effects are less than 0.55 seconds in length. When this is the case they may fail to play properly in the Chrome browser. I would like to know of a command line audio processing utility that will enable me to pad out the sounds shorter t... | stackexchange/codereview |
I am attempting to create a simple language interpreter for a homework assignment in PLT Scheme (Racket). For tracking variable bindings, I cannot seem to create and update an environment that tracks assigned variables and their values. In the MIT Scheme Reference, I found information about environments being first cla... | stackexchange/codereview |
Basically I have this cursor that was not written by me but is taking some time to process and I was wanting to try and improve it by getting rid of the cursor all together.
Here is the code:
DECLARE @class_id int, @title_code varchar(30)
DECLARE title_class CURSOR FOR
SELECT DISTINCT title_code FROM tmp_business_clas... | stackexchange/codereview |
Preprocessor directive lines like
#define
#include
#ifdef and #endif
#if and #elif
can be used in C, but not in C#.
Is there an alternative to these?
Mainly #define.
| stackexchange/codereview |
We frequently get the following stack trace from our Windows users:
java.lang.UnsatisfiedLinkError: sun.awt.image.ImageRepresentation.setBytePixels(IIII[BIILsun/awt/image/ByteComponentRaster;I)V
at sun.awt.image.ImageRepresentation.setBytePixels(Native Method)
at sun.awt.image.ImageRepresentation.setPixels(Unkn... | stackexchange/codereview |
I have PHP deprecated errors flooding log files and Drupal status pages like this:
: Function ereg() is deprecated in mysite/includes/file.inc on line 893.
I should be able to turn off E_DEPRECATED errors in my php.ini, but it is having no effect despite being set to:
error_reporting = E_ALL & ~E_DEPRECATED
phpInfo()... | stackexchange/codereview |
I have been at this for a couple of months now, on and off. I start looking for the solution and i quickly get frustrated with the incomplete or overly complicated answers i keep finding.
All I want to do is to convert this:
mysite.com/component/content/article/17-category/61-article-name.html
Into this:
mysite.com/ca... | stackexchange/codereview |
I have some code that is causing memory leaks on an iOS static library. Here is an object's lifetime from Instruments:
# Category Event Type Timestamp RefCt Address Size Responsible Library Responsible Caller
0 Table_ColumnListener Malloc 4712087040 1 0x5e5fe60 16 Tests -[Table _initWithRows:andColumns:andTupleType:... | stackexchange/codereview |
I'm storing a set of products in solr as documents. I'm separating out name, description, keywords, and product category name into separate fields so that I can boost them independently using the dismax handler. All the fields are stored as "text" in the same way.
I'm passing these four fields in the fl param to the di... | stackexchange/codereview |
So, I've started designing a TicTacToe GUI in Java & I'm stuck.
Here's the code I'm working on
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class gameWindow {
int b;
JFrame frameX;
JPanel panel1, panel2, panel3, panel4;
JLabel[] labelX = new JLabel[10];
JTextField inputter;
JButton input;
J... | stackexchange/codereview |
I have a table where users can move items up or down by one. I'm trying to disable a Move Item Up By One and Move Item Down By One buttons when a table row reaches the top or the bottom (becomes first or last). I don't know how to determine when a <tr> Item has reached the top or the bottom of the table.
This is what I... | stackexchange/codereview |
Adding South to an existing Django project. I have it installed on both the development machine and the "production" server.
I've done the following on the development machine, then: added South app to settings.py,
python manage.py syncdb
python manage.py convert_to_south myproject.myapp
then changed some models, the... | stackexchange/codereview |
I want to design a Task model that can be associated to Project Models, another X model, and other Task models. The obvious choice is a foreign key, but I want any particular instance of that Task model to only be associated to only one of those model types, that is, if a Task model has a relationship with a Project mo... | stackexchange/codereview |
I have a layout with dynamic content. It has a variable number of textviews. On each textview I have to attach an event, a click event.
I have to pass to that event some kind of information to know what textview has been clicked exactly.
How can I pass this kind of information or how is the android way to do it?
Thanks... | stackexchange/codereview |
I'm trying to figure out why some code bases use IsA() to determine object polymorphism if in C++ you can already safely upcast and down cast (using dynamic_cast) ?
So far the only case I see useful is when you are integrating a a scripting environment that is linked to the c++ codebase?
Thanks!
| stackexchange/codereview |
the class_stylesheet.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for class_stylesheet
/// </summary>
public class class_stylesheet
{
public clas... | stackexchange/codereview |
I have an application contained in A.JAR. This jar has several dependencies so they are specified in the manifest as "lib/B.JAR lib/C.JAR lib/D.JAR". I have my installation directory with A.JAR, and under it I have the lib directory with the three others.
I go to my installation directory and run "java -jar A.JAR" to r... | stackexchange/codereview |
I'm trying to add a control in within a user control:
LinkButton l = new LinkButton();
l.Text = "Test";
l.OnClientClick = "TestClick";
l.ID = "TestID";
l.Page = Page;
Page.Controls.Add(l);
I get this error when the page loads:
An unhandled exception was generated during... | stackexchange/codereview |
I'm getting some strange behaviour with viewstate being lost on postback for a .net application using Sitecore. I'm assuming it might be some config variable somewhere but I'm new to Sitecore and don't really know where to start looking.
UPDATE: Sitecore has now gotten back to us with an answer. We had recently added ... | stackexchange/codereview |
All my websites are written in asp.net. All are same code based and use telerik components and google analytics.
Now some of them are displayed as "this website has been reported as unsafe" in internet explorer 8.
Any suggestion? Appreciate your comments!
| stackexchange/codereview |
I have checked in javadocs(html files) into svn. But, when I access the html files thru a browser, it gets interpreted as text. How, do I fix this ?
| stackexchange/codereview |
the size of my application isnt the full 760 pixels, i am getting about 750.
i based my application on this template: http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/
iframe size is set to resizable.
| stackexchange/codereview |
What is the correct procedure to rename a database?
Example: I have a database that I can access with SQL Server Management Studio and has a name like "MyDatabase". Physical files of this database are
MyDatabase.mdf
MyDatabase_log.ldf
How can I rename these logical and physical names to "MyNewDatabase"?
| stackexchange/codereview |
I am wondering why when I use MySQL Query Browser and double click table names the sql statements look like this:
SELECT * FROM database.table t;
where t = the first letter of the table... What is the purpose of this letter? I am just curious
| stackexchange/codereview |
I have a data for each day, there are multiple data entries occuring.
If I want to show this as a stackarea chart, excel does this in a perfect way, i.e. displays the date interval on x axis evenly.
When I try to do this with MS Charting tool, the interval of on x axis becomes effected by the number of the entries.
... | stackexchange/codereview |
I'm developing an application on iphone. I had an application on Java using encryption (RSA) and I created a Private Key and Public Key. I want use the Public Key in Java application on iphone. For Ex: My Public Key is byte[] publicKey = {0x01,0x02};
How can I use my publicKey to encrypt data on iphone?
I saw CryptoExe... | stackexchange/codereview |
hi there i have a mysql database populated with products, each product has a product code
the product code contains letters and numbers
eg. TL541 , TL75 etc
my client wants the products ordered by code, but TL541 comes before TL75
presumably because 5 is lower than 7
any ideas how to order this in numerical order?
| stackexchange/codereview |
I want to pull data from a remote db into an sqlite database I just don't know where the path is to where mac stores sqlite3 files. It's just the default location.
This is the answer I came up with and will post it as an answer when SO lets me.
I don't know if this is the default but I never changed the sqlite3 settin... | stackexchange/codereview |
I have the following question:
.data
a: .word 12,-5,4,0
x: .byte 5
.text
main: addi $t1, $0, 8
lw $t2, a($0)
lw $t3, a($t1)
Can someone tell me what the value of $t3 will be? How can you access the 8th element when the array has a length of 4?
| stackexchange/codereview |
I am sure this is in the Apple documentation or must have been answered somewhere on this forum, since it seems so basic, but I could not find it nor a particularly elegant solution myself.
What I have is a UIViewController that pushes an editing view on its navigation stack. The editing view has a bunch of UITextFie... | stackexchange/codereview |
I am looking into the NetBeans platform for developing desktop applications. I am a complete newbie in it. I understood till now the module architecture. Now I want to do some GUI work. My question is very simple and feel embarrassed to ask it, but how can I edit the main frame of the application? I mean the one genera... | stackexchange/codereview |
I am researching the possibility of starting a data mining project which will include intensive calculations and transformation on data, and should be relatively easy to scale.
In your experience, is the choice of programming language critical for said project?
For example, if I am already working on a JVM environment,... | stackexchange/codereview |
My scenario is pretty simple, I have 1 table with about 20 products that I would like to add to level 2 cache (SysCache) using Fluent NHibernate. I query this table 4 different ways so I figure I'd stick the whole thing in cache every so often and reduce the database hits.
My 4 queries are:
All(start, max) for paging
... | stackexchange/codereview |
In the process of solving a larger problem I wrote a new class method to compute a property of objects of that class. I referred to standards, I found the appropriate internal library calls to do some of the work for me, I commented it fully and I applied it to a variety of sample objects to validate the results.
Late... | stackexchange/codereview |
I'm using jquery, ajax, & .net to call a method. I see lots of examples on the net saying to put [Webmethod] above the method but I'm keeping getting the error the type or namespace name 'webmethod' could not be found. I have put "using System.Web.Services;" at the top. What else needs to be done?
using System;
using S... | stackexchange/codereview |
When using the WebBrowser control, is it possible to cause popup windows to
appear within the WebBrowser control itself instead of a new window?
I can't figure out how to get the popup to appear in the same browser window. please help me :)
PS : The language I use is VB
| stackexchange/codereview |
I'm currently doing some redesign of a website, basically just upgrading it to a more up-to-date look and trying to make it as resolution independent as possible, and in the name of resolution independence I figured I'd try to use SVG images in the design where the browser supports SVG images in <img> tags. The reason ... | stackexchange/codereview |
I'm doing this project and this particular portion is confusing me. We are given this machine level representation and it will read six numbers that I have to figure out. So far I know that this is a loop and it will iterate until it reaches it's stop clause. We do not want it to ever make the call to explode at 0x0804... | stackexchange/codereview |
I have a Wi-Fi driver from a manufacturer. That driver has Plug and Play support. After the adapter has been inserted or removed, Windows CE has recognized it successfully. But at boot time, if the adapter is "inserted state", CE OS does not load it so I must remove then insert it.
I want to load the driver automatical... | stackexchange/codereview |
Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following:
In order to get relative position of the iPhone, one needs to
Set the accelerometer read rate
Noise filter the accelerometer response
Convert it to a vector
Low pass filter the vector to find gravity
Subtract gravity from t... | stackexchange/codereview |
$(function () {
var ptitle = $('div.portfolioItem div.image img').attr("title");
$(this).each(function () {
$('a.play').attr({
'title': '' + ptitle + ''
});
});
});
Well there's my code, it works but I'm not really familiar with the each tag.
All this does currently is applies t... | stackexchange/codereview |
Possible Duplicate:
Can I redefine a C++ macro then define it back?
Say I have some code that uses the name BLAH for a variable. Suppose BLAH is a common preprocessor definition in many standard header files (defined as 10), so if my file is included after any of them, the code breaks because BLAH is transformed int... | stackexchange/codereview |
If i give iPhone application name maximum 12 characters then all characters will be displayed. But if I give more than 12 characters, then my application name display with (....). as below.
I want to need display fullname without showing (...). in my project. Or is there is any possible way to change application font ... | stackexchange/codereview |
If you press a keyboard key on an ADG the selected row moves to the first line it finds whose first column cell's text starts with the character you just pressed. Does anyone know if there's a property to turn that behavior off?
Here's a simple code snippet that shows this, in case you'd like to play with some code...... | stackexchange/codereview |
I am working on a js player and the seek bar doesnt want to play nice. You can see two on pageload, they both work properly. Now click on either first or second div with the play img on it and a bar will appear. When you click there the bar is not precise. Its several pixels off.
this.offsetLeft is giving me 0 instead ... | stackexchange/codereview |
I have the following times stored in an XML document, which correspond to the time when the document was created and then updated:
<create-time>2010-11-04T03:13:35.212Z</create-time>
<update-time>2010-11-03T20:18:26.331-07:00</update-time>
The document was created at 8:13 pm, and then updated 5 minutes later, at 8:18 ... | stackexchange/codereview |
I decided to work through the CLRS Introduction to Algorithms text, and picked the printing neatly problem here.
I worked through the problem and came up with an imperative solution which was straightforward to implement in Python, but somewhat less so in Clojure.
I'm completely stumped on translating the compute-matri... | stackexchange/codereview |
i am facing the problem in coping the images from one folder to another . It is possible through JS means please guide me, i had the image path (eg : C:\Program Files\xampp\htdocs\gallary\images\addnew.gif ) just i want to copy the images to another folder using js .thanks in advance.
| stackexchange/codereview |
I recently began importing a number of our projects into a Subversion repository at work and over the next few weeks i'm expecting every one on the team to take responsibility for their own source control management.
The reason I chose SVN over GIT is that I want everyone on the team, including designers, frontenders, ... | stackexchange/codereview |
Is it possible to do this?
| stackexchange/codereview |
I need my app to trigger an alert a specified amount of time after a user presses a button. The documentation makes it look like Handler is what I need, and usage appears to be brain dead.
However, I'm finding that despite using postDelayed, my routine is running immediately. I know I'm missing something obvious, but ... | stackexchange/codereview |
I'm fumbling around a bit with WebSockets, and was pretty pleased with how easy it was to get a Tornado server running that does basic websocket connections. I've never used Tornado before today, and while I like what I've seen there's a few questions that I have regarding it's use.
Primarily, I'm using WebSockets so t... | stackexchange/codereview |
I plan to create a meeting/event iphone application. Can I use the Ekcalendar inside my apps(not the default calendar apps on the iphone)? When I click the meeting detail, it will have my own define fields to insert/update/delete? If not, what is the alternative class that has similar functions (show day, week, month ... | stackexchange/codereview |
I am facing a challenge and don't know how to solve this in jQuery.
My purpose is to write an extended function replacing the Facebook callSWF function.
Facebook callSWF run like that: **domObj.callSWF("myFunctionName", param1, param2 ... paramx);**
Now, I need to replace that function. For jQuery, I can call the Fl... | stackexchange/codereview |
Can I create a tooltip that will show up when a user moves his/her cursor over an image? I can't find such a property in Visual Studio, and I've scoured Google to no avail. I'm using an image in a PictureBox.
Here's to anyone out there on StackOverflow instead of some awesome Halloween party! Yay!
| stackexchange/codereview |
Why doesn't the "-C" flag have an option to enable the "use utf8"-pragma?
| stackexchange/codereview |
I am having a excel with one column that has got information regarding tender. Each cell will have a value like
Column: Nokia([Mode1.Number],OLD)
Column: Motorola([Mode1.Number],OLD)
Column: Motorola([Mode2.Number],NEW)
Column: Motorola([Mode3.Number],OLD)
Column: Samsung([Mode2.Number],NEW)
I need to create 2 excel o... | stackexchange/codereview |
Sometimes, with requests that do a lot, Google AppEngine returns an error. I have been handling this by some trickery: memcaching intermediate processed data and just requesting the page again. This often works because the memcached data does not have to be recalculated and the request finishes in time.
However... ... | stackexchange/codereview |
I can't seem to figure out how to write this query properly. I've tried various combinations but nothing's worked yet.
Below is the relevant portion of my database model:
I need to select the products that match a given Category and Group, and that match a given Year, Make, Model, submodel. This I've done below:
It... | stackexchange/codereview |
I have working project built with djangoappengine and running under App Engine dev server. So I run "manage.py runserver" and all works as appreciated. All requirements (django, djangoappengine etc) are located in project root dir. Now I am trying to use virtualenv (I am running commands in project root):
virutalenv --... | stackexchange/codereview |
I have this js regexp which I need in PHP code now instead:
var alphaExp = /^[a-zA-ZåäöÅÄÖ\s\-]+$/;
if (!fld.value.match(alphaExp)) {
//ERROR OUTPUT HERE
}
Whats the equivalent to this in PHP?
| stackexchange/codereview |
I am using SQLPLUS to spool data out to a file, but not all of the data is being returned? I am using the dbms_metadata.get_ddl function and it is only returning part of the table definition to the file....where I can see the full definition in the query output.
I was setting linesize = 8000 in the spool set?
SQL:
Sel... | stackexchange/codereview |
In a nutshell, I need a way to stream (or otherwise play) a movie along with 3 to 4 other 'show angles', with the user being able to change the stream they're viewing. End result should be a video player with links/buttons for the other angles, allowing the user to switch camera streams (angles) as they wish.
Here's an... | stackexchange/codereview |
I have a wrapper function that returns a function. Is there a way to programmatically set the docstring of the returned function? If I could write to __doc__ I'd do the following:
def wrapper(a):
def add_something(b):
return a + b
add_something.__doc__ = 'Adds ' + str(a) + ' to `b`'
return add_someth... | stackexchange/codereview |
Using Devise, I would like to know if there is a way to remove a particular flash message? (Signed in Successfully).
I care about other msg in the view, so It is just for the signed in and the signed out one.
Did I have to overwrite the controller or there is another way?
Thank you!
| stackexchange/codereview |
I was curious if it was written in objective C or possibly Microsoft was considering taking mono more seriously? Any .NET is office 2011 for mac?
| stackexchange/codereview |
I'm trying to create the following WHERE clause:
AND CASE @SomePRarmeter
WHEN 'this' THEN
user_id IN (SELECT * FROM dbo.func_Id1(@User))
WHEN 'that' THEN
user_id IN (SELECT user_id from dbo.func_Ids2(@OrgsForReporter)
END
But I'm getting an error: Incorrect syntax near the keyword 'IN' (in the first condition) , a... | stackexchange/codereview |
I'm using the Exchange Web Services (Exchange server 2007) to try to send an email with voting buttons in.
I read this question/answer:
Send Voting Email
I have had a colleague using Outlook 2007 send me an email with simple yes/no voting buttons (the buttons display in Outlook, I have not sent an answer) and I can con... | stackexchange/codereview |
I'm working on an app that will use MediaPlayer to play music. I'm interested in adding background functionality, so that the music continues playing indefinitely (or as long as the user wishes). The Android docs seem to be pointing me to using a Service for this sort of thing.
So my question is: Should I define a proc... | stackexchange/codereview |
I was given a task to create an implementation of generic collection basing on simple array. Collection should implement List interface. Currently I have:
import java.util.*;
import java.util.List;
import java.util.ArrayList;
import java.util.ListIterator;
import java.util.Iterator;
public class Main {
public stat... | stackexchange/codereview |
I was trying to create a new AVD using the ADK and AVD manager and chose to pick the file myself. While navigating to the directory of my choice in the file chooser I saw a flurry of "fatal: Not a git repository (or any of the parent directories): .git" in the console from which I had started the AVD manager and finall... | stackexchange/codereview |
I have a question about CSS coding practices. IE often requires hacks or workarounds to get things looking right, and there are two different ways of doing things:
Put everything in one big CSS file
Create two CSS files and have it load depending on the browser that the user is using
I'm thinking the second one make... | stackexchange/codereview |
Im getting a syntax error in the following main statement...
int main (int argc, char *argv[]) {
The error says "syntax error near unexpected token `('".
However, as you can see, there are the right amount of parentheses there. What's the issue?
Thanks!
More code:
/*Core Dump Program*/
#include <stdio.h>
#include <sy... | stackexchange/codereview |
I'm developing a document management system for my graduation project.
In this project, users are adding documents' metadata into my "documents" table in a relational database.
And of couse, there are different kind of documents, like letters, bills etc. Therefore they have different set of attributes for each kind of ... | stackexchange/codereview |
How can I open a file, Stud.txt, and then replace any occurences of "A" with "Orange"?
| stackexchange/codereview |
I was wondering if anybody had any good ideas for managing a Securities database? Currently the db is an Access db and there is talk of migrating it to a SQL server. However, does anybody know of a good front-end UI that would help non-technical people query the SQL server that holds Securities information?
| stackexchange/codereview |
Converting an old program into an ASP.NET c# site.
I have a table full of functions and a table full of variables with their corresponding values. I've written a function to evaluate the answers but need to format the formulas in order to pass the variable in.
For example:
V(totalValue) * V(CoFriction(s)) ==> V("... | stackexchange/codereview |
I'm planning to make a simple helpdesk form. One of the attributes it needs is a unique number.
How can I create a unique identifier, starting with a string? Example: KL0001 and KL0002
It must be a number which is unique.
| stackexchange/codereview |
Hy my code:
WebView webView = new WebView(this);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.preisjaeger.at");
setContentView(webView);
The site the i downloaded appers on the Webview, but only the content for mobile devices.
So my Question: How to ... | stackexchange/codereview |
I'm trying to set up hadoop and nutch to run on EC2. To get started, I have followed the excellent NutchHadoopTutorial. Most everything works as it should, except that I am unable to access any of the web interfaces (e.g. JobTracker). The JobTracker starts without errors, and I can hit nutch-master:50030, however I'm g... | stackexchange/codereview |
I'm currently using GHUnit and OCMock for testing my app. I'm using them because I like the fact that I can run test code on the actual device.
The way my app is currently designed is that I have some central services and objects available through properties on the app delegate. For example, I've centralised some core... | stackexchange/codereview |
I'm supposed to take a list of words and count all words in it which are 2 or more characters long and where the first and last character are equal.
I came up with two possible solutions:
result = 0
for word in words:
if len(word) >= 2 and word[0] == word[-1]:
result += 1
return result
vs.
return len([word... | stackexchange/codereview |
I have a form where user enters data about a new inventory item (id,title, price, date, ect..). Data entered is saved to a collection and then redisplayed in a listview.
I get a "Specified cast is not valid" pointing to "key = (int)lvwInventory.SelectedItems[0];" when trying to extract the selected value. I'm trying to... | stackexchange/codereview |
I find myself using lambda expressions more and more in my C# applications. The most common case is using Expression<Func<Object>> to eliminate magic-string references to property names. For instance, I can have a method such as:
public void SomeFunction(Expression<Func<Object>> expression)
{ ... }
I can call the me... | stackexchange/codereview |
In my .irbrc file I require 'logger' to allow me to see the SQL executed when querying ActiveRecords all while in the script/console.
My question is, how do I temporarily turn off the logger so it doesn't display the SQL just for a few ActiveRecord queries?
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.