instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a database that models a foldering relationship to n levels of nesting. For any given folder, I want to generate a list of all child folders.
Assuming I have a function called getChildFolders(), what is the most efficient way to call this kind of recursive loop?
The following code works for 4 levels of nestin... | stackexchange/codereview |
Does anyone know how I can do the equivalent of this in hibernate:
session.getIdentifier(instance);
with JPA?
EntityManager has a contains method but that's pretty much it!
I'm writing some code that acts as a transformer between entities and data stored in a session (so rather than a serialized object being stored ju... | stackexchange/codereview |
What's the recommended way to do client-side validation using the built-in MVC2 code with MvcContrib's FluentHtml builders? We're using the jQuery client-side validation code, not the default Microsoft AJAX stuff, if that matters (though I don't think it should).
It seems the client-side validation only gets registered... | stackexchange/codereview |
I'm having trouble defining a custom property in a QML item:
Item {
property MovieTileItem data
Text {
text: "Some text"
}
}
MovieTitleItem is an Item defined in a separate QML file :
import Qt 4.7
Item {
property string title
property string posterSource
}
The error I get is "Cannot ass... | stackexchange/codereview |
Client request a task: Allow the Admin to change the site background image
Problem: I don't want create new table for store only one image. now I want upload image with paperclip but not used database. Please suggest me a way for that
| stackexchange/codereview |
I have a form in wpf , at runtime in the Load event add the following controls from XAML string
// load Canvas
sXAML = "<Canvas xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'";
sXAML += " Height=\"Auto\" Name=\"canvasMain\" Width=\"A... | stackexchange/codereview |
I have an own server which I'd like to (ab)use virtual servers on. It's intended to be kind of a laboratory for me in which I can try things out without ruining the system. The criterias I am searching for here is easy-to-use deployment tools along with easy "start-stop" things.
Which virtualization tools/systems/setup... | stackexchange/codereview |
I develop an Android application using Eclipse and the Android emulator. Sometimes I don't know if I am running the latest version of my application in the emulator. Is there any way I can check if it is the latest version?
E.g. I do a change of the layout for my application, but when I run the application in the emula... | stackexchange/codereview |
I'm trying the following
from subprocess import Popen, PIPE
Popen(["scp", "-B","user@url:file", "."], stdin=PIPE, shell=False).communicate(input="password")
But I still get the password promt, and no password is sent.
I know I can use scp with keys, but this is not what I need.
Any help?
| stackexchange/codereview |
I want to assign array of photos to imagearray but the following script is not working.
i cant able to access variables a,i,cnlink etc in new fadeSlideShow() .how to access this outside the function and assign it to imagearray
<script type="text/javascript">
var i; var a; var cnLink; var cn;var cnSplit;
... | stackexchange/codereview |
Is there any way to get generators into node.js?
I'm currently faking them with callbacks, but I have to remember to check the response of the callback inside of my generator function which creates a lot of if (callback(arg) === false) return;
I want something like in python:
for p in primes():
if p > 100: break
do... | stackexchange/codereview |
Are there any widely adopted, currently maintained Eclipse plugins for working with Apache Wicket projects? If so, where are they? Who maintains them? What do they do?
| stackexchange/codereview |
I'm creating a feedback webpage. I want to just take a textarea of user input and ship it off to myself with the mail function. Is it safe to do the following:
mail("me@blah.com", "Feedback!", $_POST['feedback'], "From: myself@blah.com");
/* (to) (subject) (message) (headers) */
Or do I need ... | stackexchange/codereview |
I have Publications and Authors. Since the ordering of Authors matters (the professor doesn't want to be listed after the intern that contributed some trivial data), I defined a custom many-to-many model:
class Authorship(models.Model):
author = models.ForeignKey("Author")
publication = models.ForeignKey("Publi... | stackexchange/codereview |
I was going through some old code that was written in years past by another developer at my organization. Whilst trying to improve this code, I discovered that the query it uses had a very bad problem.
OdbcDataAdapter financialAidDocsQuery =
new OdbcDataAdapter(
@"SELECT a.RRRAREQ_TREQ... | stackexchange/codereview |
After two years, one of my tests (testing some concurrent-db-transaction-stuff) suddenly starts failing with BrokenBarrierException on the build server. It used to work all the time, now it fails one out of three builds. It never fails on the windows work station.
anyone having clues why?
The build server uses this O... | stackexchange/codereview |
I had faced the problem. In my C++ hierarchy tree I have two branches for entities of difference nature, but same behavior - same interface. I created such hierarchy trees (first in image below).
And now I want to work with Item or Base classes independetly of their nature (first or second). Then I create one abstract ... | stackexchange/codereview |
How do I default the value of a non-selected radio button to 0?
I have the following HTML:
<input type="radio" name="myradiobutton" value="1" />1
<input type="radio" name="myradiobutton" value="2" />2
<input type="radio" name="myradiobutton" value="3" />3
And I have the following code to get the value of the selected ... | stackexchange/codereview |
Port command started with PID 395
Error: Cannot install p5-sql-translator for the arch(s) 'i386 x86_64' because
Error: its dependency p5-gd is only installed for the arch 'x86_64'
Error: and does not have a universal variant.
Error: Unable to execute port: architecture mismatch
Ty for your help!
| stackexchange/codereview |
I am looking for a Java library which can convert Non-deterministic Finite Automaton to Deterministic Finite Automaton.
Is there any?
| stackexchange/codereview |
I am puzzled by the errors i get for referencing structure members.
I have structure like this,
typedef struct
{
Int32 *pInAddr[2];
Int32 a;
}JobInfo_t;
typedef struct
{
ULUnitJobInfo_t JobInfo[MAX_JOBS_PER_CORE];
}DispatchInfo_t;
DispatchInfo_t *ptr,temp;
ptr=&temp;
Fun(ptr) //... | stackexchange/codereview |
I have the following code which is used to take the time of one NSDate and the current date and combine them into one NSDate. However the formatters are set correctly, but it's returning a date that isn't even close to the one it should be. Here is the code
/* Get the current date and make a formatter to just show the ... | stackexchange/codereview |
I am using ffmpeg to convert any avi/wmv videos to flv.
My trouble is that the flv result is quite poor: it gives me big pixelitaed boxes.
I tried to use some -b parameters with no good results:
ffmpeg -i 1268459654.wmv -ar 22050 -ab 32 -f flv -s 640x480 x.flv
ffmpeg -i 1268459654.wmv -ar 22050 -ab 32 -f flv -s 640x480... | stackexchange/codereview |
Cabal has dependency problems constantly. It's really tiring. So far I have tried to get many things working, here's my trying to install snap:
$ sudo cabal install snap-server
Resolving dependencies...
cabal: cannot configure ListLike-1.1.0. It requires mtl >=1.1.0 && 1.2
For the dependency on mtl >=1.1.0 && 1.2 ther... | stackexchange/codereview |
I have a one to many relation that looks like this:
| Parent | | Child |
| id | | id |
| | |parentID|
| | | date |
And I am trying to structure a query such that I get all of the parents who have children records which ALL have a date before a specified date.
Something like this
SELECT * ... | stackexchange/codereview |
I have the following code, which adds an 'Always on Top' item to the system context menu as displayed on the window chrome. It works correctly, but I'd like it to display a check mark or similar to indicate if it's been toggled on/off.
Any idea how I can do this?
public RibbonShell()
{
InitializeComponent();
... | stackexchange/codereview |
double a = 2451550;
double b = .407864;
double c= a*b;
cout<<c;
I was expecting the results to be "999898.9892" but getting "999899". I need the actual unrounded result.Please suggest.
| stackexchange/codereview |
In WPF Panel.IsItemsHost is set-get property. In Silverlight - get only, why I can simulate this in Silverlight?
Using in WPF code:
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel IsItemsHost="True" Orientation="Horizontal" />
</ItemsPanelTemplate>
... | stackexchange/codereview |
On our development environment system works fine but on Live system sometimes buttonClick action generates below error. If i press back 1-2 times it works without generating error.
On the live system error, it still shows my local path. Can this be the issue?
Thanks for your help
Object reference not set to an instance... | stackexchange/codereview |
i'm relatively new to this and was wondering if anyone could point me in the right direction! I'm looking to animate some aspects of the page loading when menu links are clicked.
$("document").ready( function() {
$('.page_box_fade').css("display", "none")
.fadeIn('300');
$(".nav_image").clic... | stackexchange/codereview |
I have several pages inside an AJAX directory. I don't want these pages accessible directly so you cannot just type in the URL of the page within the AJAX directory and access it. I "solved" this by using a PHP session on the page that calls it as follows:
Main page:
<?php
session_start();
$_SESSION['download']='ok';
?... | stackexchange/codereview |
I am building some XML within ColdFusion to send data to QuickBooks. I am able to build my variable with my data from a <cfoutput> fine. Like this:
<cfoutput query="get">
<cfset #x# =
'
<InvoiceAddRq>
<InvoiceAdd>
<CustomerRef>
<ListID>XXXXX</ListID>
</CustomerRef>
<ClassRef>
... | stackexchange/codereview |
I edit files in Vim were I log terminal command lines along with descriptions of what I did.
All my command lines start with $, so my files look like this:
This is a description of what this
command does, it can be quite long and
should have line breaks.
$ ./the_command.sh
These are actually Viki files, but I guess... | stackexchange/codereview |
Hi the question is when you are executing infinite loop with php, how do you control memory clean up ?
The rough example is to get the result or to update the result from / to mysql in infinity while loop.
Need any common methods .
Thank you.
PS - all the nemesis and bugs of PHP were replaced by moving to python comple... | stackexchange/codereview |
This is what I want:
When user clicks a button, all rows that meets a criteria should have a Blur effect added
Problem: The only way I've found to do this is in the LoadingRow event. But in my case the row is already loaded when I want to apply the Blur Effect.
Question: How to iterate over rows so that I can apply th... | stackexchange/codereview |
I am able to send a single SMS on BlackBerry, but when I try to send more than one SMS, only the first is sent.
| stackexchange/codereview |
How can I create a speech-bubble like context menu like in the Safari-Browser on the iPhone/iPad.
I would like to create a kind of context help.
Thanks in advance,
Stefan
| stackexchange/codereview |
I have a download function that I got from Andy Matthews, and an sd Card function that I got from Christian Cantrell. Now I need to download to the sd Card.
Q: How do I specify that storage = e.storageVolume.rootDirectory.nativePath?
var remoteFile = 'http://www.CompanyName.com/ClientName.txt';
jQuery(function($){
... | stackexchange/codereview |
I have 2 servers set up using MySQL. It's using a standard replication setup, with one slave, no circular replication.
Is there a way to programmatically tell how far behind the slave is in reading the data from the binary log?
If I run the statement:
SHOW MASTER STATUS;
On the master, and run
SHOW SLAVE STATUS;
on t... | stackexchange/codereview |
I have the following in my view did load on my table view controller:
UIButton *change_view = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[change_view setTitle:@"List" forState:UIControlStateNormal];
[change_view addTarget:self action:@selector(toggleView:) forControlEvents:UIControlEventTouchUpInside];
UIBarBut... | stackexchange/codereview |
I have to work with big files (many GB) and need quick lookups to retrieve specific lines on request.
The idea has been to maintain a mapping:
some_key -> byte_location
Where the byte location represents where in the file the line starts.
Edit: the question changed a little bit:
First I used:
FileInputStream stream = ... | stackexchange/codereview |
I've encountered a strange thing. I have configured exception handling in struts 2.1.8 like stated here, only that I redirect to an action instead to JSP (to send emails...).
So, in the action I have
ActionContext ac = ActionContext.getContext();
String stackTrace = null;
if(ac.getValueStack().findValue("exceptionStack... | stackexchange/codereview |
I am looking at the Graph API .. and how to get a persons friends, apparently its only returning the name and the ID of the friend, I don't know how to go about this, I need something like email to show them that these friends are already signed up for my site....
Sorta like what foursquare does
| stackexchange/codereview |
I have a web application project which is deployed in tomcat 6.
I can access my application using the url:
http://localhost:8082/MyApplication
I also wan't to be able to access this application by another url like:
http://localhost:8082/myapp
Is this possible ? if yes what alternatives do i have ?
Off course, I... | stackexchange/codereview |
How to recognize double touch on UIButton ?
| stackexchange/codereview |
i'm developing a small application in with a list view filled with a compound component. This component has two text view and one button inside. One of the text view is invisible and when the button is clicked it should appear. I can show the list but i can't make the textview visible when the button is clicked.
Here i... | stackexchange/codereview |
I need to put a Checkbox against each Row in a DataGridView. I am making use of DataGridViewCheckBoxColumn for the purpose. But here user is able to select more than 1 row. How to restrict the user from selecting multiple rows in a DataGridView?
| stackexchange/codereview |
okay, this has got to be simple - but I can't seem to find an answer...
I am creating a summary report (using BIRT 2.6.1), and laying out a few specific summary values in a grid (not a table or a cube).
Say it's a simple query:
SELECT decision FROM dataTable
I created a data binding / aggregation (named "sumDecision")... | stackexchange/codereview |
I have an issue with a linq to sql query - performance wise.
What i am trying to do, is find out if the elements of my collection of about 500 items (in a List) match db entries. Currently, this operation alone is taking about 300 seconds to complete! The database contains over a million rows and is bound to grow in t... | stackexchange/codereview |
Here is the deal, i have a website that is required to search from multiple webservices, then join all the results returned from webservices and display them mixed. I've done the code for search a single place at one
WsPesquisa pesq = new WsPesquisa();
IEnumerable<Objecto> Resultados = pesq.PesquisaObjecto("URL TO SEAR... | stackexchange/codereview |
Okay I am working on a group project and what we are trying to do is create a "Results Screen" which has It's Own UINavigation and contains two TabBars in it. We are trying push that ontop of an existing UINavigation. Right now at the moment of this code. We have our main App Delegate and in it we instantiate a beginni... | stackexchange/codereview |
Given a function declaration in D, is it possible to introspect at compile time the string representation of any function parameter names, for use in say automatic function reflection.
E.g.
void foo(int a, double b, string c) { }
register_function!(foo)()
Can register_function extract "a","b","c" at compile time in a ... | stackexchange/codereview |
There is probably built-in function or a better and faster way to do this in Mathematica
func[l_, g_, f_] := g @@ f @@@ Transpose[{Most[l], Rest[l]}]
which can be used to do things like this
l = {a, b, c, d}
func[l, Plus, (#1 - #2)^2 &]
I don't know the proper name for this kind of function. Something in a fold-zip ... | stackexchange/codereview |
I would like to bind data of my listbox. Imagine I have something like :
<ListBox ItemsSource="{Binding MyList}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text={Binding Value} />
<TextBlock Text={Binding AbsoluteValue} />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
MyList con... | stackexchange/codereview |
I am implementing a Google Translator simulator to my app. How can I implement this? Some similar source url or related Google api?
Screenshot of this app
http://www.freeimagehosting.net/uploads/73620ad386.png
input:
from any language <-----translate----------->to any language
output:
translation of text and voice o... | stackexchange/codereview |
Is there a way to determine the email address of an Android Market publisher given the package name of an app they own?
I.e. Given the package name com.acme.app I would get back dev@acme.com?
And before anyone asks, I don't want to spam devs, I just need a way to prove that if a dev says they own com.acme.app they rea... | stackexchange/codereview |
I am able to retrieve all contacts from android in .vcf file using following code.
ContentResolver cr = getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,null, null, null, null);
String lookupKey = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
... | stackexchange/codereview |
I read that I have to download this http://dev.mysql.com/downloads/mirror.php?id=13427#mirrors, but it says that I can't install it because I need .NET Framework. I already have 4.0?!
| stackexchange/codereview |
When I click Delphi 2009 to start it shows me this error.
| stackexchange/codereview |
Hi i am working on an application which has a login form and another view called as Invitation. Now heres my problem in my Login view on the hit of Login button i am coming to the Invitation View with the help of the code which looks like this
-(void)buttonPress
{
Invitation *obj = [[Invitation alloc]init];
... | stackexchange/codereview |
I have a web page with only a jQueryUI Tabs with several tabs.
One of the tabs can be very long, so it causes the browser to show the vertical scrollbar. When the users scroll down the tab, and then select another tab, which is very small, the browser hides the vertical scrollbar. When they return to the long tab, the ... | stackexchange/codereview |
I need to display a dialog box which contains radio buttons; and when I select the appropriate radio button, the dialog box should disappear?
| stackexchange/codereview |
Is there a quick way to find all the commented-out code across Java files in Eclipse?
Any option in Search, perhaps, or any add-on that can do this?
It should be able to find only code which is commented out, but not ordinary comments.
| stackexchange/codereview |
I wrote a Qt application that is going to run on Linux. It supposed to run at startup.
It's supposed to run on every Linux- Suse, RedHat etc.
What script should I write and Where to put it?
I don't know how to write scripts at all, so I would appreciate it if you will attach an example.
| stackexchange/codereview |
im writing a keyboard and there are a number of things i want to do:
1) i want to be able to dyamically resize the the keyboard view. I
have a custom view for my keyboard, created by my
InputMethodService.onCreateInputView
i've tried calling invalidate, requestLayout, forceLayout, on the
keyboard view, on its parent an... | stackexchange/codereview |
There is a table and a text input box on the HTML page. Whenever the user types a value in the box, the Javascript should filter the table and show only the rows which has the value in the data.
I have done with this part but the main problem is if the user types space in the box and then types another value then the ... | stackexchange/codereview |
Out of tons of questions and answers here about manipulating PDF's with PHP, but none of them seem to fit my requirement.
Programmatically, I want to be able to update the content of editable fields. Preferably with PHP. If it matters, the PDF files will be initially hand crafted (as sort of 'template' files that wil... | stackexchange/codereview |
I'm going to use this opportunity to put down a number of related but different thoughts on object-oriented philosophy, as a sort of request for comments. If the admins see fit to close, I may make it a blog post instead. But I am asking questions, so I think it's a suitable community wiki.
Suppose I have an abstract c... | stackexchange/codereview |
I'm trying to do easy logging
logger.error "ERROR!!!"
But nothing is displayed in any of the log files in the /log directory. I tried rescuing an exception, but there's no exception.
What might be the problem here?
| stackexchange/codereview |
I am in big big trouble. Please help.
I have created a game for my client.
It works fine when I run it from the Visual Studio 2008( in both release and debug configuration).
But when I run its stand alone exe (or making setup project) it does not work perfectly fine.
It works but it does not work completely fine,and th... | stackexchange/codereview |
A very simple JSF applicaton:
InputText element is assigned with Validator.
f:ajax is used to render next element (phoneNumber) by using blur event.
PhoneNumber will only be displayed if inputText pass the validator and isValid boolean value is set to true
Here is the code snippet
<h:form id="invOrdersWizForm"> ... | stackexchange/codereview |
So, what exactly is a good use case for implementing an interface explicitly?
Is it only so that people using the class don't have to look at all those methods/properties in intellisense?
| stackexchange/codereview |
Consider the following as a reference implementation:
/* calculates (a * b) / c */
uint32_t muldiv(uint32_t a, uint32_t b, uint32_t c)
{
uint64_t x = a;
x = x * b;
x = x / c;
return x;
}
I am interested in an implementation (in C or pseudocode) that does not require a 64-bit integer type.
I started ske... | stackexchange/codereview |
I've heard a little bit about reference-to-reference problem and this resolution. I'm not very good with C++ Committee terminology, but I understand the "Moved to DR" annotation in the link means that this is the current interpretation that standard-conforming compilers should adhere to.
I have this sample code that I ... | stackexchange/codereview |
I have a Java application that I'm about to begin to use Web Start to deploy. But a new demand has made me rethink this, as I'm now required to add a piece of functionality that allows the end user to select whether or not they'd like to run this program on startup (of Windows, not cross-platform). But I'd still like t... | stackexchange/codereview |
Bit confused about this. I was under the impression that if you added server controls to the ItemTemplate of a repeater then the ID's assigned to those controls would persist across postbacks and the state would be maintained. But it doesn't seem to be happening. Here's my ItemTemplate:
<asp:HiddenField ID="hidPending"... | stackexchange/codereview |
When extending AbstractProcessor, there is a possibility to override init(...), but there is no "opposite" method, which would be called after all rounds were processed.
This is a problem: when you have to append information collected during each round to same file, you just can't ever close the file, because you never... | stackexchange/codereview |
hello
I am developing small gameApp.
I need to pause the timer,when user goes to another view [say settings view].
when user comes back to that view , I need to resume the timer.
can anybody solve this issue ...
Thanks in Advance...
| stackexchange/codereview |
I am trying to build a tumblr client in android but am running into response code 403 - Forbidden.
The api docs suggest i use email and password parameters to validate credentials and get account information.
I have tried out the following code but as specified get a 403 response code.
can anyone suggest what i m doin... | stackexchange/codereview |
I am writing a lot of code where I am using the same selectors but snippets of them for example
$('#menu > div.container a')
and
$('#menu span.highlight')
is there any method to have '#menu' in a variable and use that instead? The issue I have with string concatenation is that it requires one to be extremey discipl... | stackexchange/codereview |
I'm new with iReport and trying the following:
I want the report to notice in the detail-band when a special field has another value as it has the entry before.
I think that could be possible if I use a variable but I have no idea how to do that.
Can someone help me out with an example so I can see the right syntax?
I... | stackexchange/codereview |
I have a dropdownlist with a lot of items that are wider than the width that I set for that control.
The desired behavior is the way Chrome handles it: the dropdownlist width specifies how much space the control takes on the page, while the dropdown itself is as wide as required to read the items in the dropdown.
I hav... | stackexchange/codereview |
how do I set cursor position in richtextbox on start?
EDIT:
I wrote something in rtb2 then I clicked on enter and on event enter clicked is text sent do DB. Then I call this block of code:
rtb2.Document.Blocks.Clear();
TextPointer caretPos = rtb2.CaretPosition;
caretPos = caretPos.... | stackexchange/codereview |
Im trying to get the callback from this:
$.getScript( 'http://gdata.youtube.com/feeds/api/videos/<?php echo $m; ?>?v=2&alt=json-in-script', function(data)
{
alert(data);
});
But the alert just returns alert with "undefined" ? And I also tried:
$.getScript( 'http://gdata.youtube.com/feeds/api/videos/<?php echo $m; ?>... | stackexchange/codereview |
I have a iframe that loads into out page that causes a display issue. We've tried CSS changes although it still causes a problem. Is there anyway to hide an iframe using jquery that is loaded externally.
we've tried the document ready but it looks like the external js file that it uses also has the document ready m... | stackexchange/codereview |
I have two script one does the work and the other has a function that gives correct values to variables. Anyway I get the following error when calling a function in script(2) using a parameter from script(1)
SCRIPT 1 (PROBLEM WITH LAST LINE COUNT_help.months() :
while True:
day = raw_input("Please Enter The Day: ")... | stackexchange/codereview |
Is it possible to save a file's original create / modify dates when saving a file to a db (via filestream & BinaryReader) and then have those dates attached to the file when recreating the file, again via filestream & BinaryWriter, from the db? If possible, how do I do it?
My inital research leads me to believe only th... | stackexchange/codereview |
How do I specify a wildcard '*' for the ports in a client access policy file?
If I want to specify multiple ports in the following file is there anyway to do this using a wildcard instead of explicitly listing each server:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
... | stackexchange/codereview |
I am trying to capture desktop. i found some code which capture the desktop , but takes some time.
void CSDITESTView::OnFileTest()
{
int nScreenWidth = GetSystemMetrics(SM_CXSCREEN);
int nScreenHeight = GetSystemMetrics(SM_CYSCREEN);
HWND hDesktopWnd = GetDesktopWindow()->m_hWnd;
HDC hDesktopDC = ::GetDC(hDesktopWnd... | stackexchange/codereview |
I've downloaded ASP.NET MVC 3 RC and the new NuGet CTP version.
When I try to install anything in the thru the Package Manager Console I get the an error message. Here are two samples:
PM> nip elmah
Install-Package : Object reference not set to an instance of an object.
At line:1 char:4
+ nip <<<< elmah
+ Category... | stackexchange/codereview |
I'm trying to use a simple table nested in a cell to show a graph on my elections result page.
<td>
<%: result.candidateName %>
<table style="border:0; padding:2px;">
<tr>
<td style="width:50px; border:0; height:15px; color:Blue; padding:0; font-size:75%;"><%: result.percentWon %>%</td>
... | stackexchange/codereview |
I need to display a timer in "hh:mm:ss" format on the iPhone, but want it localized. Finland, for example uses a period instead of a colon between the time components (hh.mm.ss). Apple's NSDateFormatter would do the trick if I was dealing with a "time" but I need to display hours much greater than 24.
I have not been a... | stackexchange/codereview |
OK, here's my code to create an authentication cookie:
// get user's role
List<UserType> roles = rc.rolesRepository.GetUserRoles(rc.userLoginRepository.GetUserID(userName));
List<string> rolesList = (from r in roles
select r.ToString()).ToList();
string[]... | stackexchange/codereview |
When you load a SWF into another, the loader SWF can get specific definitions from the loaded SWF using ApplicationDomain.getDefinition(name:String). For example:
package
{
// ... imports
public class SWFLoader extends Sprite
{
private var loadedAppDomain:ApplicationDomain;
public functio... | stackexchange/codereview |
I have one asp.net application, in which i have to disable or make it as read only to the Paste option from the context menu. But i searched in internet. I didn't get one exact method. Please help me for resolve this issue. Thanks in advance
| stackexchange/codereview |
As JavaScript in blocks HTML rendering, and it's good practice to keep JavaScript at bottom, just before closing body tag , is it not the case with CSS also?
I know we can't keep external CSS outside .
| stackexchange/codereview |
I use Red5 server 0.9.1 for live streaming from Adobe Flash player to my RTMP protocol transport.
I test it with audio data captured from my microphone using flash application and for now transport recieves and recognizes audio packets. For further audio data listening I need to know what audio codec Flash player uses ... | stackexchange/codereview |
I want to read a block in zpool storage pool using dd command. Since zpool doesn't create a device file like other volume manager like vxvm. I dunno which block device to use for reading. Is there any way to read block by block data in zpool ?
| stackexchange/codereview |
In our legacy code, I stumbled upon a hibernate class implementation which I was not able to fully understand.
There is one super class corresponding to table WORK_REQUEST_GROUPS -
@Entity
@Table(name="WORK_REQUEST_GROUPS")
@Inheritance(strategy=InheritanceType.JOINED)
public class CCSRequestGroup
{
@Id ... | stackexchange/codereview |
I am using the following rewrite rule:
RewriteRule ^search/(.*)/(.*) search.php?letter=$1&num=$2 [NC,L]
It works fine when loading "/search/a/1" in the browser, meaning that when debugging with PHP the values of the vars are: $letter='a' and $num=1 .
However, when loading "/search/a/1/" (with ' / ' at the end), the ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.