FAQ Database Discussion Community


Batch - Comparing two txt files

windows,batch-file,text,comparison
I have some difficulties comparing two txt files with batch. I used the "findstr" function with many option matchings but none works (for example FINDSTR /I /V /B /G:file1.txt file2.txt). I have a first txt file as following: File1.txt Object 1 Argument 50 Object 2 Argument 10 Object 3 Argument...

jQuery text animation from right to left

jquery,animation,text
I try to achieve the same animation with jQurey animate for social sharing what this site uses in footer when you click on Share. I was trying to build the animation but the list on toggle does not behave as expected. my markup <div id="social-media"> <a href="#" class="social-shares"> SHARE</a> <ul...

Text justification C language

c,text,alignment
I have to solve a problem that involves left justification string length and leading zeros. I have the following table : BEGIN CLOSE CONCATENATE DELETE END INITIALIZE PRINT WRITE This is produced by a simple program. My problem is to find out how to convert it like that : It...

how to change text direction to the right slide of switch in android?

android,text,switch-statement
In default mode , text of a Switch sit on the left side of ON/OFF states. i want to change direction of this text to the right slide. how can i do this? I already try this xml code but not working: <Switch android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/switch1" android:layout_gravity:"right" android:layout_margin="@dimen/abc_dropdownitem_text_padding_right" /> ...

Replace text between two special characters

regex,r,text,replace
I have a character vector as: x<- "\t\t<taxon id=\"TOT_F50\"/>" and y<- "TOT_A01" and I want replace TOT_F50 with the text in y ("TOT_A01"). Do you know how to replace the text between " and \ (i.e. "TOT_F50) ? ...

Trying to get just the text from a node with filter(), but is returning an object?

javascript,jquery,dom,text
I am simply trying to extract the text without any of the elements from a DOM node with var textIWant = $('.classname').contents().filter(function(){ return this.nodeType === 3; })[1]; This returns to me what looks like a string in the console, something untrimmed like.. " text I want " so when I...

Changing a read-only file [on hold]

python,text
I need to change text documents. The way I've been doing it is making a new file, copying everything line by line from the old file and making changes on the way, then saving the new file as the old file's name. This becomes a problem when I only have...

How do I make the text of one label node take up 2 lines?

xcode,string,swift,text,sklabelnode
I have this text below that is too long to fit on the screen when it runs. How can I make this 2 lines rather than one? myLabel.text = "The weather today is going to be partly cloudy with a chance of rain" ...

Rails. Why does my submit button say Create vs. Update depending on

ruby-on-rails,button,text,submit
Be gentle to the newbie...... Ruby version 2.2.2p95, Rails version 4.2.1. I completed the sample blog application. Works great, and I've been expanding on it. But I'm a noob, and clearly missing something fundamental. From the main index, you are presented with a listing of articles, and you have some...

x axis text overlapping in matlab

matlab,text,overlap
My x axis text are overlapping. I am using this code-- clear all A=[1 2 3 4 5 6 7]'; b=1:length(A); figure(1) bar(A) title('Loss Diagram') xlabel('Loss factor') ylabel('kWh/year','fontsiz`enter code here`e',20) grid on set(gca,'Xtick',b,'XtickLabel',{'Horizntl Global Irr. ' 'Effective irr. on coll. ' 'Array nominal energy ' 'PV module loss ' 'charge...

Error: Getting symbols in python output

python,python-2.7,text,file-io,editor
#I wrote the following code for making a text editor. print "This is a simple text editor" from sys import argv script, name = argv print "You have selected the file : %s" %name print "Opening the file...." t = open(name, 'r+') print "The contents of the file are" print...

How to remove numbers from text in Scala?

regex,scala,text,apache-spark
How to remove numbers form a text in Scala ? for example i have this text: canon 40 22mm lens lock strength plenty orientation 321 . after removing : canon lens lock strength plenty orientation . ...

Restricting access to some lines in JTextArea?

java,text,jtextarea
I wanted to make a JTextArea where the user can't erase the previous line. Just like the Command Prompt in Windows and the terminal in Linux, you can't edit previous lines. This is what I've come up with, but it doesn't seem to work, and I can only come up...

Read lines of a text file into an array

java,android,arrays,file,text
I would like to display a new quote randomly every time someone launch the app.In order to do that I was thinking of using a text file containing all the quotes, one at each line. I would like to know in android studio where should I put my text file...

Removing the blank positions (x,y) from a text file in Python?

python,text
I'm working on object tracking from video files, I have 5 to 6 objects in each frame of the video. Due to some bugs in the code there are some frames that are skipped and show as blank spaces in the text file . Like below 5.0 2.3 5.4 5.2...

HTML make your own