in java what is the syntax for commenting out multiple lines?
i want to do something like:
(comment)
LINES I WANT COMMENTED
LINES I WANT COMMENTED
LINES I WANT COMMENTED
(/comment)
I am building a part of a simulator. We are building off of a legacy simulator, but going in different direction, incorporating live bits along side of the simulated bits. The piece I am working on has to, effectively route commands from the central controller to the various bits.
In the legacy code, there is a const array populated with an…
I'm looking for a way to make a directory accessible only to its parent directories. That is, suppose you have two directories, A and B, at the same level in the file hierarchy. Now suppose that you have a directory A' which is a subdirectory of A. I'd like to enforce that A is able to access the contents of A' but B is not.
this one creates an error:
@settings = {
:tab1 => {
:name => {
:required => true
},
:description
}
}
need to change :descrpition to :description = {}, but i don't have any values for :description so i want it to remain as is (without the empty = {})
Would you show me the best way to handle…
After trying to find a reference to an API/tutorial to such thing, I have come here.
I would like to scan a specific group wall, pulling all posts from it, with PHP or C#.
In the end, I would like to have a nested-array containing each posts, with the next details:
An array of the related comments
Likes
Views
Obviously, I don't ask for…
Hey everyone, I'm working on a runnable java applet that has a fill feature much like the fill method in drawing programs such as Microsoft Paint.
This is how my filling method works:
1.) The applet gets the color that the user clicked on using .getRGB
2.) The applet creates a 2D boolean array of all the pixels in the window, with…
Hello,
We need to write software that would continuously (i.e. new data is sent as it becomes available) send very large files (several Tb) to several destinations simultaneously. Some destinations have a dedicated fiber connection to the source, while some do not.
Several questions arise:
We plan to use TCP sockets for this task.…
hi everyone,
I'm creating an app which has more UIImageView on a View, they should move normally from a side to the other. I have an issue: after entering the second image, the two UIImageView start to behave crazy (!) because they don' move freely, but they are like restricted in two different areas not touching each other even if I…
I am using tag field as a flag for text fields text view fields for auto-jumping to the next field:
- (BOOL)findNextEntryFieldAsResponder:(UIControl *)field {
BOOL retVal = NO;
for (UIView* aView in mEntryFields) {
if (aView.tag == (field.tag + 1)) {
[aView becomeFirstResponder];
retVal = YES;
break;
}
…
I recently saw that the boost program_options library throws a logic_error if the command-line input was un-parsable. That challenged my assumptions about logic_error vs. runtime_error.
I assumed that logic errors (logic_error and its derived classes) were problems that resulted from internal failures to adhere to program…
I'm working on a Java program that needs to send an image (preferably in PNG format, though I could perhaps use another format if necessary) over the network. The logical way to do this is, of course, to first send the length of the PNG image data, then the data itself. Problem: I don't see any method in ImageIO or anywhere…
I'm trying to create a grouped table view with two sections. For the first section I would like the width to be only half the screen. For the second section it would be the standard width. Also, next to the first section I would like to put a button.
How is this done?
Thanks!
Ruby Newbie here,
I understand that everything is an object in Ruby, one thing that I wasn't sure about was understanding Variables. Variables basically give reference to objects (correct me if I'm wrong). During an instructional video, the teacher did a demonstration which went as below:
(irb)
a = 100
==> 100
b = a…
hi,
I have a 4000px width image slap on the header of my site. for now, the way I hide the horizontal browser scrollbar is with this:
html
{
overflow-x: hidden;
}
Unfortunately that will make the horizontal scrollbar never appear. I would the browser scrollbar to appear when the main content of my site is hidden…
I have two generic lists, both containing different data, except 4 fields, which I want to compare to another list and find items that do not match in either list.
I need to basically replace where it says equals below, with not equals!
var unMatchedData = from liveLines in liveList
join oldList in…
One of my users had a single error while opening a file (I'm using standard xml 1.0):
The remote name could not be resolved: 'www.w3.org'
I found a post here in StackOverflow that deals with this and it suggest setting the XmlResolver property to null. I've tried this, and all my documents still seem…
I have a div that I want to have the following characteristics:
Width = 50% of its parent element
Height equal to whatever it needs to be in order to maintain a certain aspect ratio.
I need to use percentages because the object will resize left-right when the browser is resized. I want the object to…
Hi there, can anyone explain why named anchor tags would not work in safari but work fine in other browsers: ie, ff, opera, chrome.
I have some links to different areas of the same page and nothing happens when clicking on them in safari only. All the other browsers mentioned take me to that area of…
I was just wondering how to send an int from a Java application to a C application using sockets. I have got different C programs communicating with each other and have got the Java application retrieving data from the C application, but I can't work out sending.
The C application is acting as…
So I've been learning C++ and SDL to make some basic 2d games. I want to create a game sort of like World of Warcraft but a 2D version. I want it to be on-line and use a database or something to start data like amount of Gold, HP, etc. I was wondering though, if I do this in SDL, would it still…
Using JDO / DataNucleus / NeoDatis datastore
I added @Unique to a field of a persistable object, however I am allowed to create multiple objects which violate the unique constraint. The docs for DataNucleus/NeoDatis suggest that Unique fields are supported.
@PersistenceCapable
public class…
I have an existing project that I imported into subversion using TortoiseSVN. Total project size says 1.45MB. Total folder size on my machine is 9.72MB.
Create new folder, right-click, checkout 7.14MB transferred and 19.4MB on my machine.
Can anyone explain this to me? I did a quick KDiff…
What I am doing is replacing, in a large program, all $_REQUEST['var'] and mysql_escape_string($_REQUEST['var']) with either the 1st or 2nd line below the dotted line.
Now, I have figured out this much of the regular expression but I would like to make it simpler. Instead of having to run…