instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I am trying to use the punjab connection manager with Openfire. I have an already running Openfire server. I have also installed punjab and the server starts properly, allowing me to navigate to the port 5280 on localhost. (Although http://localhost:5280/http-bind gives a "resource not found message".) I am not sure ho...
stackexchange/codereview
Let's say we have some distributed developers in different countries working on the same sharepoint project. Problems that they might face including (but not limited to): webparts deployment & debugging which doesn't work anywhere but the server. how can they apply source control over created sharepoint pages and oth...
stackexchange/codereview
Sorry for this, probably, really newbie question: I want to define a getter that returns bool value. f.i.: attr_reader :server_error? But then, how do I update it, as Ruby (1.9) throws syntax error if there is a question mark at the end: #unexpected '=' @server_error? = true self.server_error? = true
stackexchange/codereview
I'm in need of some pointing in the right direction here... I have a site with a couple of different content types. I want to display this content in a book-like layout. The book should be of a fixed width and height and the pages should be populated with as many nodes as can fit. It should be in two columns, with the ...
stackexchange/codereview
hello everyone can anybody help me with the DFS algorithm : Path* agent_DFS (void* arg1,...); which is written on C program and is about Artificial intelligence which I have to find a way for a car to his goal ..?? it returns an array of type path I got absoloutely no idea about that ... please help me
stackexchange/codereview
Cython version is 0.13, Python 3.1 I have tried all "solutions" in Cython FAQ, but to no avail. My version of Visual Studio is 7.1 and its directory doesn't contain vcvarsall.bat. Is this problem have a solution?
stackexchange/codereview
Hi i have the following code which appends a text base file knowen as a .pgp file; all works fine except that everytime i launch this app i append the text in one continual line i need the text to appned to a new line eveytime it is used. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventA...
stackexchange/codereview
I'm trying to parse a Date from a MS Sharepoint into a java.util.Date. The Details: I query a Sharepoint from a Grails webapp via the SOAP GetListItems method. In the Sharepoint list, the date is displayed correctly, here 09/11/2009 but in the SOAP response, I get 0x01ca60cf|0x94894000 Further, this only happens with d...
stackexchange/codereview
For a client we are going to build a platform for specialized artists where customers can find contractors. This involves building a job board, logins and profile pages for different roles, a quite complex admin interface for managing and charging the deals. We have now done the wireframes and specification, but are st...
stackexchange/codereview
This MDX request works: SELECT [Measures].salescount ON COLUMNS, [Date].[2010] ON ROWS FROM [SalesAnalysis] WHERE [Area].[Shanghai] This one works too (different WHERE condition): SELECT [Measures].salescount ON COLUMNS, [Date].[2010] ON ROWS FROM [SalesAnalysis] WHERE EXCEPT([Product].[All Products].Children, {[Prod...
stackexchange/codereview
Hi I am using a non blocking socket .But while sending messages I am gettng EAGAIN error occasionally. Can you please tell me what are the situation we may get EGAIN error .As I have set the buffer size also with good amount of value .And i am just sending 18 messages of 20 bytes.So I dont think its giving EGAIN becaus...
stackexchange/codereview
I have defined a function that generates ID. I need to increment the numbers every time I call the function. So I used max() function to find the last largest value stored in the list. According to the requirements my ID should also consist of a string in front of the integers. So I have concatenated a string with some...
stackexchange/codereview
Which version of Apache Tomcat is suited for development? When I get to Apache Tomcat download page, there's not a lot information on that issue. Thanks for hgelping
stackexchange/codereview
.Resource table.Tbl td { /* some css*/ } .Resource table.Tbl td.num { /* some css 2*/ } .Resource table.Tbl td.num span.icon { /* some css 3*/ } .Resource table.Tbl2 td { /* some css*/ } .Resource table.Tbl2 td.num { /* some css 2*/ } .Resource table.Tbl2 td.num span.icon { /* some css 3*/ } where the CSS for Tbl...
stackexchange/codereview
I need a list of countries, states & cities based on a collection of lat/long values I have. I need to store this information in a manner that hierarchy is preserve and without duplicates (e.g. "USA" and "United States" and "United States of America" are the same country; I only want one instance of this country in my ...
stackexchange/codereview
imagine i have a table called tbl_pictures: picture_id and picture_name and there are about 500 records in that table. The pictures are stored in c:\mypics\ The problem: not all photos exists anymore, but they ARE still in the table. How can i list only those pictures that DO exist? I do know how to check if a single f...
stackexchange/codereview
I am very new to this topic. Please bare with my silly doubts. I have the following code where I get a name from user and if its null sone exception is thrown. But here i m not getting any exception it i enter null. Please help me import java.io.*; class dbz { public static void main(String args[]) { St...
stackexchange/codereview
I would like to use a class attribute as a default value for one of the arguments to my class's __init__ method. This construct raises a NameError exception, though, and I don't understand why: class MyClass(): __DefaultName = 'DefaultName' def __init__(self, name = MyClass.__DefaultName): self.name = n...
stackexchange/codereview
In my app the functionality required is similar to "contact form". I want that user should be able to send email to me using that contact form. Now the form should contain textFields for Subject and Message Body but the Recipient Email Address should be pre-fixed and should not be shown.As I dont want to disclose my em...
stackexchange/codereview
I have a very strange problem. I have a WCF service and a console application that invokes some of it methods. At some point, it can't invoke one of them any more. It just calls the method, but it never enters it. It just waits and waits.. and nothing ever happens. Should I maybe somehow refresh the service client? I t...
stackexchange/codereview
Is there is any Command to convert ip address in to binary form? Eg: 10.110.11.116 output: 00001010.01101110.00001011.01110100
stackexchange/codereview
I know I can read the PE specification in order to write a code that does this. However, since I don't have a lot of time on my hands, I was hoping some of you might already have such a code sample ready to send. Important note: Is there any difference between 32bit and 64bit? Thank you for your time!
stackexchange/codereview
I added UIWindow and its toolbar like: self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; NSArray * arr = [NSArray arrayWithObjects:@"test1", @"test2", nil]; [[self.window rootViewController] setToolbarItems:arr animated:NO]; No toolbar showing up. Is it doable? Thanks.
stackexchange/codereview
We're having mysterious network problems with MySQL. Simple update query (updating single row using index) usually runs immediately, then sometimes (let's say 1 in 1000 times) fails with timeout. Same with simple insert query. Database is not overloaded. We suspect network problems and are looking for solution, so if ...
stackexchange/codereview
I've created a RESTful web service using spring. I have controllers that are session scoped. When i try to perform a GET request it actually works great but i get an ignored exception while DispatcherServlet tries to determine Last-Modified value. 2010-10-28 11:32:50,487 [http-8080-2] DEBUG org.springframework.web.ser...
stackexchange/codereview
i have a mysql result set like bellow id name --------------------- 1 abc 1 abc 2 xyz 2 xyz 3 pqr now i need to modify the result set so that it would be like as follows: id name --------------------- 1 abc-1 1 abc-2 2 xyz-1 2 xyz-2 ...
stackexchange/codereview
I have an app I'm writing in PySide that has a QML UI. I have subclassed QAbstractListModel in Python: class MyModel(QtCore.QAbstractListModel): def __init__(self, parent=None): QtCore.QAbstractListModel.__init__(self, parent) self._things = ["foo", "bar", "baz"] def rowCount(self, parent=QtCor...
stackexchange/codereview
If I make a Visual Studio 2010 WinForms project and let the wizard add Form1. Then I add a ListBox to Form1. Then I add a form with "Project/Add Windows Form", and add a ListBox to that form (Form2). And then change in my "Program.cs" file the line Application.Run(new Form1()); for Application.Run(new Form2());, the Li...
stackexchange/codereview
In the following code the self.viewDelegate is 0x0 and I don't know how to solve this problem. Should I have to go to the interface Builder? - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; if ([touch tapCount] == 2) { if ([self.viewDel...
stackexchange/codereview
I have got a bean class named Bean1. In my main method I have got a string containing the name of the variable: String str= "Bean1"; Now how can I use the String variable to get the class and access the Bean properties?
stackexchange/codereview
Can somebody please explain connection pooling to me please? I am just not understanding it by searching the internet.
stackexchange/codereview
I have generated a client using Axis2 framework with XMLBeans as the data binding method. The XSD schema is the following: <xsd:schema> <xsd:element name="profile" type="anyType"/> </xsd:schema> The java object generated which takes part of the SOAP request contains getter and setter methods that allow to get a...
stackexchange/codereview
My genius IT Analyst decided at the last minute she wants ALL trademark symbols to be 2 sizes smaller than it's surrounding text. Since we don't have time to add tags to the entire template and CSS, we need a quick fix. How can I replace ALL instances of the TM symbol with something like "<span style="font-size:1em;">...
stackexchange/codereview
I have a Main field which consist the value of 10 other fields for each document , when I tried to sort this field value in the view column using the column sorting properties I didn't get the desired result. Here is the example how value is displaying - 10.other 10.other 1c.NSR 10.others 1c.NSR 2b.First in Fab 10.oth...
stackexchange/codereview
I'm using the Freebase Python library. It creates a log before executing: self.log = logging.getLogger("freebase") Where is this log in the file system? It's not in the executing directory or tmp.
stackexchange/codereview
What is the right approach when users (authenticated domain admins) should be able to start batch jobs (usually exe files) from an IIS (7.x) aspx (c#) page? This is an intranet site. The batch jobs have to run on the web server as Domain Admins. The website pool is executed by network service or some similar restricted...
stackexchange/codereview
I am new to the Silverlight. At the runtime i am assigning cellEditTemplate to the cell, now when user double click on perticuler cell then it opens that perticuler cell in edit mode. now while entering to the edit mode, I have to fetch the control from edittemplate and need to assign the value. But I am not able to ...
stackexchange/codereview
How do I adjust the screen brightness in C#?
stackexchange/codereview
A bit similar to this question. My aim is to evocate a notebook-like look of the textbox. OneNote does something similar, by setting background image of the editing surface. Of course it is not possible to align the lines in OneNote because the text can be freely formatted. I would like to do this with constant font ...
stackexchange/codereview
Why is this not correct. What is wrong with it?? #!/usr/bin/ruby require "mysql" class Game attr_accessor :id, :name, :urlName, :description, :hits, :categorys, :width, :height, :nilGame def load(id) #Load mysql begin # connect to the MySQL server con = Mysql.new('localhost', 'user', 'pas...
stackexchange/codereview
I have been developing a DVD player using vlc version 1.1.1 libraries and have recently upgraded to version 1.1.4. Previously I have been getting the current vlc_object_t by using libvlc_get_vlc_instance and then using the object, along with the relevant key information, in subsequent calls to __var_SetInteger. This m...
stackexchange/codereview
I am writing integration tests and in one test method I'd like to write some data to DB and then read it. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:applicationContext.xml"}) @TransactionConfiguration() @Transactional public class SimpleIntegrationTest { @Resource pr...
stackexchange/codereview
i am trying to record a video from front camera of iPhone 4 using AVFoundation Framework with the help of WWDC samples i got from iPhone developer program. But i still cant get it to work..the video does not get recorded or mayb saved in my iPhone library...here's the code i am trying to use...it would b really helpfu...
stackexchange/codereview
I have to create report using itext but the language should be hindi or marathi. Is it possible to make pdf file which contains marathi font like mangal,shruti,shree-dev...etc if yes plz reply me Thank you!
stackexchange/codereview
$5.2.11/7 - "[Note: Depending on the type of the object, a write operation through the pointer, lvalue or pointer to data member resulting from a const_cast that casts away a const-qualifier68) may produce undefined behavior (7.1.5.1). ]" The wordings of this section (C++03) are surprising to me. What is ...
stackexchange/codereview
The question: Publications This view has two levels. The first level will list all members who have associated Journal or Conference Paper records. The second level lists the titles of the papers for a selected member; the entries in this view are links to the actual papers. And all I can find from my professor's...
stackexchange/codereview
As I know there are some properties that allow to make every elements in WrapPanel have same width (ShareSizeScope). Now I want to archieve the same output in silverlight but there's no such property. Are there any properties or other ways that can help me to get same output as in WPF?
stackexchange/codereview
Lets consider I have the following function: SomeType createSomeType(); which can throw depending on some reasons. Then: SomeType val = SomeType(); // initial value try { val = createSomeType(); // here } catch (std::exception&) { } If createSomeType() throws, can I always assume that val value is unchanged ?
stackexchange/codereview
begin reset(f); assignfile(f, 'data.txt'); Reset(f); found:= false; search := edit1.text ; repeat read(f, phone) ; read(f, cusfname); read(f, adress); found:= search = phone until eof(f) or found; if found then memo1.append(phone); memo1.append(cusfname); memo1.append(adress); closefile(f...
stackexchange/codereview
I have inherited a legacy application where all the dates and times are stored in the local timezone (UK). I am not in a position to change how these are stored. However, the requirement is to display all the dates in GMT within the app. Therefore when I retrieve a list of events from the database I need it to display...
stackexchange/codereview
I have a solution in VS 2010. There are two DLL projects: one UserControl in C# WPF (myCSharpUC) and other - WinForm UserControl in VB.NET (myVbUC) Actually in myCSharpUC I have an instance of myVbUC: myCSharpUC { private MyVbUC vbControl; ... somemethod() { vbControl.MyProperty } } Is ther...
stackexchange/codereview
I need the information to create frames in erb rails. I need to display the links in a frames instead of provide as link to new window. Eg. a href="taxas?[gm]=<%= prefer.genus_name %>&[sp]=<%= prefer.sp_epithet%>" target="new">Link /a This should be modified as frame href="taxas?[gm]=<%= prefer.genus_name %>&[sp]=<%=...
stackexchange/codereview
I'm not really fascinated by TabView in Android. So I've got a crazy idea how to do a "handmade"-almost-TabView. Before I start to implement it, I decide to ask you, if this idea too bad, what are negative or positive sides of it. Assume the whole application should include tabbar. The Layout of every activity will ge...
stackexchange/codereview
Hello i'm trying to change scale GDIplus::Bitmap and save in memory scaled BItmap, and i have problem. I try many different sample, and my result is NULL. For Example I try change resolution for image, using SetResolution, also i try convert bitmap from image->graphic and use one of constructors GDIplus::Bitmap scale,...
stackexchange/codereview
I am getting following error when using AxAcroPDF System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) The line which throws error is ((System.ComponentModel.ISupportInitialize)(this.axAcroPDF1)).EndInit(); If anyone knows the so...
stackexchange/codereview
How to authenticate encrypted password at LDAP server
stackexchange/codereview
I am trying to make a game where a player has to find his way from Start to End on the Game Board. As you see this Game Board contains a bunch of red circular obstacles. To win the game the player has to remove a minimum amount of obstacles. So my question is, how do I programmatically find out the minimum amount of ob...
stackexchange/codereview
The code I want to work: <Extension()> Public Function NValue(Of T)(ByVal value As Nullable(Of T), ByVal DefaultValue As T) As T Return If(value.HasValue, value.Value, DefaultValue) End Function So basically what I want it to do, is to give along a default value to a nullable object, and depending on if it's null ...
stackexchange/codereview
I've a white fieldset on a blue background. I didn't apply any padding inside the fieldset, but it looks like there's a 5px padding applied for all the other browsers: Except for Internet Explorer. If I apply 5px, then IE looks fine, but there is too much padding for the rest of the browsers. Seems like they add up. Th...
stackexchange/codereview
i need to parse this response in android using the android json parser but the thing i cant find the answer to anywhere is: how do i parse the data if for example "itineraries" can contain one or sometimes more objects of the type itinerary? if it contains one than it is returned like this but if it contains more it is...
stackexchange/codereview
I wanted to know if any porting is available for back trace implementation for uclibc in arm that I can use in my signal handler to debug segmentation faults. I did come across a useful code here and tried using it inside my signal handler but it fails at the first check and returns from there. I also tried a recurci...
stackexchange/codereview
I'm trying to use a regexp using sed. I've tested my regex with kiki, a gnome application to test regexpd, and it works in kiki. date: 2010-10-29 14:46:33 -0200; author: 00000000000; state: Exp; lines: +5 -2; commitid: bvEcb00aPyqal6Uu; I want to replace author: 00000000000; with nothing. So, I created the regexp,...
stackexchange/codereview
I'm using the code in this article to create a DataGridViewProgressCell which takes an integer between 0 and 100 and displays the value as a percent along with an image that looks like a progress bar in a DataGridView cell. This works fine when I'm not using a databound DataGridView, but when I databind to a list of ob...
stackexchange/codereview
if (//some condition) { //some code } else { //other code } or if (//some condition) { //some code } else { //other code }
stackexchange/codereview
I have been asked to research teaching a module in game development to beginners (no programming skills) of the age group 18-30, at a secondary school level. The course will run for roughly 8-10 months and each student would probably get 3 hours of teaching time per week. My initial thoughts were to propose using Flas...
stackexchange/codereview
From what I've read, it seems like I should be able to set up a folder, e.g. tests/ , put a few files in it with unit test classes, and then run phpunit on that file and have it find and run the tests. For whatever reason, in my installation (on OS X), it thinks the folder tests/ is a file, or so it would seem: $ ls te...
stackexchange/codereview
I've been trying to query an email address using the following statement, however after hours of trying to escape the string successfully I've accepted defeat. The query I am using is: SELECT id, email FROM user WHERE email = '$email' That gives me an error: MySQL Error: You have an error in your SQL syntax; check th...
stackexchange/codereview
I'm receiving a bunch of values from my server for various dates with each value corresponding to half hour of a day,i.e for today there will be 50 values...it'll be a basic keyvalue pair like the one below valsFromServer[28/10/2010 00:00:00] = 23; valsFromServer[28/10/2010 00:30:00] = 100; valsFromServer[2...
stackexchange/codereview
In preperation for my upcoming Concurrent Systems exam, I am trying to complete some questions from the text book "The Art of Multiprocessor Programming". One question is bugging me: Exercise 129: Does it make sense to use the same shared BackOff object for both pushes and pop in our LockFreeStack object? How else cou...
stackexchange/codereview
I looked at this topic: configuring search engine friendly url (mod_rewrite) and understand how the rewrite rules would apply, but need help understanding how to adopt them for websites that have static and dynamic URL's. From the topic above, the rewrite rules would first look for a file that existed in the URL, and d...
stackexchange/codereview
Before I dive in to the jQuery/Sizzle source I thought i'd ask here about ways to speed the below method up. This is a standard "Check All" checkbox scenario. A header cell (<thead><tr><th>) has a checkbox that when checked checks all other checkboxes in it's table's tbody that are in the same column. This works: // We...
stackexchange/codereview
I have a file with bunch of words in which many of them don't make much sense such as 'completemakes' or even #s mixed with letters/words. What I need is to use a tool to spell check them, if it exists on the dictionary leave it, if not delete it. What would be a good way of doing this in bash? Thanks
stackexchange/codereview
The following code shows that I can insert uncompatible type into Map, but when I can not retrieve element from it. In the following example, I can put two integers into Map, but if I uncomment the last two lines, I will get ClassCastException. Is this bug of JDK, or I miss something, as I remember Java generic guaran...
stackexchange/codereview
I have created a subclass of a UIView which is a rotating wheel. This wheel is part of another UIView which has an image in the top right corner. When the wheel is turned, in the touchMoved function the right most item is returned (its number). I need to then change the parent's image automatically when the subview is...
stackexchange/codereview
In my code I've been making functions like: public void Foo([ParamsDictionary] IAttributesCollection kwargs) {} But I got curious. What all implements that interface? So I pulled down the IronPython source. In it I found this file: Src\Runtime\Microsoft.Scripting\Runtime\ParamDictionaryAttribute.cs On lines 24-30 ...
stackexchange/codereview
So i want to change the cursor from #sideBar ul li .template{ cursor:pointer; } to maybe cursor:move; when the user is dragging...is there something i can use in jQuery or html to make this happen you hold down the mouse button
stackexchange/codereview
I am tasked with i18n-ing our current CMS setup in Drupal. The problem that I am facing is with use of module_invoke() to place blocks within nodes. I have managed to string translate blocks, and that is working when a block is placed in a region (block content is successfully translated) using the UI. However, when...
stackexchange/codereview
I am making Windows Mobile 6.5 Application using C sharp. In the application, I am opening the default browser in a case. When I open the browser, the application is still runing in background. But I wish that the application is not runing and when the user returns to the application, the application is runing again. ...
stackexchange/codereview
i want to load a page after a textbox looses its focus.But it not working. What is wrong in it? $(function() { $("#txtBox").blur(function() { $('#LoadPage').load("Defult.aspx"); }); });
stackexchange/codereview
Hi my PHP session is lost when using a pagination script. can someone explain why this would happen? I tried putting session_start() at the top off all the paginate script file but that did not work. session_start(); $_SESSION['user'] = $line['UserName']; $_SESSION['pass'] = $line['Password']; $...
stackexchange/codereview
Hey I have the following situation: a WinService which is processing some stuff from a queue, writing to other tables (during processing) and after it finishes it deletes the entry and moves to the next one. I would need a mechanism to determine if the instance is alive and going and if not to start or wake up a second...
stackexchange/codereview
I'm trying to do something pretty basic here. I just want to make the font of my code larger so I can see it better. How do I do that? Thanks!
stackexchange/codereview
I have an ASP.NET MVC Form, but the data from it needs to be posted via jQuery (not ajax). It cannot be submitted using the normal model, because the Controller Action requires a JSON string, and the only way to get that string is to use jQuery's $.post method to turn the data into JSON, and then post it to the Control...
stackexchange/codereview
I have installed Jira and the subversion plugin (with success from what i can tell from the administration panel - subv. plugin installed). I then add a repository that I have created on the file system, BUT i cannot see an option which will link/connect a new or existing project to a SVN repository. What i want to do ...
stackexchange/codereview
I can't seem to install zlib properly, I installed Python from source on Ubuntu10.4 '######## edit ##################### bobince and Luper helped. Make sure you install these packages and then recompile Python: sudo aptitude install zlib1g-dev libreadline6-dev libdb4.8-dev libncurses5-dev '###########################...
stackexchange/codereview
I've started reading C++ Templates - the complete guide by Josuttis and Vandevoorde. And my tiny mind is stuck. The authors state that "You should limit your changes to the number of parameters or to specifying template parameters explicitly", using this as an example that causes problems: template <typename T> inline ...
stackexchange/codereview
Folks, I've got my sample application for WP7 running. I've also got a service (WCF) and I've got a push notification sender (WPF). So far this looks pretty similar to the push notification arrangement that Microsoft has set up in the WP7 training kit. When I launch the app and then exit the app to go back to the hom...
stackexchange/codereview
I am trying to use the SpellCheck class C# provides (in PresentationFramework.dll). But, I am experiencing problems when trying to bind the spelling to my textbox: SpellCheck.SetIsEnabled(txtWhatever, true); The problem is that my txtWhatever is of type System.Windows.Forms and the parameter this function is looking f...
stackexchange/codereview
what's better for JPA/Hibernate composite primary keys, @IdClass or @EmbeddedId implementations and why? This is an intentionally naive question. I decided to use @EmbeddedId (for whatever reason) and I feel like I made the wrong choice. Dereferencing the embeddedId that contains the column properties is redundant and ...
stackexchange/codereview
The menu structure I have is given below. The necessary requirements are: Each li must be a toggle where it can be selected and deselected for items 1-4. Multiple li's can be selected between the range of 1-4. So a user could select Item 1 & Item 3 and their background would both be highlighted. Upon hovering over ...
stackexchange/codereview
I am using the following code to set the cr0 bit to disable cache. When I compile this #include <stdio.h> int main() { __asm__("pushl %eax\n\t" "mov %cr0,%eax;\n\t" "orl $(1 << 30),%eax;\n\t" "mov %eax,%cr0;\n\t" "wbinvd\n\t" ...
stackexchange/codereview
I am working on many C-sourcecode files which contain many preprocessor #if, #elseif and #else statements. This statements often check for a #define, e.g. #if(Switch_TestMode == Switch_TestModeON) /* code 1 */ #else /*code 2 */ #endif Often this preprocessor statements are located within c-if statements which makes th...
stackexchange/codereview
I have this database structure CREATE TABLE `productinfo` ( `ProductID` int(11) NOT NULL AUTO_INCREMENT, `ProductName` varchar(255) NOT NULL, `ProductImage` varchar(255) NOT NULL, `CategoryID` int(11) NOT NULL, `SubCategoryID` int(11) NOT NULL, `ProductBrief` varchar(255) NOT NULL, `Features` text NOT NUL...
stackexchange/codereview
I don't often have to modify multiple commit messages, but it has happened once or twice and I don't ever remember seeing this. I hope someone else has. When I git rebase -i HEAD~7, the expected list opens in vi exactly as expected. I change the pick values to edit where appropriate and then :wq. Could not execute edi...
stackexchange/codereview
I am trying to read in an array from ObjectInputStream in Java. I can find no documentation on how to do this. I assume that it is readObject(), but this doesn't seem to work. out.write(Object) out.write(Object) out.write(boolean[]) ... in servlet ... Object one = in.readObject(); Object two = in.readObject(); boole...
stackexchange/codereview
Hey all, I was hoping for some general advice. We have a small web-based game we've been running and testing, and for the future, we are interested in selling in-game items/tokens with PayPal. Essentially, these items are just numbers in a database, so I'm after some very general ideas about how to go about doing this...
stackexchange/codereview
I am trying to pause music that is playing when the headset is unplugged. I have created a BroadcastReceiver that listens for ACTION_HEADSET_PLUG intents and acts upon them when the state extra is 0 (for unplugged). My problem is that an ACTION_HEADSET_PLUG intent is received by my BroadcastReceiver whenever the activ...
stackexchange/codereview
For a CMS product/platform, what would be a maintainable and clear approach for editing and storing settings? I'm not talking about technical (connstring, nh config, ...) settings, but settings that alter the behaviour of the product: These settings are for example Online Payment settings Available parts and modules D...
stackexchange/codereview
I have a hashmap, I wish to get an array of the values in this hashmap, but I wish for the array to be sorted by the keys in the hashmap. For instance if the map looks like this: <2,obj1> <4,obj2> <0,obj3> <10,obj4> <5,obj5> <1,obj6> <15,obj7> <3,obj8> I want the array to be: [obj3,obj6,obj1,obj8,obj2,obj5,obj4,obj7]...
stackexchange/codereview
ArrayList userItem = new ArrayList(); userItem.add(item.getUserId()+"|"+item.getEmail()+"|"+item.getImgInstance()); ArrayList userItem = onlineUsers.get(item.getImgInstance()); I want to know what the last line will do to the list will it append the value of onlineUsers.get(item.getImgInstance()) in the previous str...
stackexchange/codereview