Ninjakreborn
Members-
Posts
3,922 -
Joined
-
Last visited
Everything posted by Ninjakreborn
-
if (std::strcmp(answer, "yes")) { std::cout<<"Please stand by while the data is being gathered and the file is being generated...\n"; std::ofstream outfile("C:/Users/businessman332211/Desktop/test.txt"); outfile << "This is data." << std::endl; outfile.close(); system("pause"); } I had this figured out before, but I stepped away from C++ and I am trying to pick up where I left off. basically I just want to generate a text file on the desktop...This isn't working even though everything i have read tells me it should Another question..what happens if I want to step out of the C drive and access another drive...for example an External harddrive, or a secondary drive on the same computer?
-
A contract job is simply a way of saying you will be on a 1099 position. They do this so you get no ideas that you will be receiving W2 employment. It's a nice way of saying, "We don't want to hire you, but want to use you as a contractor as we need you." Generally all freelancers are taking on contract work whether or not a contract is involved..it's still considered "Freelance Work" with no permanent/long-term employment (benefits, paid vacation, paid taxes, etc...).
-
That's what I was thinking..so my thoughts are starting to be, to take my functions and split them up into which functions are related..creating me a php page that has different classes within the pages for different related functions so I can use the Classes/oop power better. Then below my classes perhaps have all of my unrelated functions that are randomly used. Since I have 4-5 file handling functions I can put them together into one class, then group them separately.
-
I have been using functions for a long time. Long ago I got obsessed with Classes and started using them for everything..but lately I am starting to wonder if that is the best idea. A function is re-usable code that is brought together in an organized purpose for re-use at future times. A class is a collection of related values, properties, methods that allow for a specific task to become easier. In this situation a class generally has something that is done..but the system remembers what was done. For example you use variables to contain data that passes back and forth through various functions..that's why your able to advanced operations on just a few lines of code. Functions are not the same way..they are each separate parts of re-usable code that aren't connected (necessarily). So what I usually have been doing is creating a class..but their not always related to the same things. I have actually been making classes with a collection of random functions. It's not like file handling..creating a class that can deal with file handling..you can call a few parameters to setup what files and then start calling the class functions to automatically handle everything. So in this situation I am starting to wonder if a random collection of unrelated functions brought together into a class is a waste of time.. Since I am also losing the benefits that a class helps to bring. What are your thoughts on this and how you decide what your going to make into functions and what your going to make into classes. By the way I debated on where this should go...if I put it into the wrong area feel free to move it.
-
Your very unlikely to find anything free like that. The best thing you can hope for (if you don't have the experience to build one your self) is using some kind of third party open source system..you could build one using Drupal easily, if not then perhaps Joomla or another related application. If you have no programming experience you might be able to manage putting something "decent" together using various modules and configurations..although I don't really think you'll be able to take it too far as it won't be anywhere near as efficient as other stuff out there unless it had some work done to it.
-
As what he said above, define is for constants. A constant means that it is a variable that is meant to be present throughout the life of the entire website and/or application. Whereas a variable is normally temporary, a constant is meant to contain data or pieces of data and information that will need to be reused various time within the life cycle of an application.
-
I need to: 1) Take a directory named xxx (for example) that contains some files/folders ect... 2) Make a "exact copy" of that folder without harming, inadversely affecting, or deleting the original folder...but it'll be within the same folder...(will explain in a bit) 3) Rename the new folder to another name yyy (for example). Here is the catch. I need to have it structured like this. /MasterFolder /MasterFolder/xxx I need to copy that over to /MasterFolder/yyy This is something that I haven't been able to find any good solutions for online. My main question here..is that possible? Or do I have to do this the long way...by long way I mean: 1) Make a new folder named the new name of the folder they want. 2) Go and grab all the filenames from the folder that I want to mock from 3) Take each file separately and make a new copy of it in the other folder 4) Move over each folder in that xxx folder one at a time. I was hoping there was a way to: Grab folder, make a copy of it and rename it at the same time..I might be hoping for too much. Anyone done this before?
-
I have dreamweaver CS4...I have a site setup which gives me root access to the server directory for one of my main clients. Basically I am wondering if there is a way to have different folders in the FTP associated with different SVN repositories. Right now it only let's you have one SVN repository for any given server. Is that possible?
-
I like it the only suggestion is dim the mouseovers to the links. There a little extreme for this color scheme.
-
Question for developers - How do you store your code.
Ninjakreborn replied to Ninjakreborn's topic in Miscellaneous
haha, I wasn't expecting that. -
The layout isn't bad. It looks nice. the only recommendation I could give, is give the navigation menu items some rollover affects to give it a little variety. Maybe even put some CSS to handle active state. That would liven things up a bit.
-
I don't have a lot of experience with Postgrsql, but it's not very different from Mysql. You would gather the data in clean variables (Postgre probably has an internal function kind of like Mysql's Mysql_real_escape_string()). From there you would form a query and load it into the database. If your using a framework there may be some built in classes to handle that for you. Post some of the code your using here.
-
I know, and I think waynewex is not entirely too smart.
-
Who the hell are you again?
-
Question for developers - How do you store your code.
Ninjakreborn replied to Ninjakreborn's topic in Miscellaneous
I thought about that. I use to. Once I took a Codeignitor framework a long time ago and I was using it. But after awhile (since I freelance) I had to jump around a lot. I used Cakephp, Zend Framework, Symphony and a score of other frameworks that were custom built..not to mention working with systems like Drupal, Joomla, Wordpress, and various forums. All-in-all I barely got to use it, because when I was able to use Codeignitor for a new project, I always ended up using the original. I also thought about putting all my code, snippets, functions classes inside my planner: www.essentialpim.com is what I use. However it's kind of acward to get them from there. -
Oh that. When I first tried quickbooks, I uninstalled it. The timetracking wasn't what I wanted. Then a friend of mine told me that it works differently than I thought. I reinstalled it and spent some time working with it and there were a lot of hidden features that were hidden. After digging around and customizing I was finally able to get it to where i wanted it. I have been using it ever since. There are a few things I don't like about it, but for the most part it's pretty good.
-
I notice in this field we work with a lot of different things. A lot of developers also work with a lot of other languages. Obviously the goal is to write code once, and never have to write it again..in a way. WHen you figure out how to do something new, generally developers stick it into a function so they can re-use. I am starting to notice that over the years..I work with different frameworks..and sometimes without one. I noticed a long time ago that if I keep a customized copy of cake for example..or code ignitor..one day I might be working with something else. What I am asking is what do you do to keep your code together over multiple projects. Javascript is another example. I have seen people who have taken a custom javascript class that they built..everytime they develop a new javascript function they load the function up into there universal class..then they include that javascript in any job their working on. Same with PHP, I have seen some develop classes for PHP and keep them all together. I am sure other languages: C++, Ruby, Python, and other languages you can do the same. What do you do to keep track of code you have written. My generally thoughts were to make a SVN setup on my server and use that basically to store a base copy of all of my stuff. If I think of a good javascript function, or group of functions I can load them into SVN so I can always get them if I wanted. How do you store your code? Or if you do a really cool implementation for a project...is there anything you do to replicate that functionality and put it somewhere so you can put it later on a project. This includes classes. A lot of people find some classes they really like..how would you keep track of the ones you liked or use on future projects so you won't have to keep looking them up every time.
-
http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php I thought I would share this. After what you said about image magick and the other library (Which I had already known about but had never used) I found this really cool class. I popped it into Zend Framework and I was able to load an image that was saved, resize it however I want (perfectly) and save it right back over the old file with no issues. This worked perfectly, thanks.
-
Date/Time - Timezone not being read.
Ninjakreborn replied to Ninjakreborn's topic in PHP Coding Help
I tried INI, wasn't working. Genesis, thanks. It worked. Based off the documentation "EST" was a setting you could use. They need to update that, your setting worked. Thanks again. -
I am setting up a timestamp on a report for a client I built awhile back. I have quite a bit of experience messing with PHP dates, but never really had this issue. The timezone is set to GMT right now..I need it to default to EST and show EST time. $date = date('l jS \of F Y h:i:s A'); $csv .= $date .', '; echo '<p>Time: '.$date.'</p>'; There, that shows the time. It was in GMT format..so I did some steps to try and change it. I tried: putenv("EST"); Afterwards I tried setting an INI file in the folder above it and set that to: date.timezone = "EST" It's still printing the time as... When EST time would be my time (1:53 P.M.) Edit: I am using, PHP Version 4.4.4. That might be part of the issue...since I can't use that new function which allows you to set the default time. Edit Part 2: Based off of my research, date_default_timezone_set('EST'); would work if I had PHP 5. Unfortunately I don't.
-
Cool thanks. Gives me some choices and some different ways to study. Thanks again.
-
I have a form that loads up a file to the server. So far I am taking the file, deleting the old one, and moving the new one as well as databasing the name. Now that I am done with all of that I have an image file that is sitting on the server and I have the path name to it. I need to resize them down to a specific height and width. Is there a way to take the path of the image and just resize the image where it is located...I am not looking for a lot of detail, just someone to point me in the right direction.
-
The return value of insert and update return the last used Mysql ID. Problem solved.
-
For me it varies, I work in a strange way. I don't just..work. I actually think...generally about 24 hours before I ever start working. I get a lot of the theories, ideas, and programming and functionality in my head entirely..then I write code. I rarely run into issues. When i do..then I stop for 2-3 hours and go work on something else..generally about 80% of hte time I figured it out in my head before I go back..generally from some random thought. Although there are times when there is a deadline and I get stuck on something...in those situations I just pray, dig-in, and do what I can to make things happen..oh and PHPFreaks.com is always my fallback. Never fails if there is something I have no other way of figuring out.
-
I finally found something that does everything I wanted and more. I started looking at QUicken...it was almost what I wanted for the finances..but didn't have time tracking. After some more digging I found Quickbooks. It was easier to use and worked great..not to mention it had the time tracking and invoicing and everything else..even a timer. A little rough around the edges but all in all what I needed. Now if I could have avoided the 3 hours getting my transactions from one bank in there, then another 2 hours figuring how out to get paypal in there, and now I have to manually enter 6 years worth of transactions from the old bank I used...besides that it's great..just a lot of data entry. Thanks again for all the suggestions. I really never thought I would find the right tool and this is it.