instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
What should I change to make in work on Windows-XP keeping in mind we are working on Python 2-4 ?
"""
Author: Matt Weber
Date: 03/04/07
Renames files based on the input options.
"""
import os
import sys
from optparse import OptionParser
def RenameFile(options, filepath):
"""
Renames a file with the given optio... | stackexchange/codereview |
Can you tell me a good video cources of ADO.NET, such as a work with datagridview object, data binding etc
| stackexchange/codereview |
I'm running an ajax query against the Yahoo Boss API to get a list of the keywords contained in the search results.
However, I've found that when the data contains an empty value for keyterms (example: "keyterms":{}), my script breaks but does not trigger the error handler -> error: function()
I find that when the scri... | stackexchange/codereview |
I have several ffmpeg processing servers that do conversions of video files. I have a poller that grabs the load averages from these servers, and updates a mysql table with them, every 5 minutes.
I could just say... give me server with lowest load, but the problem with that, in those 5 minutes, it might queue 20 files ... | stackexchange/codereview |
I am bulding an asp.net web application and I want a reg ex for my RegularExpressionValidator for Greek alphabet only. But nothing seems to work for me. I've googled fairly enough till now, but nothing has helped me. Any ideas?
<asp:Label runat="server" AssociatedControlID="FirstName" Text="Όνομα:"></asp:Label>
<asp:Te... | stackexchange/codereview |
I read a lot about signpost, and then went back to Twitter4J with which I have created my twitter applications when OAuth wasn't necessary.
I am now confused whether I should use signpost or Twitter4J's method of OAuth authentication.
I have read that Twitter4J itself uses signpost for OAuth, still am not sure about t... | stackexchange/codereview |
I have built a couple of Shoppping Carts with Magento recently but I feel it is far too bulky for the shop I will be building next. I will be building a shop that sells only 4 DVDs for a seasonal promotion.
Can anyone recommend a PHP Shopping Cart / Script with Back-end functionality that can be quickly built. What wou... | stackexchange/codereview |
I must be missing something simple here. This code was working and i can't seem to figure out why it stopped.
First, I generate a selectlist in the controller like this:
// Select List
ViewData["FieldTypesList"] = new SelectList(
genesisRepository.FieldTypes, "ftID", "ftName"
);
... | stackexchange/codereview |
How do I specify the "before-the loop" code when using "perl -ne", without resorting to either BEGIN/END blocks or replacing "-n" with actually spelled-out while loop?
To explain in detail:
Say, I have the following Perl code:
use MyModule;
SETUP_CODE;
while (<>) {
LOOP_CODE;
}
FINAL_CODE;
How can I replace that ... | stackexchange/codereview |
Possible Duplicate:
Svg support on Android
i want a sample program for displaying svg file in android? or i want to know wha are the classes used for it?
| stackexchange/codereview |
I have added an AbsoluteLayout on ScrollView. Up to this, it worked fine.
After that, I added ScrollView on above mentioned AbsoluteLayout. Now I have
ScrollView -> AbsoluteLayout -> ScrollView -> AbsoluteLayout
This structure also works fine. But when I try to scroll inner ScrollView,
it scrolls slightly and afte... | stackexchange/codereview |
I want to print debug statements to the Output window(or anywhere else I can see it) in visual studio 2005. The advice I've seen has said to use
OutputDebugString("message");
and to ensure that I have
Options -> Debugging -> Redirect all Output Window text to the Immediate Window checked
while the code builds ok I d... | stackexchange/codereview |
Ceteris paribus (well formed data, good buffering practices and what not), is there a reason why I prefer to loop while the return of scanf is 1, rather than !EOF? I may have read this somewhere, or whatever, but I may have it wrong as well. What do other people think?
| stackexchange/codereview |
Is there a simple way to exclude certain code if a certain OS is detected?
I designed a site which works perfectly well (it's a sidescroller) that when a scrollwheel is used (up/down), it scrolls side-to-side. But if you're on a MacOS laptop and you do a two-finger swipe to the side, it starts jittering back and forth.... | stackexchange/codereview |
When a List resizes because there is no more excess capacity, how much capacity is added? just 1? Or does it add Capacity (so doubling the total capacity)?
| stackexchange/codereview |
I have an iPhone app that use an Sqlite database to store some data and some user configurations. The problem that I'm having is that when I submit an update of my application, the existing database on the user installation is overwrite with the empty database and the users lost their configurations. I'm sure it can n... | stackexchange/codereview |
Assume the following toy class, and modern compilers (recent gcc for example).
template <typename T>
class SomeVec {
public:
...
virtual T get(const int index) = 0;
}
The application involves a fair amount of number crunching based on values stored in SomeVec subclasses, T being a primitive type, say int. However,... | stackexchange/codereview |
I am having difficulty calling a function after a jQuery AJAX call has finished loading
function to_be_executed_last {
alert("The Call Is Complete");
//some other stuff
}
$("a.jaxable_link").click(function(){
$.post($(this).attr('href'), function(data) {
$('#container').html(data);
//Execute... | stackexchange/codereview |
I am creating a class which, takes a table from a database, and displays it to a web-page, with as much functionality as possible. One of the things I would like to support, would be having the class detect which columns in the table have a foreign key constraint on them, so that it can then go to those tables, get all... | stackexchange/codereview |
If we have a discrete random variable x and the data pertaining to it in X(n), how in matlab can we determine the probability mass function pmf(X)?
| stackexchange/codereview |
According to profiler it takes 24 sec for FluentConfiguration.BuildConfiguration to complete. Here's the code I use to get Configuration:
MsSqlConfiguration persistenceConfigurer = MsSqlConfiguration
.MsSql2005
.ConnectionString(connectionStringBuilder => connectionStringBuilder
... | stackexchange/codereview |
Possible Duplicate:
Sending SMS from PHP
I would like to make and develop a system module in my web site that has the feature of informing the customers with updates in their data stored in our database.
How I can do that in PHP ? what are the configuration and the code needed to accomplish that ?
Did anyone try tha... | stackexchange/codereview |
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
i am getting this error when trying to access the Word Application from IIS,
but not getting any exception... | stackexchange/codereview |
I have a problem.
I have TextBox1 where I enter information:
1
2
3
4
5
6
as
sd
asdasd
asdas
d
These data are stored in the browser.
I do not want successors to the data re-appear in the browser.
How can it be reached?
| stackexchange/codereview |
I've just started using hibernate 3.6.0 and JPA 2.0 and I'm having some troubles.
I get InvalidClassException on some queries. By the way I'm using metamodel with hibernate-jpamodelgen.
I.e. one below runs fine:
CriteriaBuilder cb = getCriteriaBuilder();
CriteriaQuery<UserEntity> cq = getCriteriaQuery(cb);
cq.where(cb.... | stackexchange/codereview |
I have bought a Joomla template from Template monster. It looks like this template isn't Ie8 fully compatible. I can't count on support, because when entering their online chat, you get a fague chat bot.
The problem is that the template doesn't show any text after the flash banner. In FF it all works great, but in Ie7,... | stackexchange/codereview |
I'm currently designing the classes for an application I'm writing for my coursework, and I have two classes that sound as if they should be a base-derived class pair, and do indeed share two member variables, and my problem is that they each have seven member variables and no operations.
The reason for the structure o... | stackexchange/codereview |
I have .NET application and would like to allow users to write macros.
Any easy to use language would do.
However, I don't want to write a compiler, interpreter, debugger.
I know there are many options on the net but most solutions seem clunky.
What is my best option?
| stackexchange/codereview |
When a normal user runs a WiX installer which requires elevation, there appears to be a delay of 30 seconds or more between the user clicks the "Install" button and the UAC prompt comes up. This happens even though the install button is marked with the UAC shield, suggesting the installer "knows" that elevation will be... | stackexchange/codereview |
I am trying to connect to MQ Series from Jboss Server. Can anyone tell me what are the steps should I follow?
Breaking my head for nearly a week !!!
| stackexchange/codereview |
I need for a ready-to-use WPF contacts manager with source code (possibly in C#).
Incredibly, the web seems to be very poor on that side.
I've found these links for interesting implementation:
http://www.johnstagich.com/WPF/publish.htm -> No source code available
http://www.paulstovell.com/wpf-model-view-presenter -> ... | stackexchange/codereview |
..
char arKey[1]; } Bucket;
The above is said to be flexible array,how?
| stackexchange/codereview |
I'd like to create a simple visual effect for display of rows of data on iPhone/Android/etc, as seen in this example.
The effect is very simple; it's two rectangles on top of each other, the top one lighter than the bottom one and with a lighter-yet border-top. This does it:
<style>
.rowtop { background-color: #333; b... | stackexchange/codereview |
It is possible you have Javascript read vars from Django template tags like var spec = "{{ foo }}";.
However, if foo needs to be a JSON object. it becomes like this:
var spec = "{"2": {"guid": 2, "contentBlocks": {"2_1": {"guid": "2_1", "type": "list"}}}}";
The preceding and closing quotes make this an invalid JavaScr... | stackexchange/codereview |
I am trying to publish a MVC2 Web app as part of our continuous integration using Cruise Control ccnet.config file with msbuild. I have searched through numerous posts but cant find the right answer or get the suggestions to work. Does anyone know how to get this going so I can output the published files to a directior... | stackexchange/codereview |
I'm working on an ASP.NET application. Currently when the user clicks "Save" on an item, we disable the Save button, change its text to "Saving..." and so on. This works fine, because the button causes a postback which results in a new page being loaded, on which the Save button is no longer disabled.
We now want to ap... | stackexchange/codereview |
As part of building an ASP.net application, I have to display two things for a specific user on an UNIX backend system:
the folder structure
the folder permissions (just notation like: drwxr-xr-x).
My knowledge of communicating to UNIX with C# is, however, very limited. I've discovered a few possiblities to accomplis... | stackexchange/codereview |
Does anyone know how one can data bind enum field which is a combination of ORed base enum?
Say I have
MyEnumType
{
e1=0x1,
e2=0x2,
e3=0x4
}
and then I do
MyEnumType myEnum = MyEnumType.e1 | MyEnumType.e3
Then I would like to display a dialog box which can be used to set value of myEnum.
Right now I ... | stackexchange/codereview |
i have a table in mysql like this.
RequestName | Status | Details
Req1 | Scheduled | NA
Req2 | Pending | Na
Now how can i get the value scheduled?Can you please help me on what query to use to get that value
| stackexchange/codereview |
is it possible to send email without cdo and else installed dlls?
| stackexchange/codereview |
I have a set DataRows and I want to check if any of the fields in any of those rows has a NULL value in it. I came up with this below, but I'm not sure because I'm nesting an ALL.
result.AsEnumerable().AsQueryable().All(o => o.ItemArray.All(i=>i == DBNull.Value))
Hard to tell because I can't put a "watch" in lambdas.
| stackexchange/codereview |
I'm developing a RESTful web service with WCF and C#. The service works fine, but when I made a request from a static HTML page, using XMLHttpRequest, all browsers except IE (who else?) first send a prefligth message (https://developer.mozilla.org/en/http_access_control) requesting the available options for the service... | stackexchange/codereview |
I want to delete the photos which are saved in camera-roll is it supported in iphone ..? any info..?
| stackexchange/codereview |
This is to be expected but I can't seem to find a runtime that works properly as it seems it was a private API before!!!!
At the moment I have and OS3.1.3 responds to the addGestureRecognizer selector!!!!
if ( [self.view respondsToSelector:@selector(addGestureRecognizer:)] ) {
UIGestureRecognizer *recognizer;
... | stackexchange/codereview |
I am converting some old c program to a more secure version. The following functions are used heavily, could anyone tell me their secure counterparts? Either windows functions or C runtime library functions. Thanks.
itoa()
getchar()
strcat()
memset()
| stackexchange/codereview |
I have a Rails app with a few model classes (e.g. Category, Subcategory, User, etc.). In order to implement a not-too-trivial filter functionality, I built a hierarchy of filter classes: FilterCategory, FilterSubcategory, etc., that derive from FilterBase. Each of them uses the appropriate "sister" model class (e.g. Ca... | stackexchange/codereview |
So I am writing a packet sniffing app. Basically I wanted it to sniff for tcp sessions, and then parse them to see if they are http, and if they are, and if they have the right content type, etc, save them as a file on my hard drive.
So, to that end, I wanted it to be efficient. Since the current http library is stri... | stackexchange/codereview |
I have a list pointer in type of A (called ListA) container a vector of pointers B. (Each A object is a container class that has a private attribute: std<vector> *B). Then, I declare a pointer (called C having the same type as A), make a for-loop through ListA to get all pointers B and put them in C. When I quit my pr... | stackexchange/codereview |
New to scheme here and I'm having some trouble learning do loops. I am attempting to make a function that will take in an object and a vector, and then iterate through the vector until it find that object. When the object is found, it would then return a list containing all of the items in the vector before the object.... | stackexchange/codereview |
I am trying to call a function for my stack class. If I have all of the functions within the main file the project works, however, when called from the class it says the the Error: identifier "function name" is undefined. I think it is a simple syntax error, but i can't find it.
main.cpp
#include<iostream>
#include <st... | stackexchange/codereview |
What error handling schemes people use in c++ when its necessary, for X or Y reason, to avoid exceptions? I've implemented my own strategy, but i want to know what other people have come up with, and bring discussion on the topic about benefits and drawbacks of each approach
Now, to explain the scheme i'm using on a pa... | stackexchange/codereview |
Ok, so the application I've written has a service (that tracks GPS data) with a single main activity that binds to it with bindService in it's onStart() method, and unbinds from the service in it's onStop() method using unbindService(ServiceConnection).
I also have an activity which is an options screen, that is laun... | stackexchange/codereview |
I'm learning java and I would like to know how to compile a java program from other directory.
For example, my compiler is in my drive c:\ and I want to compile my java program from drive e:\
How should I do that?
I'm getting this error, what does it mean?
| stackexchange/codereview |
I have a blog, http://sweatingthebigstuff.com and I would like to add an extra line in the footer which will display only from the homepage. I found this code, but it is not working for me. Do I have the wrong syntax or is there something else I can try to get this to work?
<?php if ( is_home() ) { ?>
text
<?php } ?>
... | stackexchange/codereview |
Is there a way to change the hue of a CGImage using the iPhone SDK? I've been trying to get this to work but haven't been able to figure it out. How do I go about accessing and modifying the hue associated with each pixel of a CGImage? Can anyone help me with this. Any help is appreciated.
Thanks.
| stackexchange/codereview |
I have an WPF application. there is a process where the user does the data entry. Now due to too many human error in entering the data, I'm thinking to have the paper scanned and the WPF read it to capture the text. How can I go about this? any suggestions?
| stackexchange/codereview |
I wrote accordion script to deploy in mobile website, every thing is working fine. However I am facing one issue when the page length is increasing.
there are about 8 to 10 bars in accordion. when i am scrolling down and clicking any of the item bar to display content, page is moving to top instead of staying at curren... | stackexchange/codereview |
I notice that there are some stuck threads.
I like to check what could be the cause of the stuck thread just base on the thread dump logs below. Any advise anyone? And also what is the difference between a fat lock and a thin lock?
"[STUCK] ExecuteThread: '25' for queue: 'weblogic.kernel.Default (self-tuning)'"... | stackexchange/codereview |
I've got an ASP.NET web site application targeting the .NET 4.0 Framework and the application exposes some web services using WSE 3.0 (Microsoft.Web.Services3.dll) for security. I'm getting a SoapHeaderException: SOAP header Security was not understood error when I consume the service. I have a very similar setup worki... | stackexchange/codereview |
@Entity public class Organization {
@OneToOne(fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@Cascade(value = DELETE_ORPHAN)
private Days days;
}
I have the following entity definition and it generates a SQL to do a cascade delete on the @OneToOne entry when the parent object get... | stackexchange/codereview |
I want to create an efficient circular buffer in python (with the goal of taking averages of the integer values in the buffer).
Is this an efficient way to use a list to collect values?
def add_to_buffer( self, num ):
self.mylist.pop( 0 )
self.mylist.append( num )
What would be more efficient (and why)?
| stackexchange/codereview |
I am new to iPhone development.
I have a application in which i need to charge .50 USD for each mail the user sends…i have googled for store-kit framework and found nothing useful since i am not sure how to proceed with…
Can you people explain me how can i accomplish that.
Any help can be much appreciated…( it can be l... | stackexchange/codereview |
If my windows is in 32-bit color depth mode, then the following code gets a nice PIL Image from a window:
def image_grab_native(window):
hwnd = win32gui.GetDesktopWindow()
left, top, right, bot = get_rect(window)
w = right - left
h = bot - top
hwndDC = win32gui.GetWindowDC(hwnd)
mfcDC = win32... | stackexchange/codereview |
I have Python 3.1, Subversion 1.6.12, and PySVN installed on Windows XP.
If I open a Python terminal and do
import subprocess
print subprocess.check_output(['svnlook','youngest','D:/svn-repos/myrepo'])
I get the expected revision number.
However, if I add this to Subversion's post-commit.bat, it fails with the error "... | stackexchange/codereview |
$('#Date_Of_Reservation').datepicker({showAnim: 'fadeIn',minDate: twoBussinessDaysToDays(),constrainInput: true});
My function works fine. The graphical calendar works fine as well - graying out the non-selectable dates. The problem is the validation. While the minDate field is working if the user types the date in ma... | stackexchange/codereview |
I need to read 2 dates and compare them.
One date is the current_date (year,month,date)
the other is determined by the business logic.
I then need to compare the 2 dates and see if one is before the other.
How can I do the same in Perl?
I am searching for good documentation, but I am finding so many Date modules in Per... | stackexchange/codereview |
I use qmake as a makefile builder and want to stick to it.
Further I would like to use "gcc -Wall -Werror -Wundef -Wextra" to get robust code.
I'm thinking about "-pedantic" but that's further up the road.
My main problem at the moment are the tons of warnings generated by libraries like
boost, parts of qt and the lik... | stackexchange/codereview |
I have about 50 items on my screen. Each line is a form that contains one select box. Each select box has the same name, "permission_action"
My code:
$("#permission_action").change(function() {
$.ajax({
type: "PUT",
url: this.form.action,
data: "permission[action]=" + $("#permission_action... | stackexchange/codereview |
I'm using the Point Class to manage a list of (x,y) coordinates and I need to sort them in order of X.
I read online to make a new class PointCompare that implements Comparator, however I'm not sure how this works and therefore I have a compiler error in the sortByXCoordinates method.
Help would be appreciated a lot, a... | stackexchange/codereview |
I have an Android application that uses URLConnection to connect to a REST service and gets some content. I am getting a ton of complaints that it doesn't work over a 4G connection like WiMAX, though it works fine over WiFi or 3G connections. Is there anything special I have to do before attempting the REST request t... | stackexchange/codereview |
I just can't get this right. I have a slider to increase my JPanel's size (used as a canvas to draw on).
Whenever the JPanel receives the event, I resize it with setBounds() and I can see it resizing for a split second, but a next Paint or something switches it back to the original size given by the slider's preferred ... | stackexchange/codereview |
I have the resource photos
Currently I have this working: /photos
which shows the photos#index controller which is what I want...
But now I want to also have /projects/2/photos
Which should show photos for that project. Problem is that is pointing to the def index, and somehow I need a separate view for this path.
Thou... | stackexchange/codereview |
I'm trying to control a simple c++ program through python. The program works by prompting the user for input. The prompts are not necessarily endl terminated. What I would like to know is if there is a way to tell from python that the c++ program is no longer generating output and has switched to requesting input.
H... | stackexchange/codereview |
I'm new to Magento, and I want to add customer details to the customer_entity table of Magento. My question is, if I run the following query (via PHP):
INSERT INTO
`customer_entity` ('entity_type_id', attribute_set_id, foo, bar, baz)
values ('some', 'placeholder', 'values')"
);
Is that enough to create a prop... | stackexchange/codereview |
I'm using Visual Studio 2005 with C#. Can anyone please tell me what:
Type 'bar' in Assembly 'foo, Version=5.9.0.25319, Culture=neutral, PublicKeyToken=a3c4e260a36280cd' is not marked as serializable.
means??
Obviously I had to change the names of the classes for proprietary sake, but I'm getting this exception on a ... | stackexchange/codereview |
I have a User table and an Address table. They are connected by a join table. The mapping for that is straight forward, but I have some data on the join table that I would like to show up on the Address table.
There may be a better way to set this up also, which I'm open to suggestions for.
Here is the table structure.... | stackexchange/codereview |
Minor problem, nevertheless irritating : Is there a way to avoid the following message from appearing each time I make a query :
-- Loading resources from /Users/ThG/.sqliterc
| stackexchange/codereview |
Which ORM is best to use with a new Rails 3 app against a legacy MySQL 5.1 database? I do not expect to ever run a migration against this database (though the schema may change from time to time), but I will certainly be writing to it.
| stackexchange/codereview |
For instance, I have DB A and DB Bb, I would like to set up a data flow task where I take the first ten rows from Table A and programmatically put them in XML format in a string builder. Then, once I have it in the stringbuilder, put the entire string into a row in a table in Database B.
My question is simply How do ... | stackexchange/codereview |
I don't get a error message when I compile the code but I cant a proper result.
#include <iostream>
using namespace std;
struct Coord{
int r;
int c;
};
struct CoordwValue{
Coord C;
char Value;
};
CoordwValue* getNeighbors();
int main (){
CoordwValue *k= getNeighbors();
for (int i=0;i<4;i++)
cout<<(k[i].Val... | stackexchange/codereview |
I wrote a small procedure in assembly to draw some text to the screen (first it writes to a buffer, then copy the buffer to the screen with BitBlt)
The function works well, and it draws every 25ms, but i noticed that the memory usage increases over time, and increases a lot.
First, i tried releasing the buffer DC and t... | stackexchange/codereview |
I have Window. Window.DataContext = DataRow.
and i have TextBlock.
I need to bind DataRow.Array[0] to the Text property of a TextBlock.
how do I do it?
edit:
<Window x:Class="Client.payment.CheckMore"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com... | stackexchange/codereview |
<div ID="btnWebL" runat="server" class="left_selected"></div>
<asp:LinkButton ID="btnWeb" runat="server" CssClass="center_selected" OnClick="btnWeb_Click"
Text="<%$ Resources:ViaMura.Web.Default, WebSearchButtonText %>"></asp:LinkButton>
<div ID="btnWebR" runat="serve... | stackexchange/codereview |
I have a tableview whose columns are bound to an array controller. I'm programmatically adding items to the array:
Person is just a custom class;
personsPresent is in another class called Meeting, it's a MutableArray which contains Person objects.
Person *newPerson = [[Person alloc]init];
[[[self meeting] personsPresen... | stackexchange/codereview |
I am creating a function with this line:
window.Spark = window.$ = function(selector, context) { ... };
But I am having a problem (obviously), if I call a function like this $('p').content('Hi!'); then everything works great because I am treating $ like a function. However, when I run a function like this $.ajax('get'... | stackexchange/codereview |
I have an arraylist of strings "abcde"
I want to a method to return another arraylist with all the possible combination of a given arraylist (ex:ab,ac,ad...) in C#
anyone knows a simple method?
NB: all possible combinations of length 2, and would be better if the length is variable(can be changed)
| stackexchange/codereview |
I have an interface with 3 different implementations. I register the 3 implementations as named aliases in the Web.config of the Web application using Unity Container.
Is there a way using Unity, to resolve one of the registered instance, based on some logic. the logic includes contacting a DB to decide on which implem... | stackexchange/codereview |
I want to set an image's source according to its DataContext in a ChildWindow. Here is the XAML file:
<controls:ChildWindow x:Class="CEM.Controls.DialogWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmln... | stackexchange/codereview |
I got here a answer to sort the gridview.
sorting and paging with gridview asp.net
But using the above solution all the grid data sorted while clicking on the any column.
I request a solution which sorts data on the particular page only.
Suppose I have 10 pages with 50 records each page, now if I visit page 7 and so... | stackexchange/codereview |
I want to save recorded file and after that i want to save in sqlite database. How it possible?
Give me some proper guideline on that..
Ayn suggestion welcomes...
| stackexchange/codereview |
I am using SQLiteOpenHelper class to create, open database. for my application i am creating writable object SQLiteDatabase which i am using to read and write data to database. This object is static for main class and used in all application to read write in to database. my application is working properly on emulator. ... | stackexchange/codereview |
I have a legacy class, with a lot of public double fields. All double fields are initialized with Double.MAX_VALUE to indicate that they are empty. (The legacy serialization is coded to ignore the field and not serialize if field is equals to Double.MAX_VALUE).
We are now trying to serialize this class to Xml using JAX... | stackexchange/codereview |
is there a way to parse a .gitignore and tell me if i already have some files that match the ignores so that i know to remove them or change my .gitignore?
example is that i have git tracking my imgs directory, and i wish to ignore all of windows Thumbs.db, and also tell me if I have any left over in my repository bein... | stackexchange/codereview |
I am looking at code of the following form:
class foo
{
public:
foo() {}
//...
};
class bar
{
public:
bar() : ref() {}
private:
const foo &ref;
};
Is initializing a reference using a temporary in this way correct? I know that it is possible to initialize a const reference that's a local variable... | stackexchange/codereview |
This function:
for i in Selection:
cursor.execute(Query)
ydata[i] = [int(x[0]) for x in cursor.fetchall()]
raises:
ValueError: invalid literal for int(): NULL if a null value is found.
How can I make my query return zeros instead of nulls so that I can fix this? (I am plotting the data, so I cannot add "is ... | stackexchange/codereview |
I am trying to submit the form automatically with a delay in a chrome extension I am writing and it does not seem to be submitting. Below is my form and javascript:
function submitForm() { // submits form
document.getElementById("ismForm").submit();
}
if (document.getElementById("ismForm")) {
setTimeout("subm... | stackexchange/codereview |
Is it good to use mysql_close in PHP5? Can I do like Open mysql connection, do some stuffs and at end close database connection??
Is this good approach for heavy web site? means large hit on web site
| stackexchange/codereview |
I have an ASP.NET site that uses a standard, wizard created login control. I have made no changes to it.
Logon works fine, however, one one single computer the Keep Me Logged On doesn't work, it forces me to log on every time I restart the browser. This happens only on one computer (works fine on three others), and it ... | stackexchange/codereview |
i have this werid problem. After a preg_replace, some chinese character became funky character. this is the script.
$message = strip_tags(mysql_real_escape_string($_POST['message']),'<img><vid>');
echo $message;
$message = removewhitespace($message);
echo $message;
function removewhitespace($a)
{
return preg_replace('... | stackexchange/codereview |
This is my ajax pager code below: Now I want to make sure that the link for the current page is unclickable and css should reflect that as well. My pager is keeping track of the current page number, so that is not a problem. The concern is how should I go about making that particular link unclickable and look differe... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.