I would like to plot a line with two-color dashes, say red-blue-red-blue-...
I know I could do it like this:
plot([1,2],[1,2],'r'),
hold on,
plot([1,2],[1,2],'--b')
However, since I need to be able to move the line, among others, it should only have a single handle. How could I do this?
I have some strings I want to write to a file in VB6, I can write it fine but every time I do it adds a new line automatically after each write command.
Is there a function or a way to just write to the file without the automatic new line? Thanks.
We are currently distributing a WinForms app without .pdb files to conserve space on client machines and download bandwidth. When we get stack traces, we are getting method names but not line numbers. Is there any way to get the line numbers without resorting to distributing the .pdb files?
Hi,
I am using busybox shell to execute a script which the bash executes when i boot linux using the nfs. Please let me know the correct alternative for this line.
cur_major=$((0x`stat -c %t $dev 2>/dev/null`))
The busybox throws in an error saying "0x" syntax error, which i understand is the problem with the syntax of this line.
Thanks in advance
Im working on a script to run through a CSV file (see previous post)
I ran into a weird thing, where if my actual CSV file itself has a blank line at the end of it, it will open and parse just fine, but if it doesn't, if the end of the file ends at the end of the last line, it just shows up blank.
I'm trying to read XML that is being pushed to my java app. I originally had this in my glassfish server working. The working code in glassfish is as follows:
public class XMLPush implements Serializable
{
public void processXML()
{
StringBuilder sb = new StringBuilder();
BufferedReader br = null;
try
{
br = ((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getReader ();
String s = null;
while((s = br.readLine ()) != null)
{
sb.append ( s );
}
//other code to process xml
...........
.............................
}catch(Exception ex)
{
XMLCreator.exceptionOutput ( "processXML","Exception",ex);
}
....
.....
}//processXML
}//class
It works perfect, but my client is unable to have glassfish on their server. I tried grabbing the raw xml from php, but I couldn't get it to work. I decided to open up a socket and listen for the xml push manually. Here is my code for receiving the push:
public class ListenerService extends Thread
{
private BufferedReader reader = null;
private String line;
public ListenerService ( Socket connection )thows Exception
{
this.reader = new BufferedReader ( new InputStreamReader ( connection.getInputStream () ) );
this.line = null;
}//ListenerService
@Override
public void run ()
{
try
{
while ( (this.line = this.reader.readLine ()) != null)
{
System.out.println ( this.line );
........
}//while
} System.out.println ( ex.toString () );
}
} catch ( Exception ex )
{
...
}//catch
}//run
I haven't done much socket programing, but from what I read for the past week is that passing the xml into a string is bad. What am I doing wrong and why is it that in glassfish server it works, and when I just open a socket myself it doesn't?
this is all that I receive from the push:
PUT /?XML_EXPORT_REASON=ResponseLoop&TIMESTAMP=1292559547 HTTP/1.1
Host: ************************
Accept: */*
Content-Length: 470346
Expect: 100-continue
<?xml version="1.0" encoding="UTF-8" ?>
Where did the xml go? Is it because I am placing it in a string? I just need to grab the xml and save it into a file and then process it. Everything else works, but this.Any help would be greatly appreciated.
I have a SSIS package I am trying to schedule. I create a new job under SQL Server Agent. On the Command line tab of the jobstep, I choose "Edit the command-line manually".
The changes are retained as I switch from tab to tab within the job step but whenever I exit and save the job, the changes are lost.
Any ideas what's going on?
I'm on SQL Server 2008.
Hi -
I use Cocoa Emacs 23.1.91 and I want to always have hl-line-mode turned off as I don't like using it. I can turn it off per buffer via M-x hl-line-mode, but that is tedious. Any help is appreciated!
Thanks
How would I smooth a line (UIBeizerPath) or a set of points? Right now it draws it jagged. I read about spline interpolation, could anyone point me to an implementation of this in cocoa or C or give me an alternate line smoothing algorithm.
Can we determine, in our code where we have mistake which causes to segmentation fault
After writing some code ,to determine where i have segmentation fault,
can gcc show me you have mistake(or error typing) in ... line because of the that line
you encounter with segmentation fault.
I am using cat *.txt to merge multiple txt files into one, but I need each file to be on a separate line.
What is the best way to merge files with each file appearing on a new line?
Every so often on here I see someone's code and what looks to be a 'one-liner', that being a one line statement that performs in the standard way a traditional 'if' statement or 'for' loop works.
I've googled around and can't really find what kind of ones you can perform? Can anyone advise and preferably give some examples?
For example, could I do this in one line:
example = "example"
if "exam" in example:
print "yes!"
Or:
for a in someList:
list.append(splitColon.split(a))
In VS 2008, we were able to add a max line length guide ref: http://blog.feradz.com/2009/02/add-line-length-marker-in-visual-studio/
However when we attempt to do the same thing in VS 2010, it does not work. Does anyone know how to achieve this in VS 2010?
I'm having an issue trying to parse the ascii part of a file, and once I hit the end tag, IMMEDIATELY start reading in the bytes from that point on. Everything I know in Java to read off a line or a whole word creates a buffer, which ruins any chance of getting the bytes immediately following my stop point. Is the only way to do this read in byte-by-byte, find new-lines, reconstruct everything prior to the new-line, see if it's my end tag, and go from there?
I am working on an in-place HTML editor, concentrating on Firefox only right now. I have an element inserted where the cursor should be and also have left and right arrows working, but I can't seem to find a way to find:
Start and end of a line for the home and end keys
The next line up or down for the up/down arrows.
I see document.elementFromPoint, but this doesn't get me a Range object. The Range object itself seems rather useless when it comes to using pixel positions.
Hi,
How to prevent the new line character at the beginning of the text entering in a multiline text box? Now, I already trimmed the white space at the beginning of the text. but i can't prevent the new line character that has to be occurred by entering the enter key on the most beginning of the text box. Please help me. thanks in advance.
Does anyone know how can the horizontal control line be removed or made invisible.
What am trying to say is, I just want to show the drag-thumb and not the horizontal line.
Is there a way to do so, with out using skins?
Regards
Zeeshan
In Microsoft SQL Server Management Studio 2008 there is a "Generate scripts..." option under the Tasks menu. I'm just wondering if this tool is available from the command line somehow?
It looks similar to the sqlpubwiz.exe command line tool that was available for SQL Server 2005, but I can't find this executable anywhere in the SQL 2008 installation.
I have the following line of code.
<%= Html.Encode(string.Join(", ", item.company1.companies.Select(x => x.company_name).ToArray())) %>
Would it be possible to somehow replace the comma with a line break?
This is a question to put as many interesting and useful JavaScript functions written in one line as we can. I made this question because I'm curious how many people around like the art of one-Line programming in JavaScript, and I want to see their progress in action.
Put variations of each code inside comments.
hello!
I need to extract the zipcode from file's line.
each line contains an adress and is formatted in a different way.
eg.
"Großen Haag 5c, DE-47559 Kranenburg"
or
"Lange Ruthe 7b, 55294 Bodenheim"
the zipcode is always a five digit number and sometimes follows "DE-".
I use Java.
Thanks a lot!