MikeTheCoder

4

votes
0

answer
37

views

Why Stream.Copy is faster than Stream.Write to FileStream?

I have a question and I can't find a reason for it. I'm creating a custom archive file , I'm using Memory Streams to storing data and finally I use a file stream to write the data to disk. My Hard Disk is SSD , But the speed was too slow when I tried to write only 95MB to a file , It takes 12 second...
MikeTheCoder
6

votes
5

answer
25.4k

views

How can I fix too many redirects caused by .htaccess?

I recently added a Wordpress blog to a client's website. I create a subdirectory and installed Wordpress there. Everything worked fine until I added a .htaccess file to the root directory. RewriteEngine on rewritecond %{http_host} ^websitename.com [nc] rewriterule ^(.*)$ http://www.websitename.com/$...
MikeTheCoder
2

votes
3

answer
8k

views

Trying to create a new application in Yii: env: php: No such file or directory

I'm trying to create a new yii app from the terminal. My YiiRoot folder is in my htdoc folder. I'm first going into my webroot: $ cd /Applications/MAMP/htdocs I'm then going into yiic and trying to create a new application: /Applications/MAMP/htdocs/YiiRoot/framework/yiic webapp demo I'm then gettin...
MikeTheCoder
2

votes
1

answer
333

views

How can I save an object that's related to another object in core data?

I'm having difficulty with a one to one relationship. At the highest level, I have a one to many relationship. I'll use the typical manager, employee, example to explain what I'm trying to do. And to take it a step further, I'm trying to add a one to one House relationship to the employe. I have th...
MikeTheCoder
14

votes
4

answer
71.4k

views

How can I get PHP working again in the command line?

I'm completely at loss here and am about to wipe my hard drive clean and start from a fresh OS install. I've been trying for two days to create a new yii app in the terminal and have finally figured out that the terminal or command line can not even execute PHP all of a sudden. I had no problem in p...
MikeTheCoder
2

votes
3

answer
7.2k

views

How do I add a small number into my html?

I'm having a difficult time doing this probably because I'm not sure what to even call it. But a client wants me to put a small number one in some text at the end of a sentence - wich indicates that they should find the small 1 at the bottom of the page to read more details about that particular sen...
MikeTheCoder