I have the following line in my .gitignore file:
var/www/docs/.backroom/billing_info/inv.pl
but when I type 'git status' I am told the following:
# modified: var/www/docs/.backroom/billing_info/inv.pl
I dont understand how a file which is explicitly listed as an ignore pattern could be listed as modified when I want git to ignore it.
There are no lines starting with a ! in my .gitignore file
Here is my entire .gitignore file for reference: http://pastebin.com/Jw445Qd7
if (isset($_GET['sort_by']) && strlen($_GET['sort_by']) > 0)
{
$sort_by = $_GET['sort_by'];
}
else
{
$sort_by = 'desc';
}
how can I rewrite that so it looks cleaner and has less lines.. I love one liners hehe
say ive got a matrix that looks like:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
how can i make it on seperate lines:
[[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
and then remove commas etc:
0 0 0 0 0
And also to make it blank instead of 0's, so that numbers can be put in later, so in the end it will be like:
_ 1 2 _ 1 _ 1
(spaces not underscores)
thanks
When I create a graph after using range.copy and range.paste it leaves the paste range selected, and then when I create a graph a few lines later, it uses the selection as the first series in the plot. I can delete the series, but is there a more elegant way to do this? I tried
Set selection = nothing
but it won't let me set selection. I also tried selection.clear, but that just cleared the last cells that were selected, and still added an extra series to the plot.
Curt
Hello,
Sometimes I break long conditions in IFs to several lines. The most obvious way to do this is:
if (cond1 == 'val1' and cond2 == 'val2' and
cond3 == 'val3' and cond4 == 'val4'):
do_something
Isn't very very appealing visually, because the action blends with the conditions. However, it is the natural way using correct Python indentation of 4 spaces.
Edit:
By the way, for the moment I'm using:
if ( cond1 == 'val1' and cond2 == 'val2' and
cond3 == 'val3' and cond4 == 'val4'):
do_something
Not very pretty, I know :-)
Can you recommend an alternative way ?
We are using Team Build to handle our deployments to our development server, and we have a need to remove comments from our web config when it's transformed. Does anyone know how to remove the "" comment lines from the web config file using a transformation?
I want to deploy my .net MVC 2 appication on IIS6.0.
Will it require to change route path in global.asax file.
In my application i have used html link, ajax request and Html.ActionLink.
The code lines in the Global.asax file are:
routes.MapRoute(
"LogOn",
"{controller}/{action}/{id}",
new { controller = "Account", action = "Index", id = UrlParameter.Optional }
);
Please suggest me.
Thanks and Regards
Munish
Is there any good (eazy to understend, small - not lotof code lines) sample of working with google openid? (php) -
What I need is to see how to get users name from google openId ;
a good way of how to integrate openid into my current users DB (tooday in DB I have table user with name and pass)?
and how to get any Idea about if useris currently loged in from this computer with openId?
// When I Run The Following Two Lines, I Get The Error Shown Below
var B:Button=new Button();
var lineMetrics:TextLineMetrics=B.measureText('Hello World');
// TypeError: Error #2007: Parameter antiAliasType must be non-null.
From My Point Of View, As Useless Errors Go, This One Is Unsurpassed.
Can anyone point me in the right direction?
In an iPhone app, when I compile for simulator everything is OK. However, when I compile for device, I get error on lines where I declare uint8 variables.
How is that possible?
For the "q" (quit) option in my program menu, I have the following code:
elif choice == "q":
print()
That worked all right until I put it in an infinite loop, which kept printing blank lines. Is there a method that can quit the program? Else, can you think of another solution?
I have a file consisting of lines of the form
Foo="Some information" Bar="More"
Starting with such a string, what is the best way to extract "Some information" and "More" as strings? Foo and Bar are always exactly those names.
I'm new to MVC and ADO.net Entity Framework. Instead of having to create an edit/display for each entity, I'd like to have the controller base class generate the view and validation code based off metadata stored in a table - something along those lines.
I would imagine something like this has already been done, or there are good reasons for not doing it. Any insight or suggestions are appreciated.
Hi!
I'm using the tags in HTML5 to play a video on a web browser... (and I'm very impressed with this new feature)
Is there the functionality to change the video being played through Javascript? Say when I select another video from a list, a Javascript function would be called which would contain something on the lines of MyVideo.VideoLocation = //location of new video to be played. Is this possible please?
Thanks and regards,
Krt_Malta
I need to draw several simple objects (polygons composed by lines and arcs, eventually placed on different layers) inside a form (or any other container) and then handle events like:
right click on object
zoom
pan
Is there a library/framework that can handle my need or do I need to create my own?
I have table similar to this:
102938 bob
038128 Marc
398401 Tom
298421 Jim
102938 Alex
102938 Junior
209381 Rex
398401 Oby
I want to make sometthing like =sumif(A:A, 102938,B:B) and to get "bobAlexJunior" as result. But this is not working becouse sum works with numbers not strings. If i go with lookup, it works with strings but finds only first line, not all lines.
Do you have an Idea on how to fix this issue?
Thanx
Hi folks!
I read the german article about "Make" on Wikipedia and found the following 2 lines:
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
Why is the dependency expression left out and why does the target use a double file extension?
I need to provide a feature such that the user is able to upload a csv file.Once the uploading is done I need to retrieve each value and show it on a grid which is implemented using far point(http://www.fpoint.com/products/spread/spread.aspx).But all this has to be done without the page being refreshed.I use asp.net 2.0 & Ajax Pro.Remember I cannot use the inbuilt AJAX feature provided by microsoft .To be precise I need something similar to the lines of attaching a file using gmail.
Thanks & Regards
Bikram
I have a lot lines contains XXXXXXXXX number format. I want change number XXXXXXXXX to XX.XXX.XXX.X
XXXXXXXXX = 9 digit random number
Anyone can help me? Thanks in advance
I have a datagridview with contents from a table. In that I have a column for Remarks which will be 1-2 lines. When I click on the remarks column, I want to open another form that contains the text box. I have linked the text box with the table using the table adapter. Now when I close the form with the text box, I want to show that in the datagridview column. Please help me
for (;;) {
//Something to be done repeatedly
}
I have seen this sort of thing used a lot, but I think it is rather strange...
Wouldn't it be much clearer to say while (TRUE), or something along those lines?
I'm guessing that (as is the reason for many-a-programmer to resort to cryptic code) this is a tiny margin faster?
Why, and is it REALLY worth it? If so, why not just define it this way:
#DEFINE while(TRUE) for(;;)
i have a piece of code here that breaks if the directory doesn't exist
System.IO.File.WriteAllText(filePath, content);
is it possible to do in one line (or a few lines) to check the directory leading to the new file doesn't exist and if not, to create it before creating the new file.
i'm in .NET 3.5 here.
I'm looking at maybe moving from an older AMD64 to a new Intel dual-core which is 32 bit. Installation isn't a problem but can I transfer all the installed apps? I haven't been
able to find anything so far on Google except where the migration is to a similar platform and file-system. I won't change the filesystem but the platform will be different. Is there something on the lines of the "World" file in Gentoo?
I need to create a simple program/utility to parse a txt file (deleting blank rows, concatenating lines, etc) that runs in Windows XP and can be called from a Windows command line. What programming language/environment best fits this type of application?
Thanks, I hope I'm not being vague.