Search Results

Search found 24117 results on 965 pages for 'write'.

Page 5/965 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to open textfile and write to it append-style with php?

    - by Chris_45
    How do you open a textfile and write to it with php appendstyle textFile.txt //caught these variables $var1 = $_POST['string1']; $var2 = $_POST['string2']; $var3 = $_POST['string3']; $handle = fopen("textFile.txt", "w"); fwrite = ("%s %s %s\n", $var1, $var2, $var3, handle);//not the way to append to textfile fclose($handle);

    Read the article

  • Cannot write to Folder mounted with SSHFS

    - by JM at Work
    I just created a folder according to SSHFS (Ubuntu Docs) sudo apt-get install sshfs sudo gpasswd -a jm fuse sshfs -o idmap=user [email protected]:/path/to/folder folder Then I found that the folder is mounted, but I cannot write to it. The permissions seems fine http://pastie.org/1969299 But I even tried with chmod -R 777 ./folder Still no go UPDATE: It seems I can't write using NetBeans only. But it works with LeafPad for example

    Read the article

  • Give write access to USB and Serial devices automatically

    - by Saeid87
    I am working with some USB and Serial micro-controllers. Everytime I plug a device I have to do the following command to give it write access, and also my password: sudo chmod 666 /dev/ttyUSB0 Can I set my Ubuntu to automatically give write access to pluged in devices? If not, how can I make a batch file that I can easily give the access to port I want for example if I run the following command it does the job: giveaccess -usb0

    Read the article

  • Write Your Own Microsoft Expression Blend 3 Addin

    Although there have been numerous articles introducing how to write a Microsoft Expression blend 2 addin, the Microsoft Expression blend 3/4 related ones are few. In this article, you will learn what a Microsoft Expression blend addin is and command the common routine to write an Addin. Finally, you will master the inner workings of the addin through a concrete sample application.

    Read the article

  • Motivating yourself to actually write the code after you've designed something

    - by dpb
    Does it happen only to me or is this familiar to you too? It's like this: You have to create something; a module, a feature, an entire application... whatever. It is something interesting that you have never done before, it is challenging. So you start to think how you are going to do it. You draw some sketches. You write some prototypes to test your ideas. You are putting different pieces together to get the complete view. You finally end up with a design that you like, something that is simple, clear to everybody, easy maintainable... you name it. You covered every base, you thought of everything. You know that you are going to have this class and that file and that database schema. Configure this here, adapt this other thingy there etc. But now, after everything is settled, you have to sit down and actually write the code for it. And is not challenging anymore.... Been there, done that! Writing the code now is just "formalities" and makes it look like re-iterating what you've just finished. At my previous job I sometimes got away with it because someone else did the coding based on my specifications, but at my new gig I'm in charge of the entire process so I have to do this too ('cause I get payed to do it). But I have a pet project I'm working on at home, after work and there is just me and no one is paying me to do it. I do the creative work and then when time comes to write it down I just don't feel like it (lets browse the web a little, see what's new on P.SE, on SO etc). I just want to move to the next challenging thing, and then to the next, and the next... Does this happen to you too? How do you deal with it? How do you convince yourself to go in and write the freaking code? I'll take any answer.

    Read the article

  • Is a 1:* write:read thread system safe?

    - by Di-0xide
    Theoretically, thread-safe code should fix race conditions. Race conditions, as I understand it, occur because two threads attempt to write to the same location at the same time. However, what about a threading model in which a single thread is designed to write to a location, and several slave/worker threads simply read from the location? Assuming the value/timing at which they read the data isn't relevant/doesn't hinder the worker thread's outcome, wouldn't this be considered 'thread safe', or am I missing something in my logic?

    Read the article

  • Why doesn't the monitor output anything in Linux console mode?

    - by flypen
    I install Linux without graphics support. Previously I used a monitor with 720p support. And it can display normally. Now I change to a monitor with 1080p support. I can see BIOS and GRUB info on monitor, and kernel messages in early stages. However, the monitor says that there is no input immediately, and then I can't see anything again. It seems that it happens after something initializes. Is it related to vesafb? vesafb: mode is 1280x1024x32, linelength=5120, pages=0 vesafb: scrolling: redraw vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0 mtrr: type mismatch for 7f800000,800000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,400000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,200000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,100000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,80000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,40000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,20000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,10000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,8000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,4000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,2000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,1000 old: write-back new: write-combining vesafb: framebuffer at 0x7f800000, mapped to 0xffffc90011380000, using 5120k, total 5120k Console: switching to colour frame buffer device 160x64 fb0: VESA VGA frame buffer device

    Read the article

  • Issues writing to serial port on MAC OSX using unistd.h in c

    - by Schuyler
    I am trying to write to a bluetooth device on MAC OSX using the unistd.h Linux functions in c. I am connecting fine and writing the first few bytes with success. When I try to write other commands to it (there are bytes added to the write buffer every 15ms), I don't see any results even though the write() function returns 1 (write success). If you start a write and it doesn't finish by the time you try to start another write (since it is non-blocking), could that possibly screw up the initial write? (If so, is there any way to check if a write has completed?) That is the only thing I can think of since the writes are occurring fairly frequently and the first two are successfully sent. qwbyte() simply adds a byte to the output array and increments its length The open port function: BAMid = -1; struct termios options; struct termios originalTTYAttrs; // Open the serial port read/write, nonblocking, with no controlling terminal, and don't wait for a connection. BAMid = open(strPath, O_RDWR | O_NOCTTY | O_NONBLOCK); if (BAMid == -1) { printf("Error opening serial port %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // Issue TIOCEXCL ioctl to prevent additional opens except by root-owned processes. if (ioctl(BAMid, TIOCEXCL) == -1) { printf("Error setting TIOCEXCL on %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // Get the current options and save them so we can restore the default settings later. if (tcgetattr(BAMid, &originalTTYAttrs) == -1) { printf("Error getting tty attributes %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // The serial port attributes such as timeouts and baud rate are set by modifying the termios // structure and then calling tcsetattr() to cause the changes to take effect. Note that the // changes will not become effective without the tcsetattr() call. options = originalTTYAttrs; // Set raw input (non-canonical) mode, with reads blocking until either a single character // has been received or a one second timeout expires. [should be moot since we are leaving it as nonblocking] cfmakeraw(&options); options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 10; cfsetspeed(&options, B57600); // Set 57600 baud options.c_cflag |= CS8; // Use 8 bit words // Cause the new options to take effect immediately. if (tcsetattr(BAMid, TCSANOW, &options) == -1) { printf("Error setting tty attributes %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } //flush old transmissions if (tcflush(BAMid,TCIOFLUSH) == -1) { printf("Error flushing BAM serial port - %s(%d).\n", strerror(errno), errno); } oBufLength = 0; // Ask it to start if (! qwbyte(CmdStart) ) { goto error; } if (! qwbyte(CmdFull) ) { goto error; } //this transmit works txbytes(); printf("success opening port!"); return -1; // Failure path error: if (BAMid != -1) { close(BAMid); } printf("returning an error--%d",errno); return errno; } The write function (txbytes): int i, bufSize, numBytes; if(oBufLength != 0) { //if the output array isn't empty //duplicating the output array and its size so it can //be overwritten while this write is occuring printf("about to transmit: "); for(i = 0; i < oBufLength; i++) { printf(" %u",oBuf[i]); tempBuf[i] = oBuf[i]; } printf("\n"); bufSize = oBufLength; oBufLength = 0; numBytes = write(BAMid, &tempBuf, bufSize); printf("bytes written = %d\n",numBytes); if (numBytes == -1) { printf("Error writing to port - %s(%d).\n", strerror(errno), errno); } return (numBytes 0); } else { return 0; }

    Read the article

  • Windows Azure – Write, Run or Use Software

    - by BuckWoody
    Windows Azure is a platform that has you covered, whether you need to write software, run software that is already written, or Install and use “canned” software whether you or someone else wrote it. Like any platform, it’s a set of tools you can use where it makes sense to solve a problem. The primary location for Windows Azure information is located at http://windowsazure.com. You can find everything there from the development kits for writing software to pricing, licensing and tutorials on all of that. I have a few links here for learning to use Windows Azure – although it’s best if you focus not on the tools, but what you want to solve. I’ve got it broken down here into various sections, so you can quickly locate things you want to know. I’ll include resources here from Microsoft and elsewhere – I use these same resources in the Architectural Design Sessions (ADS) I do with my clients worldwide. Write Software Also called “Platform as a Service” (PaaS), Windows Azure has lots of components you can use together or separately that allow you to write software in .NET or various Open Source languages to work completely online, or in partnership with code you have on-premises or both – even if you’re using other cloud providers. Keep in mind that all of the features you see here can be used together, or independently. For instance, you might only use a Web Site, or use Storage, but you can use both together. You can access all of these components through standard REST API calls, or using our Software Development Kit’s API’s, which are a lot easier. In any case, you simply use Visual Studio, Eclipse, Cloud9 IDE, or even a text editor to write your code from a Mac, PC or Linux.  Components you can use: Azure Web Sites: Windows Azure Web Sites allow you to quickly write an deploy websites, without setting a Virtual Machine, installing a web server or configuring complex settings. They work alone, with other Windows Azure Web Sites, or with other parts of Windows Azure. Web and Worker Roles: Windows Azure Web Roles give you a full stateless computing instance with Internet Information Services (IIS) installed and configured. Windows Azure Worker Roles give you a full stateless computing instance without Information Services (IIS) installed, often used in a "Services" mode. Scale-out is achieved either manually or programmatically under your control. Storage: Windows Azure Storage types include Blobs to store raw binary data, Tables to use key/value pair data (like NoSQL data structures), Queues that allow interaction between stateless roles, and a relational SQL Server database. Other Services: Windows Azure has many other services such as a security mechanism, a Cache (memcacheD compliant), a Service Bus, a Traffic Manager and more. Once again, these features can be used with a Windows Azure project, or alone based on your needs. Various Languages: Windows Azure supports the .NET stack of languages, as well as many Open-Source languages like Java, Python, PHP, Ruby, NodeJS, C++ and more.   Use Software Also called “Software as a Service” (SaaS) this often means consumer or business-level software like Hotmail or Office 365. In other words, you simply log on, use the software, and log off – there’s nothing to install, and little to even configure. For the Information Technology professional, however, It’s not quite the same. We want software that provides services, but in a platform. That means we want things like Hadoop or other software we don’t want to have to install and configure.  Components you can use: Kits: Various software “kits” or packages are supported with just a few clicks, such as Umbraco, Wordpress, and others. Windows Azure Media Services: Windows Azure Media Services is a suite of services that allows you to upload media for encoding, processing and even streaming – or even one or more of those functions. We can add DRM and even commercials to your media if you like. Windows Azure Media Services is used to stream large events all the way down to small training videos. High Performance Computing and “Big Data”: Windows Azure allows you to scale to huge workloads using a few clicks to deploy Hadoop Clusters or the High Performance Computing (HPC) nodes, accepting HPC Jobs, Pig and Hive Jobs, and even interfacing with Microsoft Excel. Windows Azure Marketplace: Windows Azure Marketplace offers data and programs you can quickly implement and use – some free, some for-fee.   Run Software Also known as “Infrastructure as a Service” (IaaS), this offering allows you to build or simply choose a Virtual Machine to run server-based software.  Components you can use: Persistent Virtual Machines: You can choose to install Windows Server, Windows Server with Active Directory, with SQL Server, or even SharePoint from a pre-configured gallery. You can configure your own server images with standard Hyper-V technology and load them yourselves – and even bring them back when you’re done. As a new offering, we also even allow you to select various distributions of Linux – a first for Microsoft. Windows Azure Connect: You can connect your on-premises networks to Windows Azure Instances. Storage: Windows Azure Storage can be used as a remote backup, a hybrid storage location and more using software or even hardware appliances.   Decision Matrix With all of these options, you can use Windows Azure to solve just about any computing problem. It’s often hard to know when to use something on-premises, in the cloud, and what kind of service to use. I’ve used a decision matrix in the last couple of years to take a particular problem and choose the proper technology to solve it. It’s all about options – there is no “silver bullet”, whether that’s Windows Azure or any other set of functions. I take the problem, decide which particular component I want to own and control – and choose the column that has that box darkened. For instance, if I have to control the wiring for a solution (a requirement in some military and government installations), that means the “Networking” component needs to be dark, and so I select the “On Premises” column for that particular solution. If I just need the solution provided and I want no control at all, I can look as “Software as a Service” solutions. Security, Pricing, and Other Info  Security: Security is one of the first questions you should ask in any distributed computing environment. We have certification info, coding guidelines and more, even a general “Request for Information” RFI Response already created for you.   Pricing: Are there licenses? How much does this cost? Is there a way to estimate the costs in this new environment? New Features: Many new features were added to Windows Azure - a good roundup of those changes can be found here. Support: Software Support on Virtual Machines, general support.    

    Read the article

  • Direct3D9 application won't write to depth buffer

    - by DeadMG
    I've got an application written in D3D9 which will not write any values to the depth buffer, resulting in incorrect values for the depth test. Things I've checked so far: D3DRS_ZENABLE, set to TRUE D3DRS_ZWRITEENABLE, set to TRUE D3DRS_ZFUNC, set to D3DCMP_LESSEQUAL The depth buffer is definitely bound to the pipeline at the relevant time The depth buffer was correctly cleared before use. I've used PIX to confirm that all of these things occurred as expected. For example, if I clear the depth buffer to 0 instead of 1, then correctly nothing is drawn, and PIX confirms that all the pixels failed the depth test. But I've also used PIX to confirm that my submitted geometry does not write to the depth buffer and so is not correctly rendered. Any other suggestions?

    Read the article

  • Why should i write a commit message?

    - by acidzombie24
    Why should i write a commit message? I dont want to and i think its stupid every single time. A gui frontend i use which will go unnamed forces you to do it. I hear other doing it everytime even if they are using the VCS on the command line. If i commit several times a day and havent finish a feature what am i writing about? I ONLY ever write a message after many comments and i feel its time for a mini tag or when i do an actual tag. Am i right or am i missing something? also i am using a distributed system

    Read the article

  • Improving mdadm RAID-6 write speed

    - by BarsMonster
    Hi! I have a mdadm RAID-6 in my home server of 5x1Tb WD Green HDDs. Read speed is more than enough - 268 Mb/s in dd. But write speed is just 37.1 Mb/s. (Both tested via dd on 48Gb file, RAM size is 1Gb, block size used in testing is 8kb) Could you please suggest why write speed is so low and is there any ways to improve it? CPU usage during writing is just 25% (i.e. half of 1 core of Opteron 165) No business critical data there & server is UPS-backed. mdstat is: Personalities : [raid6] [raid5] [raid4] md0 : active raid6 sda1[0] sdd1[4] sde1[3] sdf1[2] sdb1[1] 2929683456 blocks super 1.2 level 6, 1024k chunk, algorithm 2 [5/5] [UUUUU] bitmap: 0/8 pages [0KB], 65536KB chunk unused devices: <none> Any suggestions?

    Read the article

  • ARC write-up on the OTM SIG

    - by John Murphy
    ARC write-up on the recent OTM SIG event. The Oracle Transportation Management Special Interest Group (OTM SIG) hosted its 6th annual user conference in Philadelphia, Pennsylvania, August 13-15, 2012. This independently run conference drew almost 400 attendees, predominantly Oracle Transportation Management (OTM) users. It featured four concurrent tracks that included both functionally and technically focused presentations. The tracks included a number of informative presentations by OTM users from various industries. These discussed the users' implementations, current usage, and future plans for OTM within their organizations. ARC Advisory Group found ConAgra's and Mutual Materials' presentations on OTM adoption and Kraft's presentation on the company's use of Fusion Transportation Intelligence particularly informative. Complete ARC write-up

    Read the article

  • How to write good blog post tags

    - by keruilin
    It seems that you have three choices in deciding how you write tags for your blog posts: Make them user friendly Make them highly searchable Combo of the two For example, let's say that I have a blog post that has write-ups on the top 10 ipad apps for business travel (e.g., Evernote, Dragon Diction, Instapaper, etc.). User friendly tags: ipad apps, business travel Searchable keywords (analyzed with Google Keyword Analyzer): ipad apps, ipad travel apps, evernote ipad, instapaper, instapaper ipad Combo: ipad apps, ipad travel apps So my question comes down to this: which is really the best choice -- 1, 2 or 3? Note: this visible post tags will also serve as the meta keywords for the post page.

    Read the article

  • How to write functionally in a web framework

    - by Kevin Burke
    I love Rich Hickey, Clojure and Haskell and I get it when he talks about functions and the unreliability of side-effecting code. However I work in an environment where nearly all the functions I write have to read from the database, write to the database, make HTTP requests, decrement a user's balance, modify a frontend HTML component based on a click action, return different results based on the URI or the POST body. We also use PHP for the frontend, which is littered with functions like parse_str(), which modifies an object in place. All of these are side-effecting to one degree or another. Given these constraints and the side-effecting nature of the logic I'm coding, what can I do to make my code more reliable and function-able?

    Read the article

  • why write-enable ring

    - by SpashHit
    Here's an "interview question" that while ostensibly about hardware really does inform a software design principal as well. Computers used to (still do I guess, somewhere) use magnetic tape reels to store data. There was a plastic accessory you could attach to a tape reel called a "write-enable ring". If the tape had such a ring, the tape drive allowed writing to the tape... if not, it only allowed read access. Why was the choice to design the system in this way? Why not have a "write protect ring" instead, with the opposite effect?

    Read the article

  • Why a write-enable ring?

    - by SpashHit
    Here's an "interview question" that while ostensibly about hardware really does inform a software design principal as well. Computers used to (still do I guess, somewhere) use magnetic tape reels to store data. There was a plastic accessory you could attach to a tape reel called a "write-enable ring". If the tape had such a ring, the tape drive allowed writing to the tape... if not, it only allowed read access. Why was the choice to design the system in this way? Why not have a "write protect ring" instead, with the opposite effect?

    Read the article

  • Changing read-write permissions on my external Seagate hard drive

    - by Anthony_JKenn
    I have an external hard drive (Seagate Free Agent) that I normally download files to. I have a dual boot Ubuntu 11.10 along with Windows 7-64 bit. I can read all of my files in my external HD perfectly, but when I attempt to do a download of a file to this drive, I get an "unable to write because of read only" disk error. When I attempt to change the permissions of the disk through the "Properties" bar, I still get an error that I don't have the proper permissions to change permissions. I have heard of "mounting" the disk, but I am afraid of mistakenly reformatting and destroying all the data that I have currently on that drive. How best should I safely change the permissions on that drive so that I can write and download files to the drive?? The drive is listed under /dev/sdc1.

    Read the article

  • Fortran: output format dependent on a variable

    - by Flux Capacitor
    I would like to have a FORTRAN write statement formatted to depend on some variable. For example, I could write: write(*,'(3f15.3,3f9.2)') x,y,z,(var(i),i=1,nvari) where nvari = 3 But, what if, in some cases, I actually have 4 variables (i.e. nvari = 4) I would like to write something like this: write(*,'(3f15.3,nvari(f9.2))') x,y,z,(var(i),i=1,nvari) Now, nvari can be anything and the output will work as I like. How can I make something like this work?

    Read the article

  • Slow speed for UFS mounted drive in Linux

    - by Incredible
    Hi, I have a disk that has Sun OS disk, (ufs filesystem). And I want to mount it in my debain machine with read/write mode. Since by deafult linux doesn't support write to ufs filesystem. I had to recompile the kernel by setting to the flag CONFIG_UFS_FS_WRITE=y. Now I am able to write to the filesystem, but the read/write speed is very slow. It is around 120 KB/s. Any idea what is wrong and how to resolve this issue? Thank you in advance.

    Read the article

  • How to make write operation idempotent?

    - by Morgan Cheng
    I'm reading article about recently release Gizzard sharding framework by twitter(http://engineering.twitter.com/2010/04/introducing-gizzard-framework-for.html). It mentions that all write operations must be idempotent to make sure high reliability. According to wikipedia, "Idempotent operations are operations that can be applied multiple times without changing the result." But, IMHO, in Gazzard case, idempotent write operation should be operations that sequence doesn't matter. Now, my question is: How to make write operation idempotent? The only thing I can image is to have a version number attached to each write. For example, in blog system. Each blog must have a $blog_id and $content. In application level, we always write a blog content like this write($blog_id, $content, $version). The $version is determined to be unique in application level. So, if application first try to set one blog to "Hello world" and second want it to be "Goodbye", the write is idempotent. We have such two write operations: write($blog_id, "Hello world", 1); write($blog_id, "Goodbye", 2); These two operations are supposed to changed two different records in DB. So, no matter how many times and what sequence these two operations executed, the results are same. This is just my understanding. Please correct me if I'm wrong.

    Read the article

  • Slow Write Speed on ESXi host

    - by Gregg Leventhal
    I have an ESXi 5.0 free host with an internal datastore of 7.2K 5 disk RAID 5 using a PERC 710 mini RAID controller in a Dell Poweredge R620 Server with 32GB Ram and a 12 Core Xeon. I seem to get slow write speeds in the guests so I checked out ESXTOP and I see 15MB/s write speed there on this host, which is comprable to the guests. What could be causing such horrible write speeds? Is RAID 5 really this slow to write??

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >