Search Results

Search found 36658 results on 1467 pages for 'line length'.

Page 83/1467 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • PHP New Line will not work

    - by user364333
    Hi I am trying to create some code that first reads the existing contents of the file in and then adds the new line of code on a new line but the code i am using just adds it on the new text on to the already existing line instead of the new line... Here is the code i am using: <?php $id = $_GET['id']; $userfile = "user1.txt"; $fo = fopen($userfile, 'r') or die("can't open favourites file"); $currentdata = fread($fo, filesize($userfile)); fclose($fo); $fw = fopen($userfile, 'w') or die("can't open favourites file"); $currentprocessed = "$currentdata\n"; fwrite($fw, $currentprocessed); fwrite($fw, $id); fclose($fw); ?> I have tried a whole range of different ideas but nothing has worked, any help would be appreciated.

    Read the article

  • Is the console command cd a wildcard of sorts? [closed]

    - by Spiritios
    I was wondering while developing some application (though this is not a development question) if the cd command used in Windows is a wildcard or cross-platform command of sorts. I looked up on table with comands for Unix/Linux and MAC OS X and it turns out that it seems to be there. I am not a multi-os user, so I ask if anyone with experience in different OSes can tell me: If this command really exists and works If it has the same functionality (change directory) If there are any problems with its use If in any OS there is another command-line command that does the same in a better/more elaborate/more frequetly used way. Thanks in advance! (P.S.I am not 100% sure if this question belongs to this site or some other stackexchange site...) (P.P.S Any help in tagging this will be appreciated!)

    Read the article

  • How can I read a comma delimited text file in a Windows batch file?

    - by Sms
    I can get it to read the text file until it becomes a comma delimited text file. I would like to read the two variables on each line and test each one with a If statement for another condition. Problem is I can't read the variables properly. Tried many things but here is what I will post. Timeouts are to see what's happening: for /f "tokens=*" %%a in (TestText.txt) do ( timeout /t 1 echo %%a is the present variabe timeout /t 2 if %%a=="One","1" echo Match for "One","1" timeout /t 3 if %%a=="One""1" echo Match for "One","1" timeout /t 4 if %%a=="One" echo Match for "One" timeout /t 5 if %%a=="1" echo Match for "1" timeout /t 6 ) TestText.txt "One","1" "Two","2" "Three","3" "Four","4" OUTPUT: "One","1" is the present variabe

    Read the article

  • Moving a high quality line on a panel c#

    - by user1787601
    I want to draw a line on a panel and then move it as the mouse moves. To do so, I draw the line and when the mouse moves I redraw the line to the new location and remove the previous line by drawing a line with the background color on it. It works fine if I do not use the high quality smoothing mode. But if use high quality smoothing mode, it leave traces on the panel. Does anybody know how to fix this? Thank you. Here is the code int x_previous = 0; int y_previous = 0; private void panel1_MouseMove(object sender, MouseEventArgs e) { Pen pen1 = new System.Drawing.Pen(Color.Black, 3); Pen pen2 = new System.Drawing.Pen(panel1.BackColor, 3); Graphics g = panel1.CreateGraphics(); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.DrawLine(pen2, new Point(0, 0), new Point(x_previous, y_previous)); g.DrawLine(pen1, new Point(0, 0), new Point(e.Location.X, e.Location.Y)); x_previous = e.Location.X; y_previous = e.Location.Y; } Here is the snapshot with SmoothingMode Here is the snapshot without SmoothingMode

    Read the article

  • typedef fixed length array

    - by Rajorshi
    Hi, I have to define a 24-bit data type.I am using char[3] to represent the type. Can I typedef char[3] to type24? I tried it in a code sample. I put typedef char[3] type42; in my header file. The compiler did not complain about it. But when I defined a function void foo(type24 val) {} in my C file, it did complain. I would like to be able to define functions like type24_to_int32(type24 val) instead of type24_to_int32(char value[3]).

    Read the article

  • Increase Volume of an MKV Video from Linux Terminal

    - by The How-To Geek
    I've got a large amount of .MKV video files which seem to all play at a very low volume - I end up having to turn the TV up all the way to hear them, which is really irritating when I switch to another channel and wake the dead because it's so loud. What I'm looking for is a command-line method to increase the volume (so I can run it on all of them quickly) that would hopefully work regardless of the audio codec in use in the particular file. (I don't mind hard-coding the output audio though). For reference, I'm using Ubuntu 9.04 on my server, and the files are being played back with Boxee on a Mac Mini, but the volume problem is the same on Windows too.

    Read the article

  • How do I open a program via the command prompt in Windows 8?

    - by Ahmadul Hoq
    Suppose I have a program named any_program.exe and my operating system drive is C:. The location of the program is D:\Any_Folder\any_program.exe How do I start/execute that program via command prompt in Windows 8? I have tried the command line START any_program.exe, but it shows me an error that Windows cannot find 'any_program.exe'. Make sure you typed the name correctly, and then try again. By the way, it worked perfectly in Windows 7. And, if I type START notepad.exe or START firefox.exe (Firefox is not installed in C: drive), it works in Windows 8.

    Read the article

  • div block going to next line in Firefox

    - by user550265
    I have a div with display:block in my css. This div block uses the align = "absmiddle" . It displays all the elements in 1 line in Chrome. However, in firefox, the elements are displyed on to the next line as well. How do I get them to display in 1 single line in firefox. P.S: I have already tried display: inline but it does not bring it in 1 line. <div class="one"><input name="elementone" value="1" align="absmiddle" class="subone" /></div> Css is div.one,div.subone{ display:block; width:16px; height:100%; background-position:0 0px; border:0 }

    Read the article

  • running commands as other users - best method

    - by linuxrawkstar
    When running commands as other users from the command line, what is recommended best practice? In the past I've used sudo like so: sudo -u username command [args] I've been told (with no specific reasons why) that using sudo for this purpose is wrong. I'd like to know why. Is there some "best way" to accomplish this? For example, I've also used the su command like so: su username - -c "command [args]" I can't imagine why either of these methods would be "bad". Your thoughts?

    Read the article

  • Increase Volume of an MKV Video from Linux Terminal

    - by The How-To Geek
    I've got a large amount of .MKV video files which seem to all play at a very low volume - I end up having to turn the TV up all the way to hear them, which is really irritating when I switch to another channel and wake the dead because it's so loud. What I'm looking for is a command-line method to increase the volume (so I can run it on all of them quickly) that would hopefully work regardless of the audio codec in use in the particular file. (I don't mind hard-coding the output audio though). For reference, I'm using Ubuntu 9.04 on my server, and the files are being played back with Boxee on a Mac Mini, but the volume problem is the same on Windows too.

    Read the article

  • cd ~ dumps me in a seemingly empty directory

    - by Davidos
    This is on a Linux mint box. I'm told everywhere to use the command cd ~ To switch to the root directory before doing some command line magic. For some reason though, it dumps me in a directory named ~ where ls gives nothing and I can't get back to my home directory; I have to restart the terminal session to get out of the empty root directory. I'm positive that everything is just hidden to me, but even as a super-user I can't get the folders to show themselves. I usually just fall back to using a graphical file browser to roam those forbidden files, but I've recently just been shut out of my root directory, and the machine refuses to allow me to change the permissions on the stupid thing even when I type the root password in. It may just be some over-rigorous end-user shielding on the part of the mint team, but it's getting to be really frustrating now.

    Read the article

  • Array length is zero in jQuery.

    - by James123
    I wrote like this. After submit click loop is not excuting. But I saw value are there, But array lenght is showing '0'. (Please see picture). Why it is not going into loop? and $('#myVisibleRows').val(idsString); becoming 'empty'. $(document).ready(function() { $('tr[@class^=RegText]').hide().children('td'); var list_Visible_Ids = []; var idsString, idsArray; alert($('#myVisibleRows').val()); idsString = $('#myVisibleRows').val(); idsArray = idsString.split(','); $.each(idsArray, function() { if (this != "") { $('#' + this).siblings(('.RegText').toggle(true)); window['list_Visible_Ids'][this] = 1; } }); $('tr.subCategory1') .css("cursor", "pointer") .attr("title", "Click to expand/collapse") .click(function() { //this = $(this); $(this).siblings('.RegText').toggle(); list_Visible_Ids[$(this).attr('id')] = $(this).css('display') != 'none' ? 1 : null; alert(list_Visible_Ids[$(this).attr('id')]) }); $('#form1').submit(function() { idsString = ''; $.each(list_Visible_Ids, function(key, val) { alert(val); if (val) { idsString += (idsString != '' ? ',' : '') + key; } }); $('#myVisibleRows').val(idsString); form.submit(); }); });

    Read the article

  • determine if line segment is inside polygon

    - by dato
    suppose we have simple polygon(without holes) with vertices (v0,v1,....vn) my aim is to determine if for given point p(x,y) any line segment connecting this point and any vertices of polygon is inside polygon or even for given two point p(x0,y0) `p(x1,y1)` line segment connecting these two point is inside polygon? i have searched many sites about this ,but i am still confused,generally i think we have to compare coordinates of vertices and by determing coordinates of which point is less or greater to another point's coordinates,we could determine location of any line segment,but i am not sure how correct is this,please help me

    Read the article

  • Windows command FOR /F isn't working?

    - by Mark Ransom
    I'm trying to use the FOR command in Windows XP's command line. I have a file temp.txt with 3 lines: temp1 temp2 temp3 And I'm typing the following command at the prompt: for /F %p in (temp.txt) do echo Testing %p Nothing comes back. If I remove the /F parameter, the output is Testing temp.txt. As far as I can determine, I'm using the command exactly as it is documented by Microsoft. I've checked my registry to make sure Command Extensions are on, and even started a new shell with cmd /e:on to be doubly sure. What am I doing wrong? Yes, I was doing something wrong. The file temp.txt wasn't created from scratch, I just edited it to put in my test content. Unfortunately when I created the file the first time, I saved it with a UTF-8 marker at the front. Recreating the file as plain text solved the problem.

    Read the article

  • how to get around the command line length limit

    - by Crash893
    I've been working on a small and simple program that i drop files onto and based on certian rules they are moved to diffrent places. the program works fine unless i drop more than a few files on the program then it kicks back an error (that appears to be more windows than anything) that the start up command c:\myapp.exe \file \file \file is to long I realize i could set up a background proccess but i really would prefer that this program not run in the backround (where it would be idle 99.999999999% of the time) Can anyone think of any way around this limitation?

    Read the article

  • Connect a linux server to network and access it from another computer browser

    - by user1732451
    I had a server in a hosting company and I took it home. I need to connect him to a local network (not wifi) and access to the server from another computer in the network via browser, like I did it when it was in the hosting company. I don't have any knowledge in linux, I just know how to type in the command line :) I thinks all the IP configuration of the server is one big mess, because it passed from more then one hosting company to another... I tried a lot of tutorials that I found in the web, but nothing works - mainly because I don't know how to check if I did something wrong. I just need to know how to connect to local network ( D-Link router) and then access the server from another computer browser. thanks update: the server os is: CentOS release 4.8 (Final)

    Read the article

  • Setting end-of-line character for puts

    - by Dom De Felice
    I have an array of entries I would like to print. Being arr the array, I used just to write: puts arr Then I needed to use the DOS format end-of-line: \r\n, so I wrote: arr.each { |e| print "#{e}\r\n" } This works correctly, but I would like to know if there is a way to specify what end-of-line format to use so that I could write something like: $eol = "\r\n" puts arr UPDATE I know that puts will use the correct line-endings depending on the platform it is run on, but I need this because I will write the output to a file.

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >