Search Results

Search found 10693 results on 428 pages for 'raw disk'.

Page 35/428 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Code golf - hex to (raw) binary conversion

    - by Alnitak
    In response to this question asking about hex to (raw) binary conversion, a comment suggested that it could be solved in "5-10 lines of C, or any other language." I'm sure that for (some) scripting languages that could be achieved, and would like to see how. Can we prove that comment true, for C, too? NB: this doesn't mean hex to ASCII binary - specifically the output should be a raw octet stream corresponding to the input ASCII hex. Also, the input parser should skip/ignore white space. edit (by Brian Campbell) May I propose the following rules, for consistency? Feel free to edit or delete these if you don't think these are helpful, but I think that since there has been some discussion of how certain cases should work, some clarification would be helpful. The program must read from stdin and write to stdout (we could also allow reading from and writing to files passed in on the command line, but I can't imagine that would be shorter in any language than stdin and stdout) The program must use only packages included with your base, standard language distribution. In the case of C/C++, this means their respective standard libraries, and not POSIX. The program must compile or run without any special options passed to the compiler or interpreter (so, 'gcc myprog.c' or 'python myprog.py' or 'ruby myprog.rb' are OK, while 'ruby -rscanf myprog.rb' is not allowed; requiring/importing modules counts against your character count). The program should read integer bytes represented by pairs of adjacent hexadecimal digits (upper, lower, or mixed case), optionally separated by whitespace, and write the corresponding bytes to output. Each pair of hexadecimal digits is written with most significant nibble first. The behavior of the program on invalid input (characters besides [a-fA-F \t\r\n], spaces separating the two characters in an individual byte, an odd number of hex digits in the input) is undefined; any behavior (other than actively damaging the user's computer or something) on bad input is acceptable (throwing an error, stopping output, ignoring bad characters, treating a single character as the value of one byte, are all OK) The program may write no additional bytes to output. Code is scored by fewest total bytes in the source file. (Or, if we wanted to be more true to the original challenge, the score would be based on lowest number of lines of code; I would impose an 80 character limit per line in that case, since otherwise you'd get a bunch of ties for 1 line).

    Read the article

  • Getting raw display data from NSView

    - by caballo7
    hi-- my goal is to send an NSView over the wire. i was wondering whether there was a way to get the raw display data contained in an NSView so that I can send this data over the wire and re-display this at the destination. thanks.

    Read the article

  • Raw Audio Conversion

    - by Walidix
    While, I'm reading gstreamer document I found this: " Audioconvert converts raw audio buffers between various possible formats. It supports integer to float conversion, width/depth conversion, signedness and endianness conversion and channel transformations." I only understand "depth" (bit number per sample) "signedness and endianness" (for data representation) And now, I'm looking for explanations of : "integer to float conversion" "width" "channel transformations" Thanks in advance

    Read the article

  • Getting RAW Soap Data from a Web Reference Client running in ASP.net

    - by Harry
    I'm trying to trouble shoot a web service client in my current project. I'm not sure of the platform of the Service Server (Most likely LAMP). I believe there is a fault on their side of the fence as i have eliminated the potential issues with my client. The client is a standard ASMX type web reference proxy auto generated from the service WSDL. What I need to get to is the RAW SOAP Messages (Request and Responses) What is the best way to go about this?

    Read the article

  • how to run few vim commands in a raw

    - by temujin.ya.ru
    Hello. This is really noob question. There is set of vim commands : command1 : command2 etc., which I would neet to type in in a raw quite often. How to I make it automatic? It is simple regexp replace command set, however I cannot script those in sed, since it involves non-latin locales and for some reason vim handles non-latin regexps correctly, while sed not.

    Read the article

  • Why it's giving me raw HTML?

    - by leomayleomay
    I'm using Facebox, and when I tried to change the content of a tag, it's giving me raw HTML but the rendered form, the code snippet is: jQuery('#facebox .content').html("<%= escape_javascript(render :partial => 'form')%>"); Anybody has any idea about this? Thanks a lot.

    Read the article

  • mongodb java driver - raw command?

    - by Scott
    Is it possible to execute raw commands as javascript through the Java driver for MongoDB? I'm tired of wrapping everything in Java objects using Rhino, and would happily sacrifice performance for the convenience of passing javascript directly through to the DB. If not, I can always use sleepymongoose or something, but I don't really want to add yet another language (python) to the stack at this point. Any insights are appreciated.

    Read the article

  • Ubuntu 14.04 has a bunch of old kernel directories

    - by NoBugs
    I saw in Disk Usage Analyzer I have 3.13.0-xx for 8 minor versions of the kernel in /lib/modules. Each is around 200MB. I remember having to go through in Synaptic and remove those old Linux versions before, but hasn't this bug been fixed? Is it just paranoid default setting, that perhaps all of the last half dozen kernels might become unbootable, so it keeps each old one around? Or do I have some developer setting enabled by accident that causes this?

    Read the article

  • Error mounting an external HDD

    - by Slash
    I want to mount an external HDD.I have tried many things but still no success.When i try to mount it from Disk Utility i get this error: Error mounting: mount exited with exit code 1: helper failed with: Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at tuxera.com/community/ntfs-3g-faq/#unprivileged

    Read the article

  • How to wipe RAM on shutdown (prevent Cold Boot Attacks)?

    - by proper
    My system is encrypted using Full Disk Encryption, i.e. everything except /boot is encrypted using dmcrypt/luks. I am concerned about Cold Boot Attacks. Prior work: https://tails.boum.org/contribute/design/memory_erasure/ http://tails.boum.org/forum/Ram_Wipe_Script/ http://dee.su/liberte-security http://forum.dee.su/topic/stand-alone-implementation-of-your-ram-wipe-scripts Can you please provide instructions on how to wipe the RAM once Ubuntu is shutdown/restarted? Thanks for your efforts!

    Read the article

  • NTFS volume recognised as "Unallocated Space" but works with Windows

    - by msaspence
    Moving to Ubuntu, I have a drive with windows on a drive with Ubuntu on and 4 other ntfs drives 3 of which appear fine in both systems 1 however works fine on windows (single ntfs volume) but in ubuntu the drive appears in the disk utility with a 134 MB "Microsoft Reserved Partition" and 2TB of Unallocated Space Is there any way I can get this volume to be mounted in Ubuntu with out moving all my data to another driver formatting and then moving back again

    Read the article

  • Allocating drive space?

    - by Nadim A. Hachem
    I'm trying to install ubuntu but i already have windows 7 on the same computer and i can't afford losing it. everything went perfectly well until allocating drivespace. i dont have the option to "install it besides another operating system " like in the instructions. i only get this menu when my external hard disk is plugged in, but i dont want that. any help assigning partitions? because i have no clue about what to do there this is what the partition menu gives

    Read the article

  • What partition PlayOnLinux and Wine software has to be installed to?

    - by user211076
    please tell I'm using Ubuntu 12.04 and if I have already created ext4 ./ (partition) and on the same volume I have ./home so if I create a separate partition ./home will the software that I install for example from Ubuntu Download Center will automatically go to ./home (partition) or still ./ (root) because I'm using PlayOnLinux and Wine and all its software only installs to ./home (file system disk) where emulated copy of Windows Xp installed also and it's a lack of space.

    Read the article

  • Android Dev Help: Saving an image from Res/raw or Asset folder to the Sd card

    - by Lucy
    Android Development Query Hello, I wonder if anyone could help me, i am trying to save an image (jpg or png) from the res/raw or assets folder to the SD card location (/sdcard/DCIM/). I have been following a tutorial which can save an image from a URL to the SD card Root, but i have looked everywhere to be able to save from res/raw or asset folder instead, and to a differnet location onthe sd card /sdcard/DCIM/ Here is the code, can anyone show me how to do the above from this? Thanks Lucy public class home extends Activity { private File file; private String imgNumber; private Button btnDownload; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnDownload=(Button)findViewById(R.id.btnDownload); btnDownload.setOnClickListener(new OnClickListener() { public void onClick(View v) { btnDownload.setText("Download is in Progress."); String savedFilePath=Download("http://www.domain.com/android1.png"); Toast.makeText(getApplicationContext(), "File is Saved in "+savedFilePath, 1000).show(); if(savedFilePath!=null) { btnDownload.setText("Download Completed."); } } }); } public String Download(String Url) { String filepath=null; try { //set the download URL, a url that points to a file on the internet //this is the file to be downloaded URL url = new URL(Url); //create the new connection HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); //set up some things on the connection urlConnection.setRequestMethod("GET"); urlConnection.setDoOutput(true); //and connect! urlConnection.connect(); //set the path where we want to save the file //in this case, going to save it on the root directory of the //sd card. File SDCardRoot = Environment.getExternalStorageDirectory(); //create a new file, specifying the path, and the filename //which we want to save the file as. String filename= "download_"+System.currentTimeMillis()+".png"; // you can download to any type of file ex:.jpeg (image) ,.txt(text file),.mp3 (audio file) Log.i("Local filename:",""+filename); file = new File(SDCardRoot,filename); if(file.createNewFile()) { file.createNewFile(); } //this will be used to write the downloaded data into the file we created FileOutputStream fileOutput = new FileOutputStream(file); //this will be used in reading the data from the internet InputStream inputStream = urlConnection.getInputStream(); //this is the total size of the file int totalSize = urlConnection.getContentLength(); //variable to store total downloaded bytes int downloadedSize = 0; //create a buffer... byte[] buffer = new byte[1024]; int bufferLength = 0; //used to store a temporary size of the buffer //now, read through the input buffer and write the contents to the file while ( (bufferLength = inputStream.read(buffer)) > 0 ) { //add the data in the buffer to the file in the file output stream (the file on the sd card fileOutput.write(buffer, 0, bufferLength); //add up the size so we know how much is downloaded downloadedSize += bufferLength; //this is where you would do something to report the prgress, like this maybe Log.i("Progress:","downloadedSize:"+downloadedSize+"totalSize:"+ totalSize) ; btnDownload.setText("download Status:"+downloadedSize+" / "+totalSize); } //close the output stream when done fileOutput.close(); if(downloadedSize==totalSize) filepath=file.getPath(); //catch some possible errors... } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { filepath=null; btnDownload.setText("Internet Connection Failed.\n"+e.getMessage()); e.printStackTrace(); } Log.i("filepath:"," "+filepath) ; return filepath; } }

    Read the article

  • How to detect a timeout when using asynchronous Socket.BeginReceive?

    - by James Hugard
    Writing an asynchronous Ping using Raw Sockets in F#, to enable parallel requests using as few threads as possible. Not using "System.Net.NetworkInformation.Ping", because it appears to allocate one thread per request. Am also interested in using F# async workflows. The synchronous version below correctly times out when the target host does not exist/respond, but the asynchronous version hangs. Both work when the host does respond. Not sure if this is a .NET issue, or an F# one... Any ideas? (note: the process must run as Admin to allow Raw Socket access) This throws a timeout: let result = Ping.Ping ( IPAddress.Parse( "192.168.33.22" ), 1000 ) However, this hangs: let result = Ping.AsyncPing ( IPAddress.Parse( "192.168.33.22" ), 1000 ) |> Async.RunSynchronously Here's the code... module Ping open System open System.Net open System.Net.Sockets open System.Threading //---- ICMP Packet Classes type IcmpMessage (t : byte) = let mutable m_type = t let mutable m_code = 0uy let mutable m_checksum = 0us member this.Type with get() = m_type member this.Code with get() = m_code member this.Checksum = m_checksum abstract Bytes : byte array default this.Bytes with get() = [| m_type m_code byte(m_checksum) byte(m_checksum >>> 8) |] member this.GetChecksum() = let mutable sum = 0ul let bytes = this.Bytes let mutable i = 0 // Sum up uint16s while i < bytes.Length - 1 do sum <- sum + uint32(BitConverter.ToUInt16( bytes, i )) i <- i + 2 // Add in last byte, if an odd size buffer if i <> bytes.Length then sum <- sum + uint32(bytes.[i]) // Shuffle the bits sum <- (sum >>> 16) + (sum &&& 0xFFFFul) sum <- sum + (sum >>> 16) sum <- ~~~sum uint16(sum) member this.UpdateChecksum() = m_checksum <- this.GetChecksum() type InformationMessage (t : byte) = inherit IcmpMessage(t) let mutable m_identifier = 0us let mutable m_sequenceNumber = 0us member this.Identifier = m_identifier member this.SequenceNumber = m_sequenceNumber override this.Bytes with get() = Array.append (base.Bytes) [| byte(m_identifier) byte(m_identifier >>> 8) byte(m_sequenceNumber) byte(m_sequenceNumber >>> 8) |] type EchoMessage() = inherit InformationMessage( 8uy ) let mutable m_data = Array.create 32 32uy do base.UpdateChecksum() member this.Data with get() = m_data and set(d) = m_data <- d this.UpdateChecksum() override this.Bytes with get() = Array.append (base.Bytes) (this.Data) //---- Synchronous Ping let Ping (host : IPAddress, timeout : int ) = let mutable ep = new IPEndPoint( host, 0 ) let socket = new Socket( AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Icmp ) socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.SendTimeout, timeout ) socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, timeout ) let packet = EchoMessage() let mutable buffer = packet.Bytes try if socket.SendTo( buffer, ep ) <= 0 then raise (SocketException()) buffer <- Array.create (buffer.Length + 20) 0uy let mutable epr = ep :> EndPoint if socket.ReceiveFrom( buffer, &epr ) <= 0 then raise (SocketException()) finally socket.Close() buffer //---- Entensions to the F# Async class to allow up to 5 paramters (not just 3) type Async with static member FromBeginEnd(arg1,arg2,arg3,arg4,beginAction,endAction,?cancelAction): Async<'T> = Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,arg3,arg4,iar,state)), endAction, ?cancelAction=cancelAction) static member FromBeginEnd(arg1,arg2,arg3,arg4,arg5,beginAction,endAction,?cancelAction): Async<'T> = Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,arg3,arg4,arg5,iar,state)), endAction, ?cancelAction=cancelAction) //---- Extensions to the Socket class to provide async SendTo and ReceiveFrom type System.Net.Sockets.Socket with member this.AsyncSendTo( buffer, offset, size, socketFlags, remoteEP ) = Async.FromBeginEnd( buffer, offset, size, socketFlags, remoteEP, this.BeginSendTo, this.EndSendTo ) member this.AsyncReceiveFrom( buffer, offset, size, socketFlags, remoteEP ) = Async.FromBeginEnd( buffer, offset, size, socketFlags, remoteEP, this.BeginReceiveFrom, (fun asyncResult -> this.EndReceiveFrom(asyncResult, remoteEP) ) ) //---- Asynchronous Ping let AsyncPing (host : IPAddress, timeout : int ) = async { let ep = IPEndPoint( host, 0 ) use socket = new Socket( AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Icmp ) socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.SendTimeout, timeout ) socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, timeout ) let packet = EchoMessage() let outbuffer = packet.Bytes try let! result = socket.AsyncSendTo( outbuffer, 0, outbuffer.Length, SocketFlags.None, ep ) if result <= 0 then raise (SocketException()) let epr = ref (ep :> EndPoint) let inbuffer = Array.create (outbuffer.Length + 256) 0uy let! result = socket.AsyncReceiveFrom( inbuffer, 0, inbuffer.Length, SocketFlags.None, epr ) if result <= 0 then raise (SocketException()) return inbuffer finally socket.Close() }

    Read the article

  • RightFax 9.3 Available Disk Space?

    - by dkirk
    We are currently running RightFax 9.3 as our fax server. I was just in the RightFax Enterprise Fax Manager resolving another problem and noticed 2 little red exclamation marks in the lower left hand pane. I have one beside "Available disk space for fax images" and one beside "Available disk space for fax database". Both are labeled with 5%? What is this? How can this be resolved? I have plenty of physical storage left on the server drives so I am curious as to which space it is referring to??

    Read the article

  • OpenIndiana installation hangs at 2% - Preparing disk for OpenIndiana installation

    - by Chris S
    I've been trying to install OpenIndiana on an HP DL320 G6 for a while now. I've got a 16GB HP SDHC card in the onboard slot and a SATA CD-Rom with oi-dev-151a-text-x86.iso burnt to a disc. Installation seems to progress fine until I get to the actual installation portion. The SD card is picked up as a USB Disk. All the other configuration options are very 'normal' (there really aren't many options to begin with). Automatic NIC configuration. The installer starts "Installing OpenIndiana", does a few steps, then gets to "Preparing disk for OpenIndiana installation" at 2%; and just sits there. I've let it sit for half an hour now ans still no progress. How can I get past this issue? PS I'm not terribly familiar with OpenSolaris, but am with FreeBSD and *nix CLIs in general.

    Read the article

  • Print raw data to a thermal-printer using c#

    - by blauesocke
    Hi, I'm trying to print out raw ascii data to a thermal printer. I do this by using this code example: http://support.microsoft.com/kb/322091 but my printer prints always only one character and this not until I press the form feed button. If I print something with notepad the printer will do a form feed automatically but without printing any text. The printer is connected via usb over a lpt2usb adapter and Windows 7 uses the "Generic - Generic / Text Only" driver. Anyone knows what is going wrong? How is it possible to print some words and do some form feeds? Are there some control characters I have to send? And if yes: How do I send them? Thanks!

    Read the article

  • Windows 7 Backup Disk Full

    - by George
    What happens when a Windows 7 backup disk is full? I've been trying to find documentation on the issue without success. Does Windows 7 automatically delete the oldest backup files to free up space or does it force you manually pick and choose which files to delete? Time Machine automatically deletes the oldest copy of files, but as far as I can tell Windows 7 makes you manually choose. I keep getting a running out of disk space for backup notice on Windows 7 without any option to not warn me and just delete the oldest files automatically...

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >