Search Results

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

Page 11/965 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Forget the Hat - Just Write Compelling Content

    Search Engines and searchers are looking for one thing, relevant content that provides an answer to the searchers' query. This is exactly what we should be providing when we produce content for our blogs or websites. There is not a day goes by when my mailbox is not full of different emails promising top ranks in Google or Bing just by using this or that kind of technique or tool.

    Read the article

  • How to Write Convincing Link Exchange Emails

    Link exchange has proved to be one of the easiest ways for a website, especially a just-out one, to get the thick net of backlinks needed for high rankings in Google. Yet even this "easiest" way has its pitfalls, minimizing the payoff of this traffic and sales-promising strategy.

    Read the article

  • How to write basic matrix using row and column differently

    - by kounabg
    #include<stdio.h> #include<conio.h> int main() { int a[3][3],i,j; for(i=0;i<3;i++) {printf("enter the value of row A: ",a[i]); scanf("%d",& a[i]);} for(i=0;i<3;i++) {printf("enter the value of row B: ",a[i]); scanf("%d",& a[i]);} for(i=0;i<3;i++) {printf("enter the value of row C: ",a[i]); scanf("%d",& a[i]);} } ***I did this. I want to convert it into matrix and how can I do it?

    Read the article

  • Java ReentrantReadWriteLocks - how to safely acquire write lock?

    - by Andrzej Doyle
    I am using in my code at the moment a ReentrantReadWriteLock to synchronize access over a tree-like structure. This structure is large, and read by many threads at once with occasional modifications to small parts of it - so it seems to fit the read-write idiom well. I understand that with this particular class, one cannot elevate a read lock to a write lock, so as per the Javadocs one must release the read lock before obtaining the write lock. I've used this pattern successfully in non-reentrant contexts before. What I'm finding however is that I cannot reliably acquire the write lock without blocking forever. Since the read lock is reentrant and I am actually using it as such, the simple code lock.getReadLock().unlock(); lock.getWriteLock().lock() can block if I have acquired the readlock reentrantly. Each call to unlock just reduces the hold count, and the lock is only actually released when the hold count hits zero. EDIT to clarify this, as I don't think I explained it too well initially - I am aware that there is no built-in lock escalation in this class, and that I have to simply release the read lock and obtain the write lock. My problem is/was that regardless of what other threads are doing, calling getReadLock().unlock() may not actually release this thread's hold on the lock if it acquired it reentrantly, in which case the call to getWriteLock().lock() will block forever as this thread still has a hold on the read lock and thus blocks itself. For example, this code snippet will never reach the println statement, even when run singlethreaded with no other threads accessing the lock: final ReadWriteLock lock = new ReentrantReadWriteLock(); lock.getReadLock().lock(); // In real code we would go call other methods that end up calling back and // thus locking again lock.getReadLock().lock(); // Now we do some stuff and realise we need to write so try to escalate the // lock as per the Javadocs and the above description lock.getReadLock().unlock(); // Does not actually release the lock lock.getWriteLock().lock(); // Blocks as some thread (this one!) holds read lock System.out.println("Will never get here"); So I ask, is there a nice idiom to handle this situation? Specifically, when a thread that holds a read lock (possibly reentrantly) discovers that it needs to do some writing, and thus wants to "suspend" its own read lock in order to pick up the write lock (blocking as required on other threads to release their holds on the read lock), and then "pick up" its hold on the read lock in the same state afterwards? Since this ReadWriteLock implementation was specifically designed to be reentrant, surely there is some sensible way to elevate a read lock to a write lock when the locks may be acquired reentrantly? This is the critical part that means the naive approach does not work.

    Read the article

  • how to write contents in a word doc or pdf in c#

    - by Arunachalam
    how to write contents in a word doc or pdf in c# like if i want to write some daily reports generated into word doc or pdf ..in unix we can just pipe the out put to text file can we do that in c# .i know that using string builder we can write the contents to text files can we write the contents to a doc or pdf format ?

    Read the article

  • Python f.write() at beginning of file?

    - by kristus
    I'm doing it like this now, but i want it to write at the beginning of the file instead. f = open('out.txt', 'a') # or 'w'? f.write("string 1") f.write("string 2") f.write("string 3") f.close() so that the contenst of out.txt will be: string 3 string 2 string 1 and not (like this code does): string 1 string 2 string 3

    Read the article

  • Write failed, errno 0

    - by EpsilonVector
    I have a client server situation in which I receive data using read(socket, char_buf, BUF_SIZE) and then try to write it into a log file using write(filefd, char_buf, strlen(char_buf)) Strangely enough this fails (write returns -1), and yet the errno is set to 0, and I can print the message, AND the log file descriptor works (I write to it before and after this command). What's going on?? (Working on Linux kernel 2.4 (homework))

    Read the article

  • Using 3rd Party JavaScript Plugins Hardwired With &lsquo;document.write&rsquo;

    - by ToStringTheory
    Introduction Have you ever had the need to implement a 3rd party JavaScript plugin, but your needs didn’t fit the model and usage defined by the API or documentation of the plugin?  Recently I ran into this issue when I was trying to implement a web snapshot plugin into our site.  To use their plugin, you had to include a script tag to the plugin on their server with an API key.  The second part of the usage was to include a <script> tag around a function call wherever you wanted a snapshot to appear. The Problem When trying to use the service, the images did not display.  I checked a couple of things and didn’t find anything wrong at first..  It wasn’t until I looked at the function that was called by the inline script did I find the issue – a call to the webservice, followed by a call to ‘document.write’ in its callback.  The solution in which I was trying to implement the plugin happened to be in response to an AJAX call after the document had completely loaded.  After the page has loaded, document.write does nothing. My first thought for a solution was to just cache the script from the service, and edit it do something like a return function or callback that I could use to edit the document from.  However, I quickly discovered that there is no way to cache the script from the service, as it had a hash in the function where it would call the server.  The hash was updated every few seconds/minutes, expiring old hashes.  This meant that I wouldn’t be able to edit the script and upload a new version to my server, as the script would not work after a few minutes from originally getting the script from the service. Solution The solution eluded me until I realized that this was JavaScript I was dealing with.  A language designed so that you could do just about anything to any library, function, or object…  At this point, the solution was simple – take control of the document.write function.  Using a buffer variable, and a simple function call, it is eerily simple to perform: //what would have been output to the document var buffer = ""; //store a reference to the real document.write var dw = document.write; //redefine document.write to store to our buffer document.write = function (str) {buffer += str;} //execute the function containing calls to document.write eval('{function encapsulated in <script></script> tags}'); //restore the original document.write function (just in case) document.write = dw; That’s it.  Instead of using the script tags where I wanted to include a snapshot, I called a function passing in the URL to the page I wanted a snapshot of.  After that last line of code, what would have been output to the document (or not in the case of the ajax call) was instead stored in buffer. Conclusion While the solution itself is simple, coming from a background much more footed in the .Net platform, I believe that this is a prime example of always keeping the language that you are working in in mind.  While this may seem obvious at first, as I KNEW I was in JavaScript, I never thought of taking control of the document.write function because I am more accustomed to the .Net world.  I can’t simply replace the functionality of Console.WriteLine.

    Read the article

  • Make my git user and apache user have read/write/delete access

    - by Mr A
    I am having permission problems on my server. I use user developer to pull my git repository on the server. Then apache uses its own apache user to do write and execute code. I always have the problems when the app wants to write something in the directory (i.e: log files, and cache ...) if I execute a cron job and it uses my developer rights and wants to add something to the folders that is written by apache. My question is how to have my developer have the same write/delete access as my apache and avoid permission conflicts with each other? I am not fluent on linux command so, it would help if you could provide links or simply examples of doing so. thanks.

    Read the article

  • SELinux "allow httpd_t httpd_sys_content_t:dir write;"

    - by alexus
    I'm getting following message in my /var/log/audit/audit.log: type=AVC msg=audit(1402615093.053:68): avc: denied { write } for pid=799 comm="httpd" name="php" dev="xvda1" ino=8667365 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_sys_content_t:s0 tclass=dir type=SYSCALL msg=audit(1402615093.053:68): arch=c000003e syscall=2 success=no exit=-13 a0=7f7a5ca697a8 a1=241 a2=1b6 a3=1 items=0 ppid=662 pid=799 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) pipe audit2allow outputs: #============= httpd_t ============== #!!!! This avc can be allowed using the boolean 'httpd_unified' allow httpd_t httpd_sys_content_t:dir write; How do I apply allow httpd_t httpd_sys_content_t:dir write; to my current SELinux policy?

    Read the article

  • Fedora12 Slow USB 2.0 Write Speed, ehci_hcd module is missing

    - by MA1
    I am using Fedora 12, the problem I am facing is USB 2.0 write speed. I have a dual boot system with Windows XP and Fedora 12. USB 2.0 write speed in Windows XP is much faster then what I am getting in Fedora 12. After searching Google I came to know that ehci_hcd module is missing/not present in my system. ehci_hcd module is neither loaded nor it is present in the available list of modules. Can someone guide me how to fix this issue? Does ehci_hcd have something to do with USB 2.0 write speed? Do I have to recompile the kernel and add/enable the ehci_hcd module?

    Read the article

  • Simultaneous read/write to RAID array slows server to a crawl

    - by Jeff Leyser
    Fairly beefy NFS/SMB server (32GB RAM, 2 Xeon quad cores) with LSI MegaRAID 8888ELP controlling 12 drives configured into 3 different arrays. 5 2TB drives are grouped into a RAID 6 array. As expected, write performance to the array is slow. However, sustained, simultaneous read/write to the array (wether through NFS or done locally) seems to practically block any other access to anything else on the controller. For example, if I do: cp /home/joe/BigFile /home/joe/BigFileCopy where BigFile is 20G, then even a simple ls /home/jane will take many 10s of seconds to complete. In addition, an ls /backup will also take many tens of seconds, even though /backup is a different array on the same controller. As soon as the cp is done, everything is back to normal. cp /home/joe/BigFile /backup/BigFile does not exhibit this behavior. It's only when doing read/write to the same array.

    Read the article

  • windows 2000 freezing during large disk write

    - by robert
    We have a windows 2000 sp4 server which freezes up for about 1 minutes while its web-app does a ~500mb write operation. I can see the webapp start to do I/O activity (through process explorer) then the RDP session becomes unresponsive, you can click on windows and buttons but nothing happens. When the disk write finally finishes the session 'catches up' on all the mouse clicks you did during the freeze in a mad flurry of window activity and the server returns to normal. During the freeze the web-app stops as well. The same behaviour happens on the console of the server. (so I know its not a network thing) Nothing appears in the Event logs. Its like nothing happened. I have upgraded all the HP hardware drivers to the latest proliant support pack. And also run a HP hardware diagnostics which found nothing wrong. What would cause a disk write to lock the rest of the OS?

    Read the article

  • No write access on Windows 2008 workgroup share

    - by Serge - appTranslator
    Hi All, I'm trying to access network shares on my new Windows 2008 server (workgroup) using my server's local admin account. I can read files but not modify them. Permissions (sharing + file system) say: Users = Read only. Admins = Full Control. Even though I connect using my admin account (net use x: \\server\share /user:server\me), I can't write. OTOH, I have another share on the same computer where users have Read AND Write. I can write into that one. What's the problem? Does it have to do with UAC? TIA for your help.

    Read the article

  • Setup SVN repository subfolder specific write permission

    - by Hai Lang
    I need to setup a SVN repository which the devgroup should have full privilege to read and write except for two sub folders /1 and /2. For /1 and /2, four users should have write permission and all other users should only have read permission. I put the following into the configuration file, but people in devgroup still have write permission in /1 and /2. Any help would be highly appreciated. [project:/] @devgroup = rw [project:/1] @devgroup = r user1 = rw user2 = rw user3 = rw user4 = rw [project:/2] @devgroup = r user1 = rw user2 = rw user3 = rw user4 = rw

    Read the article

  • Bluray Drives: 2x vs 4x vs 6x vs 8x read/writespeed.

    - by Wesley
    Hi all, I couldn't find a duplicate question, but I was wondering what the differences are between different read/write speeds for Bluray drive. I'm planning on buying one for a build but don't know if I can cheap out on getting a Bluray 2x drive or spend more money for a quality Bluray 8x drive. Will I just experience more lag/buffering times for Bluray discs on a 2x and none for a 6x or 8x? Thanks in advance.

    Read the article

  • Abort a slow flush to disk after write?

    - by Therealstubot
    Is there a way to abort a python write operation in such a way that the OS doesn't feel it's necessary to flush the unwritten data to the disc? I'm writing data to a USB device, typically many megabytes. I'm using 4096 bytes as my block size on the write, but it appears that Linux caches up a bunch of data early on, and write it out to the USB device slowly. If at some point during the write, my user decides to cancel, I want the app to just stop writing immediately. I can see that there's a delay between when the data stops flowing from the application, and the USB activity light stops blinking. Several seconds, up to about 10 seconds typically. I find that the app is holding in the close() method, I'm assuming, waiting for the OS to finish writing the buffered data. I call flush() after every write, but that doesn't appear to have any impact on the delay. I've scoured the python docs for an answer but have found nothing.

    Read the article

  • Use applescript to write iCal data to file

    - by Guy
    I am trying to get applescript to read todays ical events and write them to a file. The code is as follows: set out to "" tell application "iCal" set todaysDate to current date set time of todaysDate to 0 set tomorrowsDate to todaysDate + (1 * days) repeat with c in (every calendar) set theEvents to (every event of c whose start date = todaysDate and start date < tomorrowsDate) repeat with current_event in theEvents set out to out & summary of current_event & " " end repeat end repeat end tell set the_file to (((path to documents folder) as string) & "DesktopImage:ical.txt") try open for access the_file with write permission set eof of the_file to 0 write out to the_file close access the_file on error try close access the_file end try end try return out The ical items are getting returned correctly and the file ical.txt is created correctly in the folder Documents/DesktopImage, but the file is blank. Even if I substitute write out to the_file with write "Test string" to the_file it still comes up blank any ideas? Ty

    Read the article

  • How to identify heavy write to disk?

    - by Darth
    I have this problem with server running CakePHP application. The server is insanely slow, I first thought that it's application problem, but then I found constant 5-6MB/s write to disk. What is the easiest way to find cause of such a heavy write? The server is running Gentoo.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >