I would like to repeat each line's content of a file, any quick solution using sed.
supposed the input file is
abc
def
123
The expected ouput is:
abcabc
defdef
123123
Thank you for your help
I've got the following function that manipulates an element according to the data being sent (an object).
function manipulateElem (elem, data) {
for (var key in data) {
elem[key] = data[key];
};
}
manipulateElem(document.getElementById('test'), {'href': '/home/', 'style.color': '#000000'});
As you can imagine, the later…
I get this message for as many times as I have used replaceVariables in my code. I have added the referenced libraries, but I don't know what else to do. Can someone please help me?
I am newer to PHP and MySQL and I am having trouble understanding join. I think, for me, the problem lies with actually understanding the logic of the query. What I am trying to do Is select all of the status updates from a table named "post", but only ones from users I am "following", and then display them In order by date. So, I have…
Hi, As I know I can search DB with Sql %like% syntax.
Now I am working with XML, how can I handle the same search condition for XML file in C#? Thank you.
I'm unable to determine why I don't get my expected output, given this code:
int periods = (location.Length / 2) - 1;
for (int index = 2, i = 0; i < periods; index += 3, ++i )
{
location = location.Insert(index, ".");
}
And a location of "C5032AC", I expect that location will equal "C.50.32.A.C" after my loop terminates; it…
[ updated Feb 15, 2011: Added event unbinding to avoid unintended recursion ] Here's a scenario I've run into on a few occasions: I need to be able to monitor certain CSS properties on an HTML element and know when that CSS element changes. For example, I have a some HTML element behavior plugins like a drop shadow that attaches to…
I'm getting a lot of messages in my UFW log, and I'm trying to figure out if these are malicious or just normal. A UDP broadcast is coming from a windows laptop x.x.x.191, and some from our synology disks x.x.x.{6,8,10,11}. I have not figured out which macine 114 is yet.
I would appreciate some advice in how to read the log, and…
Let's say I have a tile sheet that contains 8 sprites per sheet. Each sprite is a tile of 30x30.
I wrote my own custom map parser/map loader however I'm having trouble extracting a certain tile sprite from the file. I'll describe my problem better in order for everyone to understand.
I wrote an enum of materials, each material…
Check out this (very simple) code examples for TPL Dataflow. Suppose you are developing an Async Logger to register application events to different sinks or log writers. The logger architecture would be as follow: Note how blocks can be composed to achieved desired behavior. The BufferBlock<T> is the pool of log…
Friends--
Cannot connect reliably to ethernet nor at all to Internet:
Symptoms:
About 2 weeks ago did an upgrade. Have not been able to connect to ethernet nor Internet. Today, for example, boot up this System76 laptop and there was no network connection. Did sudo mount -a and got some internal network connectivity:
…
hi to all
does any could help me how to remove unnecessary scroll bar in ie6. I have already put overflow-y: hidden; but still the same output.
thanks in advance
here is my url
http://webberzsoft.com/clients/csslayouttest/template_new.php
here is my css
* {margin:0;padding:0;}/*for demo purposes only, use a…
I am doing a project where I am using JSF 2.0 & Primefaces UI Components.
There is a tab view component with tabs, "Day","Week" & "Month". In all tab, I have to display Bar Charts in each. For the same, I am fetching three list using the following three method. In the following code, UpdateCountHelper…
How can I "bulk paste" a clipboard string of multi-line text into a readable ordered list?
I'm trying to demonstrate how to turn any string of multi-line text into an ordered list.
The script (preferably JS) needs to respect:
- carriage returns at the end of a line, to mean "that line ends here"
-…
I have some HTML that looks like this (NOTE: I know this code isn't great but I didn't design it originally and some of it is auto generated):
<table id="tab1">
<tr>
<td><span>Some text</span></td>
<td><span>more…
Sorry if I repeat my question but I have still had no clues of what to do and how to deal with the question.
My app is a dictionary. I assume that users will need to add words that they want to memorise to a Favourite list. Thus, I created a Favorite button that works on two…
One of my controllers has close to 100 methods (eg routes) and nearly every one starts out the same code to redirect to an error page if the id param is invalid, followed by a similar check if the user that id doesn't belong in the user's account:
def something
@foo =…
This question is about good design practice in programming.
Let see this example, we have 2 interrelated tables:
Table1
textID - text
1 - love..
2 - men...
...
Table2
rID - textID
1 - 1
2 - 2
...
Note:
In Table1:
textID is auto_increment primary…
Hi,
I'm trying to NAT HTTP traffic, I'm new to this and facing some issues.
What i'm trying to do is NAT client HTTP requests to a webserver.
CLIENT - NAT BOX - WEBSERVER
When the client open the IP of the NAT BOX, the request should be pass to the web server.
But…
Is anyone aware of an org-sort function / modification that can refile / organize a group of TODO so that it sorts them by three (3) criteria: first sort by due date, second sort by priority, and third sort by by title of the task?
EDIT: I believe that org-sort…
After having successfully added 2 new disks in a new RAID virtual drive (background initialization done), I would have exepected it to appear under /dev/sdh but it's not there (so, unusable).
The system is running a CentOS 5.2 64 bits, HAL and udev daemons are…
Hi Everyone,
I am trying to get my rails application running on my web server, but when I run the rake db:migrate I get the following error:
r
oot@oak [/home/macandco/rails_apps/survey_manager]# rake db:migrate
(in /home/macandco/rails_apps/survey_manager)…
I am developing a PreferenceActivity with custom Preference views. My problem is that I created a view with a ListView and it only shows the first element. I post my code and an image:
http://imageshack.us/photo/my-images/545/sc20120307161530.png/
xml:
…
I made a simple AsyncTask class to display data in ListView with the help of this stackoverflow question.
But the AsyncTask onPostExecute is not being called.
This is my code:
public class Start extends SherlockActivity {
// JSON Node names
private…