instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
We have a Windows Service as part of our software, this is used to transfer data to a remote database in the background even when there is no user logged into the system. Currently this data is cached in the Program Files directory, and I don't think this is a good idea because it requires us to reduce the security pe... | stackexchange/codereview |
I know that we can get the current location of Android device using getLastKnownLocation and by registering a listener in requestForUpdates method. But, this method works for an Activity which I think means that the updates will be sent to that particular activity only.
I want to receive the location update in any act... | stackexchange/codereview |
Hi i'm creating a Keyframe animation from multiple images. My problem is i would like the animation to instantly change from one image to the next rather than a fade.
CALayer *animLayer = [CALayer layer];
animLayer.bounds = CGRectMake(0, 0, width, height);
animLayer.position = CGPointMake(0, 0);
CAKeyf... | stackexchange/codereview |
I have a web service running written in PHP-MYSQL. The script involves fetching data from other websites like wikipedia,google etc. The average execution time for a script is 5 secs(Currently running on 1 server). Now I have been asked to scale the system to handle 60requests/second. Which of the approach should I foll... | stackexchange/codereview |
I'm working on a training tracker program and I'm at a point where I can't figure out the SQL query.
I have 3 tables: employees, trainingRecords, masterList.
employees and trainingRecords are related through the empID fkey.
trainingRecords and masterList are related through the TID fkey.
Right now the training reco... | stackexchange/codereview |
OK, so I have an app with a UITextView that I want to exhibit standard Undo behaviour. I have trawled lots of tutorials and answers on this site as well as the Apple Developer Docs and I can't understand why what I have produced is not working.
Whenever the UITextView is modified (I am using a non-standard keyboard usi... | stackexchange/codereview |
In item 5 of More Effective C#, the following is presented:
public class EngineDriver<T> where T : IEngine, new()
{
public void GetThingsDone()
{
T driver = new T();
using (driver as IDisposable)
{
driver.DoWork();
}
}
}
The goal here is to properly dispose of drive, if it implements IDispo... | stackexchange/codereview |
I have the following code:
+ (UITableViewCell *) createTableViewCell: (NSString *) cell_id withTableView: tableView {
SomeViewClass *cell = (SomeViewClass *)[tableView dequeueReusableCellWithIdentifier: cell_id];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed: @"AViewCell"
... | stackexchange/codereview |
I am building an application using cakePHP. Do we have a method where we can allow public users access to certain pages without logging in. There would be a few pages such as about us regarding the whole organisation or a contact us page. Is there a method to avoid login access, something similar to how we have ways to... | stackexchange/codereview |
Our application provides multiple query interfaces that are basically just text inputs. Is there a best practice on whether the backend logic should be pad the query parameter with wildcards then perform a like or should it just do an equals. Of course another option would be to allow user's to use wildcards and then... | stackexchange/codereview |
I have having a very odd issue when utilizing this UIAlertView. When viewing a Physician they have several offices. Upon selecting one you get an alert that offers to call this location or display it on a map. To create the alert and to have data at the ready when the alert is dismissed, I declared 4 NSStrings (althoug... | stackexchange/codereview |
I'm writing a service but I want to have config settings to make sure that the service does not run within a certain time window on one day of the week. eg Mondays between 17:00 and 19:00.
Is it possible to create a datetime that represents any monday so I can have one App config key for DontProcessStartTime and one fo... | stackexchange/codereview |
I'm currently trying to implement a ManyToMany Relationship with Data in the JoinTable.
I'm following this approach with the Eclipselink JPA Framework.
But I'm getting the following exception:
org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
..... | stackexchange/codereview |
For example I have a /path/to/folder and want to see if it contains "keyword1", "keyword2" or "keyword3" and the result would be (when 2 are found):
/path/to/folder: keyword1 keyword3
I tried with options shown here but it doesn't work for folders.
| stackexchange/codereview |
How do i connect to Tuxedo using wsnaddr?
| stackexchange/codereview |
I want to create an Employee object using the constructor;
public Employee(int _employeeId)
In the body I want to read an employee from the database.
However I cannot get away with;
using (SHPContainerEntities db = new SHPContainerEntities())
{
this = db.Employee.Where(x =>x.EmployeeId == _employeeId).SingleOrDefau... | stackexchange/codereview |
Let's say, I've the following class definition:
public class Person
{
[DisplayName("First Name")]
public string FirstName { get; set; }
[DisplayName("Last Name")]
public string LastName { get; set; }
}
And, I'd like to use LabelFor(x =>x.FirstName), and so on. Unfortunately, the page inherits from
IEnumerable<... | stackexchange/codereview |
I'm using geom_density to plot densities with very thin tails. I want to restrict the y-axis range (so the top of the distribution will be off screen and the tail is more clearly visible) but it's throwing away data that is off-screen when it calculate the density, rather than just not showing what is off screen.
E.g.... | stackexchange/codereview |
I want to write a bash script for a mac which takes a text file containing a table of numbers (can be .csv), converts the numbers to a chart, saves the chart (any file format that I can display on my web page), and exits. It must do this unattended. No user interaction.
I know bash, perl, and a little AppleScript, an... | stackexchange/codereview |
I inherited the app and what it does is get data from 4 views with an (xml file in it) in chunks of 1000 records then writes them down in an xml file all this split up by a type parameter that has 9 different possibilities. That means in a worst case there will be 36 connections to the database for each 1000 of that ty... | stackexchange/codereview |
I have a .NET MVC application in which an HttpHandler logs requests in a database via Linq to Sql. 50% of the time, when I click a link to make an ajax request, the SubmitChanges() of the DataContext throws an error "The operation cannot be performed during a call to SubmitChanges".
This is caused by the line "Syste... | stackexchange/codereview |
Suppose we have a html page with large height.So there will be a vertical scrollbar.
As the user scrolls down I want to know how much he has scrolled using javascript (jquery) I suppose... Is this possible?
| stackexchange/codereview |
I'm trying to create a DQL query with two conditions in a left join. It's ok with one condition, but impossible to find the semantic for more conditions. Just below a SQL example about what I'm trying to write in DQL:
SELECT
u.id AS uid,
FROM user u
LEFT JOIN phonenumber p ON (u.id = p.user_id AND u.status='1')
HAVIN... | stackexchange/codereview |
I am using entity framework 4 and I create an datacontext for model in one of the base classes. But I was in profiling it and the context is being created every time I try to query, So I thought of making it static so that it is created only once and reused always.
Do you think this is the best way to do it and data/o... | stackexchange/codereview |
I am working on a sinatra app with datamapper connected to a mysql database and am having problems retrieving/finding records from only one specific table. I can insert into it with datamapper find but when I try to do @sleepEntries = Sleep_Log.all I get the following error: ArgumentError: argument out of range. When I... | stackexchange/codereview |
I need define some case classes like the following one:
case class Gt(key: String, value: Any) extends Expression {
def evalute[V, E](f: String => Any) = {
def compare(v: Any): Boolean = {
v match {
case x: Number => x.doubleValue > value.asInstanceOf[Number].doubleValue
case x: Array[_] => ... | stackexchange/codereview |
So, I've always wondered, when it comes to compression, if it takes less time to encode a video to a smaller resolution, or a larger one.
For the sake of being realistic about the question, let's take an example of a somewhat lossless mov, (maybe mjpeg or prores 422), 29.97 fps, keys set to whatever the compressor want... | stackexchange/codereview |
I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that I've marked as a unit of work with @Transactional. The unit of work updates the database that a user has been notified & then attempts to send them a notification message. I have configured the method to ro... | stackexchange/codereview |
I recently had the experience of doing the same thing (a search combo box) with jquery and extjs. I found extjs to be buggy and overly complex. On the contrary, I found jquery to work very well and be very simple. I am wondering what are other people's experiences of using extjs. Does extjs complexity actually buy you ... | stackexchange/codereview |
I need help with a homework assignment for my beginner computer science class. I am completely lost!
I need to write a program in Perl that will calculate the distance between 2 points with three values (x,y,z) by the given formula by my professor. the program must do the following:
prompt for 'c' to continue 'q' to q... | stackexchange/codereview |
I build an assembly with VS2010, and it has a plain vanilla reference to .NET 4.0.
It also has a reference to Ionic.Zip, which has a reference to .NET 2.0.
When I look at the manifest with ildasm, I see both versions of .NET as direct dependencies of my assembly, plus 2.0 listed again under the Ionic assembly.
Is this ... | stackexchange/codereview |
I'm currently using 1.9.2 with rails 3, and I ran into a snag with ruby-debug.
Should I be using 1.8.7 to be more on the safe side with rails 3?
I'm new to rails, and I want to stay away from hackish workarounds or configuration nightmares.
(I'm using rvm)
| stackexchange/codereview |
AllDistinct(a1 , . . . , an )
if (n = 1)
return True
for i := n down to 2
begin
if (LinearSearch(a1 , . . . , ai−1 ; ai ) != 0)
return False
end
return True
Give a big-O bound on the running time of AllDistinct. For full credit, you must show
work or briefly explain your answer.
So the actual answer for t... | stackexchange/codereview |
class Comment < ActiveRecord::Base
belongs_to :post
belongs_to :user
end
class Post < ActiveRecord::Base
has_many :comments
belongs_to :user
end
class User < ActiveRecord::Base
has_many :posts
has_many :comments
end
I'm trying to pull out Post data, while eager loading the User and Comment data as we... | stackexchange/codereview |
Activity myActivity = AssumeSomeActivityExists();
Intent openActivity = new Intent();
openActivity.setAction(Intent.ACTION_VIEW);
openActivity.setClass(myActivity,B.class);
myActivity.startActivity(openActivity);
When we do something like above how to make B instance know that it is been called and cr... | stackexchange/codereview |
I'm trying to avoid that when a user has connected to Facebook from my webview, the next time he do it, doesn't need to put the email and password. I'm getting the cookie from the "facebook.com" domain with this sentence:
String cookie = CookieManager.getInstance().getCookie("facebook.com");
and storing it in a SQLite... | stackexchange/codereview |
HIi friends,
i working on a IPhone Web App as its kinda new to me, have studied some basics of JQuery,
i want to get the form value in one view and to return to next view,i have tried this one,
$("button:#Get").click(function () {
$('#msg').html($('input:textbox').val());
});
it works with JQuery but not in JQTouch.... | stackexchange/codereview |
In doing something else, I added a jar to my lib folder called catalina.jar . This allowed me to serve static content (which works), but my previously working struts actions (which access a database through hibernate) no longer work. The first indication of failure occurs on tomcat startup:
SEVERE: Null component Catal... | stackexchange/codereview |
I point out that I'm completely a newbie about Biztalk.
I have a C# application (.NET 1.1) with a simple webform.
When the user submits this form, I should perform the following:
the webform invokes Biztalk2002 with the value/s of one or more texfield/s
Biztalk checks if the value of the field passed is correct
Biztal... | stackexchange/codereview |
So I am having a bit of a problem with some scheduled tasks I have declared using Spring's @Scheduled annotation. First off here is my app-config:
<beans <!--Namespaces-->>
<!-- Search for annotated beans -->
<context:component-scan base-package="com.my.package.task"/>
<task:annotation-driven executor="my... | stackexchange/codereview |
I just started using Git recently and I was reading up on Git best practices and it seems the most common one is to never work out of your master branch, always create a separate branch and work out of that. I'm wondering if this is only true when working with other developers or if this is something I should be doing... | stackexchange/codereview |
How to get millisecond between two DateTime objects?
$date = new DateTime();
$date2 = new DateTime("1990-08-07 08:44");
I tried to follow the comment below, but I got an error.
$stime = new DateTime($startTime->format("d-m-Y H:i:s"));
$etime = new DateTime($endTime->format("d-m-Y H:i:s"));
$millisec = $etime->getTim... | stackexchange/codereview |
I am trying to connect to mysql using c# in vs2010. I installed the 6.3.5 version of the .net connector from the mysql site. I try using the following connection string -
<add name="mySql" connectionString="Server=localhost;Database=mydb;Uid=User;Pwd=mypass;" providerName="System.Data.OleDb.OleDbConnection, System.D... | stackexchange/codereview |
I am currently able to get my location pinned down on the MapView using the MAPKIT.
I wanted to get the traffic info embedded on the same MapView around the same location.
I have attached a sample screenshot of the desired view.
Could anyone please let me know what Api or how I need to go about getting this done.
Here... | stackexchange/codereview |
I have function which converts a 1D list to a 3D list, but at the same time when 2nd and 3rd dimension indices are equal it places zeroes instead of values from the input list:
n = 4
input = Table[RandomInteger[5], {i, 1, 48}]
convert[l_] := Table[If[i == j, 0, l[[index++]]], {s, 1, 4}, {i, 1, n}, {j, 1, n}]
output ... | stackexchange/codereview |
I am using a script by CSS-Tricks, which is pretty straightforward except my scenario includes a little tricky area :)
The script:
$(".myBox").click(function(){
window.location=$(this).find("a").attr("href");
return false;
});
This works perfectly except inside my DIV I have a span containing an icon that needs ... | stackexchange/codereview |
I have very strange issue. In my WP7 app I have a pivot control and an item template defined inside it(or in the resources, I have tried both ways, but still same issue). In the template I have a regular button with EventToCommand defined(EventName="Click"). I also have the same copy-pasted button outside the Pivot. Th... | stackexchange/codereview |
Visual Studio has a nice feature to spit out a bunch of compiler warnings if some of the public members are missing XML documentation.
I would love to have the same for internal, or better, any non-private members, but unfortunately so far I wasn't able to find how to configure the level of visibility for which to requ... | stackexchange/codereview |
I had Eclipse running with the Android plug-in and I decided to add the Emacs plug-in. I downloaded and it worked. Then I decided to go back to the Eclipse key bindings and the Android plug-in disappeared. I could not update it, because Eclipse said it was installed, but it was not showing up in the menu.
I had to re d... | stackexchange/codereview |
I contributed a toggle-style toolbar contribution to my view in my RCP. Now, i want to know how to set the button's state (since it's a toggle button) from my view. Or, at least, how to initialize it's state after the view is loaded (the toggle state can vary, its not static)
I tried to call from my view: getViewSite()... | stackexchange/codereview |
I am wondering if it is a good idea or bad, placing things like a List of countries in ViewModel, for binding to a drop down list? For example on a site's Registration page.
I was under the impression that a ViewModel is supposed to represent an instance of the filled out form, but I think I may be wrong as I have seen... | stackexchange/codereview |
I'm having trouble figuring this out - I'm working with sockets in C using this guide - http://binarii.com/files/papers/c_sockets.txt
I'm trying to automatically get my ip and port using:
server.sin_port = 0; /* bind() will choose a random port*/
server.sin_addr.s_addr = INADDR_ANY; /* puts server's IP au... | stackexchange/codereview |
A videoconferencing project I was working on used JMF to capture video and audio, and transmit it to another endpoint. An issue was that my team didn't want the user of the product to have to install JMF.
I thought it might be worthwhile to share our solution to this problem. It works. It works well. My question to you... | stackexchange/codereview |
I have a Sponsor object which has a collection that looks like this...
public virtual IDictionary<SettingId, object> SettingValueDefaults { get; set; }
These are actually being pulled as a subset of a larger table. I need to be able to read from these, and that is working correctly.
However, I would like to be able t... | stackexchange/codereview |
I am using sharepoint designer.Just beside terms and Conditions Check box I need to put a hyperlink Which will open up a web page with all terms and conditions. How can I do that in sharepoint designer.
Many thanks
| stackexchange/codereview |
I am trying to use UIWebView to load a Chinese web url. If I encode it with utf-8 then it becomes:
html/libfunctions/%CA%FD%D7%E9%B9%DC%C0%ED(Array).htm -- xchm://03000000-0A00-0400-F25E-D84B09001600/ which cannot be loaded from UIWebView.
If I try to put it using the default one of Chinese: html/libfunctions/录脝脢卤脝梅鹿脺脌... | stackexchange/codereview |
I implemented my validation logic as follows:
<h:inputText id="title" value="#{...}"
required="true" requiredMessage="...some..text..."
validatorMessage="...some..other..text..." >
<f:validateLength minimum="10" maximum="50"/>
</h:inputText>
I read a lot about clie... | stackexchange/codereview |
I have a code library(Dll_A) that calls another call code library(DLL_B)
DLL_A will be distributed to other applications for use. When I try to use Dll_A it is saying I must have DLL_B in the reference as well.
If there a way to roll up everything into DLL_A and only have to import that?
| stackexchange/codereview |
Is it possible to use Razor View Engine (ASP.NET MVC) together with .LESS (similar to SASS - http://lesscss.org/ for .NET), since they're both using "@blah"?
What I want to achieve is to create .LESS css files, mixed with Razor.
UPDATED:
Sorry for being a bit unspecific. What I want to do is to use Razor View Engine W... | stackexchange/codereview |
I have the following unique contstraint defiend on a table:
CREATE UNIQUE NONCLUSTERED INDEX [IX_Access_AccessSOE] ON [dbo].[Access]
(
[AccessSOE] ASC
)
I am trying to import records to this table using the following query:
INSERT INTO Access
(AccessSOE, AccessName, AccessBox, AccessLocation,
AccessBusines... | stackexchange/codereview |
i have following dynamic url...
http://www.mydomain.com/v/dynamicvaluehere
and i have following in my htaccess
RewriteRule ^v/(.*)$ script.php?name=$1 [NC,L]
and it is working fine now i want to create further i.e
http://www.mydomain.com/v/dynamicvaluehere/Page-dyanamicnumberhere.html
and i have following in my htac... | stackexchange/codereview |
I have a class library ABC where I have written logs using log4net.dll (Debug(),Error() methods). Path for log file is c:\abc\ab.log
Now, I am referring the ABC.dll to my project TestSample. In this project I am logging messages again. Path for log file is c:\testlogs\logfile.log
I am using log4net.dll 1.2.10 version f... | stackexchange/codereview |
I've got the following BeautifulSoup code, a bit simplified.
soup = BeautifulSoup(html)
for item in soup.findAll('div',id=compile('^result_')):
q = item.find('a',{'class':'title'})
if q:
...
q = item.find('div',{'class':['one','two']})
if q:
...
I profiled it, and it's quite slow. I want to try lxml in... | stackexchange/codereview |
I have a php script that sends an email. It looks like this:
<?php
// subject
$subject = "$first_name $last_name has sent you a message on The Red-line";
// message
$message = "<html>
<head>
<title>
The Red-line
</title>
</head>
<body>
<p>
Hi $war_first,
</p> <br />
... | stackexchange/codereview |
I am planning to develop an application using Titanium Framework for iPhone and Android. Can someone list the best practices, do's and don'ts for the development using your experience with the framework?
| stackexchange/codereview |
I'd like to use both parse time and runtime interpolation for values of a configobj configuration file. The easiest way to do simple string interpolation in Python is "%(foo)s" % somedict. Unfortunately configobj uses the same interpolation mechanism and I have not yet found a way to escape it. Ideally my value would l... | stackexchange/codereview |
Yesterday experts advised using "while not terminated do begin..." in thread execute function to check thread terminated property and exit the thread gracefully from within. We just tested code, but it still can not terminate thread. But this thread can be terminated practically and immediately by calling TerminateThre... | stackexchange/codereview |
Im trying to show a jQuery menu that is built from and ajax call to a xml file and then an event handler is attached to all the li objects that has submenus. My problem is that it dosnt work. If I press a subcategory that should expand and show a submenu, this is done but the top node in my tree also cahnges its hide/s... | stackexchange/codereview |
I have a MySQL database with tables in the form of "shard_0", "shard_1", "shard_2", etc.
These are virtual shards. Now I want to add another DB server and move the even-numbered shards ("shard_0", "shard_2", "shard_4", ...) to the new machine.
What is the best way to do that? There are many tables so ideally I wouldn't... | stackexchange/codereview |
Hibernate is generating invalid SQL for a particular criteria query. I can manually fix the query by adding single quotes to the value being used in the WHERE clause.
To fix it, I changed the query from:
where (role0_.ROLE_ID=2L )
to:
where (role0_.ROLE_ID=`2L` )
How to force hibernate to add single quotes (in mysql... | stackexchange/codereview |
How can I run the manage.py script from withing django code?
| stackexchange/codereview |
From suds documentation, I can create a Client if I have a url for the WSDL.
from suds.client import Client
url = 'http://localhost:7080/webservices/WebServiceTestBean?wsdl'
client = Client(url)
I currently have the WSDL file on my file system. Is it possible to use suds to read the WSDL file from my file system in... | stackexchange/codereview |
In Rails 3, is there a way to link to a controller's action using ajax without having a named route?
I tried <%= link_to 'Reload', '#', url_for(:action => :reload, :id => @user.id), :remote => true, :method => 'post' %>
but it returns with the error No route matches {:controller=>"users", :id=>2, :action=>"reload"}
My... | stackexchange/codereview |
I have an iframe on siteB with has a from from siteA when the user on siteB clicks on the submit
<input type="submit" value="Save url" name="commit" method="post" id="url_submit">
I need the lightbox to close
i tried adding
$('#url_submit').click(function(){
$.fn.fancybox.close();
});
to both sites and nothing an... | stackexchange/codereview |
For exemple, i create a DOMDocument like that :
<?php
$implementation = new DOMImplementation();
$dtd =
$implementation->createDocumentType
(
'html', // qualifiedName
'-//W3C//DTD XHTML 1.0 Transitional//EN', // publicId
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-'
... | stackexchange/codereview |
In Xcode (3.2.4), View > Layout > Show Page Control.
In my old MacBook's Xcode, the Page Control shows [Project] and [Debug] buttons.
In my new MacBook, the Page Control shows [Project] and [Morph] buttons.
How can I get the old [Debug] button back and get rid of the [Morph] button? Thanks!
| stackexchange/codereview |
All,
I want a tab menu pane that lives inside my main ScrollPanel. Everytime a user clicks a menu option from my main page the centre ScrollPanel removes whatever widgit was there before and adds a new one.
Its worked fine so far that is until i introduced a TabLayoutPanel. As you guessed it the TabLayout only shows ... | stackexchange/codereview |
My end goal is to open up a new browser window and display an animated progress gif whilst loading a slow Crystal Report. Using traditional asp.net methods to achieve this always results in the gif not animating during a postback, unless I use update panels but that's when things start getting messy.
I have read lots o... | stackexchange/codereview |
I have form where user can choose to enter more than one option. I currently show one input field and hide the remaining 4 input fields for that option.
Previously, I used link under each input to unhide the next input and link.
$(function(){
$(".show").click(function () {
$(this).parent().next("div").sh... | stackexchange/codereview |
Is the "Windows Phone Developer Tools RTW" a final version?
RTW? Release to Web? Does this mean that it is a non final release or does it mean that it is only being released to the web?
I am thinking that this is a pre-release version.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952... | stackexchange/codereview |
I would like to compare memory usage, to allocate Calendar object and Joda's DateTime object.
// How much memory required to allocate 100 Calendar objects?
for (int i = 0; i < 100; i++) {
Calendar c = Calendar.getInstance();
l = l + c.getTimeInMillis();
CalendarList.add(c);
}
// How much memory required to... | stackexchange/codereview |
I have a scenario in my mind .. I need validations/suggestions from Stack over flow !! :)
There is a (remote)apache server hosting this URL "http://someserver.com/logs/log.txt:4041" .When i hit this URL in IE it opens a page containing log.txt in a file-folder-directory structure (after authentication).
Is there any w... | stackexchange/codereview |
I've looked at quite a few of the related questions and cannot find a similar problem or a solution so my apologies if there is a duplicate out there somewhere.
Anyway, I'm trying to generate a file's NSURL to use with an NSXMLDocument. I have the following components:
const NSString * PROJECT_DIR = @"~/SP\\ BB/";
cons... | stackexchange/codereview |
$counter = "";
if($sWall>1){
$counter = $counter + $sWall;
}
if($sWC>1){
$counter = $counter + $sWC;
}
if($sOther>1){
$counter = $counter + $sOther;
}
if(!(empty($counter))){
echo "(".$counter.") ";
}
This is what I have that does not work.
$sOther, $sWC, $sWall is mysql_num_rows. I wish to echo out e... | stackexchange/codereview |
I am attempting to add a connection to an Oracle database through Server Explorer. The 'Test' Connection' is successful, however whenever I go to view the list of tables / schemas, I can only see the one associated with my login.
I realise this sounds silly, but when I use the same login/password through Toad for Oracl... | stackexchange/codereview |
I am new to python been using it for graphics but never done it for other problems. My question is how to read this file which is tab or space delimited and has headers in python, i know how to do comma delimted file but not done this on?
ID YR MO DA YrM MoM DaM
100 2010 2 20 2010 8 2010 30
110 2010 ... | stackexchange/codereview |
Listed below is my program. I'm supposed to take two cards of both the dealer and player and evaluate who has the higher card. The player bets a certain amount of cash against that bet, and of course, if he wins he wins what was bet, if he loses, he loses the cash. I seemed to have followed the psuedocode correctly, bu... | stackexchange/codereview |
Is it possible to define an xpath expression that selects all <p></p> elements that contain a hyphen in the text but no child html tags.
In other words, this would be selected by the xpath expression:
<p>Wednesday - Chess at Higgins Stadium</p>
But this would be excluded because of the child <b> tags:
<p><b>Wednesday<... | stackexchange/codereview |
I have used the following code to create table row
TableRow TRow = new TableRow(a);
TextView TxtViewProvider = new TextView(a);
TxtViewProvider.setText(gradeText);
// TxtViewProvider.setBackgroundColor(Color.RED);
if (bold == 1)
TxtViewProvider.setTypeface(Typeface.DEFAULT_BOLD);
TxtViewProvider.setTextColor(... | stackexchange/codereview |
What is Drill-up, Drill-down and Drill- through in SSRS. Any steps how to implement in SSRS means in report wizard.
Thanks in Advance.
| stackexchange/codereview |
All,
I am having a hard time understanding the concept of assertXXX () in Junit. Currently, I have a method A(String fileName) that is generating a xml file for a input filename "XXX.XX" . So my test case includes testing if the code is generating any file and not just XML file which is wrong i.e. method A should only ... | stackexchange/codereview |
In C:
How do you find the number of elements in an array of structs, after sending it to a function?
int main(void) {
myStruct array[] = { struct1, struct2, struct3, struct4, struct5, struct6 };
printf("%d\n", sizeof(array));
printf("%d\n", sizeof(array[0]));
f(array);
}
void f(myStruct* array) {
printf("%d\n... | stackexchange/codereview |
Because I used to always do
hg vdiff -r -2:-3
hg vdiff -r 5213:5212
are all the hg commands exactly the same using those, vs using
hg vdiff -c -2
hg vdiff -r 5213
?
| stackexchange/codereview |
I have a LINQ expression that gets used as a filer in a LINQ to SQL statement where clause. My problem is that the LINQ to SQL expression has become unwieldy and also the logic it contains has ended up in multiple locations violating DRY (this is the 3rd time I'm working on a bug raised by QA for it getting out of sync... | stackexchange/codereview |
What is the best way to pack up an IronPython application for deployment? After scouring the web the best thing I've come up with (and what I'm currently doing) is using clr.CompileModules() to glue together my entire project's .py files into one .dll, and then having a single run.py do this to run the dll:
import clr... | stackexchange/codereview |
In Oracle, it's possible to do a SELECT statement that returns the row number as a column in your result set.
For example,
SELECT rownum, column1, column2 FROM table
returns:
rownum column1 column2
1 Joe Smith
2 Bob Jones
But I don't want to specify each column b... | stackexchange/codereview |
Any attempt to use Antenna House's xsl-fo extensions by pointing to their namespace (which gives a "page not found" btw) results in an error:
The element 'root' in namespace 'http://www.w3.org/1999/XSL/Format' has invalid child element 'document-info' in namespace 'http://www.antennahouse.com/names/XSL/Extensions'. Li... | stackexchange/codereview |
I am using a giant sprite for an element that changes different states at hover. I was wondering if there was a way to have the hover state image fade in? You can view my code live - here
Here's my code for the hover state for each span
$(".hf-1").hover(
function () {
$(this).css("background-po... | stackexchange/codereview |
My installer would fail when installed on a machine that has no IIS installed. The features that are going to be installed doesnt need IIS. The error says "Cannot connect to Internet Information Server".
In addition to that. The installer file has also a feature that requires IIS. But when I unselect that feature, the... | stackexchange/codereview |
PHP supports this:
$z = 5;
$str = "z is $z"; // result: "z is 5"
and it supports this:
$c = new StdClass();
$c->x = 9;
$str = "x is {$c->x}"; // result: "x is 9"
but it does NOT support this:
class abc
{
const n = 2;
}
$str = "x is {abc::n}"; // result: "x is {abc::n}"
Why does PHP not support insertion of con... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.