i have a button in my ib and when button gets pressed i want to display text view with using of existing view controller ..
please let me know answer ...........
I would like to read the last 1 megabyte of a MP3 file and calculate SHA1 checksum for just that part of the file. The reason that I would want this is that when I'm looking for duplicate MP3's, the header info (song title, album etc.) can differ even though it's the exakt same audio file, so I figured I would be better of to checksum a part of the…
this is my code:
f = open('text/a.log', 'wb')
f.write('hahaha')
f.close()
and it is not create a new file when not exist
how to do this ,
thanks
updated
class MyThread(threading.Thread):
def run(self):
f = open('a.log', 'w')
f.write('hahaha')
f.close()
error is :
Traceback (most recent call last):
File…
Scratching my head awhile on this.
I'm on a Vista client trying to access a file share running on a Windows Server 2008 R2 box. Windows Active Directory Domain.
The shares I am trying to access:
\\Server1\FileShare1\Folder1\foo
and
\\Server1\FileShare1\Folder1\bar
The client does not have any permissions at Folder1. The client has read…
The problem we have run into is as follows. We have an ASP.NET WebService which runs under IIS7. The code in the WebService works 100%, however when the WebService tries to run a .BAT file, nothing happens. Nothing at all, the code doesn't crash, the server doesn't warn us about anything, nothing at all.
We have tried setting the User…
I'm trying to do some multicast big file copies over to remote clients on the other side of a satellite link. The idea is to minimize the amount of traffic going up to the satellite.
I tried using uftp without luck. The problem is that, even though we can reach clients via multicast from our central Hub, they aren't able to respond to…
Is there a way that I can seek to a certain line in a file to read or write data?
Let's say I want to write some data starting on the 10th line in a text file. There might be some data already in the first few lines, or the file could even be empty. Is there a way I can seek directly to the line I want without having to worry about…
We have recently been hit by a weird virus which made all files and folders a system files/folders and also it hid all files and folders par some weird ones it created including:
..exe
porn.exe
secret.exe
password.exe
etc
We have managed to restore the files with attrib command to unhide and unmark them as system files however we…
Hi. I'm looking into sentence recognition to make a program that should play voice clips from the game Team Fortress 2. I have .wav files and text files containing the transcription for every sound. What I'd like to make is a system that makes two characters of the game talk to each other (trough playing sound clips), and each one…
I have a batch file with some commands that I need to run with my installer, but I'd rather a console not appear (in Windows). I'm executing the batch file from a WiX installer, via a custom action. I tried adding an @ECHO OFF to the top of the file, but that didn't seem to do anything.
Is there a way that I can run this batch…
I'm writing a small ruby daemon that I am hoping will do the following:
Check if a specific directory has files (in this case, .yml files)
If so, take the first file (numerically sorted preferrably), and parse into a hash
Do a 'yield', with this hash as the argument
What I have right now is like:
loop do
…
Not sure whats going on here, or what could be the integer in this case. Here's the code:
def build_array_from_file(filename)
contents = []
File.read(File.expand_path('lib/project_euler/' + filename), 'r') do |file|
while line = file.get
contents << line
end
end
contents…
Dear friends,
Please tell me whether it is possible for someone on the external network to see the network folder shares of an internal LAN network in DHCP (192.168.x.x) through a Comp-A on an external network in DHCP (123.123.x.x)
both networks are on different subnets
but Comp-A has access to both networks…
Hi,
If I am trying to delete a file, but at the same time another process is performing a File.Exists(...) on the same file, will that potentially lock the file and cause my process to fail?
I looked at this post and it seemed to be close to what I want, but my case might be a little worse:
How can I reset my windows 7 file permissions to a rational state?
Basically a while back I (very stupidly) changed the permissions on all sorts of system folders, and eventually rendered my computer virtually…
I need to write a custom batch File renamer. I've got the bulk of it done except I can't figure out how to check if a file is already open. I'm just using the java.io.File package and there is a canWrite() method but that doesn't seem to test if the file is in use by another program. Any ideas on how I can make…
So I'm fairly new to large-scale architectures. We're currently using linode instances for our project, but we're brainstorming about scaling.
We need a file store system than can deliver ~50mb folders (user data) to our computing instances in a reasonable amount of time (<20 sec), and scale to 10000+ total…
Hi I would like to setup a local linux file server (using centos and samba) that can be accessed by two independent local networks in the same house. I have 2 networks on the same floor which have Windows 7 computers, but the networks are split as we have 2 internet connections. How do I go about this?
…
I would like to save a file downloaded from the internet in iPhone.
Can I use the url as the file name? If not, what transformation should I apply to the url to obtain a valid file name?
I need to find the local copy of the file later using its url.
I have the following syntax in the .cmd file, where PathList is console application with .exe as extension.
cd D:\Sample
D:
PathList 2> file.txt
This syntax works fine if the file is saved with .bat as extension, but if save it with .cmd extension it throws error saying
'PathList' is not…
Every time I switch machines (as in, get a new one, or reinstall an OS or something like that) my precious file associations get lost. And the next six months pass slowly until I again set them up right.
Is there a program that allows me to:
Set all the extensions I would like to open with…
Hi, I Want Link Button Property that When i click the Link Button,Label Content is Shown then after reading the content i click the same link button that time the Label content is Disable
Tell Me the Answer
I need to open a file as ofstream and write to the front of the file, while preserving
the remaining contents of the file, which will be "moved". Similar to "prepend"
a file.
Is this possible using the STL or boost ?
I have always had trouble setting up samba shares with ubuntu. In the past I've tried getting it to work by configuring /etc/samba/smb.conf but never achieved what I wanted. Last time I managed to get it working by making a share with nautilus built in file sharing (which utilises samba). Now…
So I have been looking through some code I wrote a few years ago for an economic simulation program. Each simulation has a large number of settings that can be saved to a file and later loaded back into the program to re-run the same/similar simulation. Some of the settings are optional or…