Search found 91 matches

by dzcadii
Sun Sep 18, 2016 3:50 pm
Forum: Windows Clients (PC)
Topic: Context menu for Notepad++ or other programs :: Windows
Replies: 0
Views: 518

Context menu for Notepad++ or other programs :: Windows

If you need a context menu option (right mouse click) for Notepad++ or other software you can use the following: WARNING! Use at your own risk because you are messing with the registry! Place the following in a file and change the extension to ".reg" Change the path to where the ".exe" is -- The pat...
by dzcadii
Sun Jun 12, 2016 6:12 pm
Forum: Windows Clients (PC)
Topic: Need to uninstall Windows 10 Built-in applications :: Bloatware
Replies: 0
Views: 454

Need to uninstall Windows 10 Built-in applications :: Bloatware

Situation: You “uninstalled” a Windows application only for it to come back again by right mouse clicking over the application and selecting “uninstall”. This only removes the reference for that particular user’s profile. You can’t seem to find an uninstall option for an application in the Control ...
by dzcadii
Sun Jun 12, 2016 4:26 pm
Forum: Windows Clients (PC)
Topic: Windows 10 default Photo Viewer - png files - Black Background Issues
Replies: 0
Views: 1266

Windows 10 default Photo Viewer - png files - Black Background Issues

If you run into an issue where an image is black with a transparent background, check out the following: There isn’t anything wrong with your system Windows 10/Microsoft Photos version 16.5… simply doesn’t support black images with transparent backgrounds while using a black backgrounded theme! win1...
by dzcadii
Sun Jun 12, 2016 3:46 pm
Forum: Other software vendors
Topic: Cool tools :: Java Ascii Versatile Editor (JavE)
Replies: 0
Views: 636

Cool tools :: Java Ascii Versatile Editor (JavE)

avE is a free Ascii Editor. Rather than for editing texts, it is intended for drawing simple diagrams by using Ascii characters.

It is like a graphics editor for editing texts instead of images.

http://www.jave.de/
by dzcadii
Sun Jun 12, 2016 3:43 pm
Forum: Technical news
Topic: Google to block flash in Chrome, aiming to use HTML5
Replies: 0
Views: 808

Google to block flash in Chrome, aiming to use HTML5

More and more browsers are getting away from flash and defaulting to HTML5. Under the plan revealed by Google, called “HTML5 by Default,” the Chrome browser will continue to ship with Adobe’s Flash Player, but its presence will not be advertised by default. (IDG Consumer & SMB) http://www.pcworld.co...
by dzcadii
Sun Jun 12, 2016 3:31 pm
Forum: Technical news
Topic: A Controversial Surveillance Firm Was Granted a Powerful Encryption Certificate :: Motherboard article reference
Replies: 0
Views: 500

A Controversial Surveillance Firm Was Granted a Powerful Encryption Certificate :: Motherboard article reference

A Controversial Surveillance Firm Was Granted a Powerful Encryption Certificate | Motherboard A controversial surveillance company whose products have been detected in Iran and Sudan was recently issued a powerful encryption certificate by a US cybersecurity company. The certificate, and the authori...
by dzcadii
Sun Jun 12, 2016 3:28 pm
Forum: Linux
Topic: Linux cheat sheets
Replies: 0
Views: 649

Linux cheat sheets

So, There I was working on DzSoundNirvana.com's new design and some wild Linux distros. decided to download to my box and asked to become virtual machines. It has been a while so I found a nice site that helps refresh my mind a little before I start "man man" and man that. If you are looking around ...
by dzcadii
Sun Jun 12, 2016 3:25 pm
Forum: Other software vendors
Topic: Gpg4win (GNU Privacy Guard for Windows)
Replies: 0
Views: 402

Gpg4win (GNU Privacy Guard for Windows)

If you are worried about sending Personally Identifiable Information (PII) or other sensitive data but can't afford some fancy encryption software you have some options. Windows users can use "Gpg4win" This is for file and email encryption. Gpg4win (GNU Privacy Guard for Windows) is Free Software an...
by dzcadii
Sun Oct 25, 2015 3:17 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Serach List<Object> for value by column name (MVC)
Replies: 0
Views: 1104

Serach List<Object> for value by column name (MVC)

public class ConfigurationVO { public int id { get; set; } public string name { get; set; } public string value { get; set; } } //Create an access object that returns a List<object> //Set your new List<object> List<ConfigurationVO> configuration = ConfigurationDAO.GetConfigurationInfo(); //Look for...
by dzcadii
Sun Aug 16, 2015 12:35 am
Forum: jQuery
Topic: JQuery open: with $.ajax scroll to top
Replies: 0
Views: 987

JQuery open: with $.ajax scroll to top

Here is a solution if you are loading a jquery dialog with $.ajax that has any links inside of the returned content and it scrolls to the bottom or position in the dialog where the links are. Plus I put some other goodies you might find useful! In the "open" event of the jquery dialog place a timeou...
by dzcadii
Fri Jun 12, 2015 3:20 am
Forum: PHP (Hypertext Preprocessor)
Topic: Pass JavaScript value to PHP
Replies: 0
Views: 1005

Pass JavaScript value to PHP

So, here is a little way to pass a variable, array, or object from JavaScript to PHP. JavaScript side: var encData = encodeURIComponent(JSON.stringify(<what you want to pass to the back end>)); //Typically I put this into a hidden form input but you can do what you need. Like: $('#selectorID').val(e...
by dzcadii
Sat Jun 06, 2015 1:27 am
Forum: jQuery
Topic: Stop "Enter" press on form JQuery
Replies: 0
Views: 5011

Stop "Enter" press on form JQuery

Simply put:

Code: Select all

$('form :input').on("keypress", function(e) {
    return e.keyCode != 13;
});
by dzcadii
Sun Apr 05, 2015 6:52 am
Forum: PHP (Hypertext Preprocessor)
Topic: Generate a random password
Replies: 0
Views: 886

Generate a random password

Here is a simple way to generate a random password etc. Use at will/own risk, Just something to get you thinking. <?PHP function GeneratePassword($length = 10, $complex = 4) { $min = "abcdefghijklmnopqrstuvwxyz"; $num = "0123456789"; $maj = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $symb = "!@#$%^&*()_-=+;:,.?"...
by dzcadii
Sun Mar 22, 2015 4:37 pm
Forum: jQuery
Topic: Allow carriage return or new lines in tooltip (jquery)
Replies: 0
Views: 1696

Allow carriage return or new lines in tooltip (jquery)

If you are wanting to have or allow carriage returns (<br />) in a jquery tool tip you can use one of these two: :arrow: *Note: This uses a single "|" to indicate it should replace with "<br />" 1. Single line break: $(function () { $(document).tooltip({ content: function(callback){ callback($(this)...
by dzcadii
Sat Mar 14, 2015 11:32 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Calculate human readable file size
Replies: 0
Views: 795

Calculate human readable file size

I put this in a class but you can just take it out for its own function <?PHP class FileSystemHelper { public function GetHumanReadableFileSize($bytes, $precision = 2) { $kilobyte = 1024; $megabyte = $kilobyte * 1024; $gigabyte = $megabyte * 1024; $terabyte = $gigabyte * 1024; if (($bytes >= 0) && (...
by dzcadii
Sun Mar 08, 2015 1:19 pm
Forum: Mysql
Topic: Schema and Data export fail :: MySQL Workbench verion 6.2
Replies: 0
Views: 2527

Schema and Data export fail :: MySQL Workbench verion 6.2

If you get the error: "Error Unhandled exception: 'builtin_function_or_method' object has no attribute '__getitem__'" You can work around this by: wb_admin_export.py -- This might be in C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.1.7\modules Copy it to your desktop and edit with a text editor....
by dzcadii
Sat Mar 07, 2015 5:36 pm
Forum: Mysql
Topic: Issues with calculating timestamp difference :: MYSQL
Replies: 0
Views: 756

Issues with calculating timestamp difference :: MYSQL

MYSQL version: 5.5.32 and 5.6.22 If you are using an older version of MYSQL and are trying to calculate; lets say seconds from 2 times. The easiest way I've found is: Issue: data type set as bigint(64) using 2 different versions of MYSQL using version 5.6.22 using CURRENT_TIMESTAMP will work in the ...
by dzcadii
Mon Mar 02, 2015 12:10 am
Forum: Printers
Topic: HP Printer will print but Solution Center will not open
Replies: 0
Views: 1861

HP Printer will print but Solution Center will not open

As of September 2013, If you ever run into a problem where a Hewlett-Packard (HP) printer will print but the Solution center will not open. You can try this solution out. Issue: Printer will still print Solution Center will not open (typically these are installs from the original instillation media ...
by dzcadii
Sun Mar 01, 2015 11:48 pm
Forum: TV
Topic: Vizio Smart TV freezing Netflix/Streaming Services
Replies: 0
Views: 24604

Vizio Smart TV freezing Netflix/Streaming Services

Vizio Smart TV freezing Netflix/Streaming Services Issue: 1. Vizio smart TVs freeze/streaming applications freeze during initialization 2. Holding the "Power" button on the side panel does not reset/turn off the TV. My experience was specifically with the Vizio E552VLE "55” Class LCD HDTV with VIZIO...
by dzcadii
Sun Mar 01, 2015 11:35 pm
Forum: Articles
Topic: PHPBB3 Sessions Integration
Replies: 0
Views: 5077

PHPBB3 Sessions Integration

If you are looking for a way to integrate your user session management (login) on your site with phpbb3 just follow these steps. Article Information: Article ID: 112 Written By: pentapenguin Written On: Mon Oct 08, 2007 12:43 am Description: This article will show you how to integrate phpBB3's sessi...
by dzcadii
Sun Mar 01, 2015 11:34 pm
Forum: Articles
Topic: Leet (1337) and ASCII art
Replies: 0
Views: 1099

Leet (1337) and ASCII art

Here is some interesting reading. Leet (1337) http://en.wikipedia.org/wiki/Leet Leet (or "1337"), also known as eleet or leetspeak, is an alternative alphabet for the English language that is used primarily on the Internet. It uses various combinations of ASCII characters to replace Latinate letters...
by dzcadii
Sun Mar 01, 2015 11:32 pm
Forum: References
Topic: "The Database Journal" Blue Moose Technology, LLC
Replies: 0
Views: 840

"The Database Journal" Blue Moose Technology, LLC

"The Database Journal The Database Journal is a collection of articles, videos, ideas and advice pertaining to the world of databases and database design. In here, you'll find how-to articles, information about database technology, and plenty about relational database design. Whether you're novice, ...
by dzcadii
Sun Mar 01, 2015 11:32 pm
Forum: References
Topic: W3Schools
Replies: 0
Views: 844

W3Schools

"HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript Tutorials References Examples Copyright 1999-2009 by Refsnes Data. All Rights Reserved." "W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user. While using this sit...
by dzcadii
Sun Mar 01, 2015 11:31 pm
Forum: References
Topic: Tools I have run across in my journey ::Software::
Replies: 0
Views: 709

Tools I have run across in my journey ::Software::

Here are some tools I have run across in my journey. Not all are free but it may help you out. I will update this as time permits. http://www.coffeecup.com/ (Trial software and cheap when you buy. Some are basic but that is a +. They have a wide array of items from simple What You See Is What You Ge...
by dzcadii
Sun Mar 01, 2015 11:31 pm
Forum: References
Topic: HotScripts.com
Replies: 0
Views: 912

HotScripts.com

http://www.hotscripts.com/ One of the best places to find any free script of any language! I use some of the scripts to help me learn. "Hot Scripts is the net's largest PHP, CGI, Perl, JavaScript and ASP script collection and resource web portal. We are an Internet directory that compiles and distri...
by dzcadii
Sun Mar 01, 2015 11:31 pm
Forum: References
Topic: phpfreaks.com
Replies: 0
Views: 831

phpfreaks.com

http://www.phpfreaks.com/ PHP Freaks is a website dedicated to learning and teaching PHP. Here you will find a forum consisting of 102,739 members who have posted a total of 1,148,693 posts on the forums. Additionally, we have tutorials covering various aspects of PHP and you will find news syndicat...
by dzcadii
Sun Mar 01, 2015 11:30 pm
Forum: References
Topic: Countries of the world flags
Replies: 0
Views: 816

Countries of the world flags

Here is a great site I found for flags of countries in the world if you are into a project like this. Free country world flags. Download packs of country flags in different styles and sizes for free. Search for specific country flags. Download snippets for country dropdown lists. All the countries o...
by dzcadii
Sun Mar 01, 2015 11:30 pm
Forum: References
Topic: Javascript Tree view (recursive directory listing)
Replies: 0
Views: 1096

Javascript Tree view (recursive directory listing)

Javascript Tree view (recursive directory listing)

by: TreeView (GuguSoft http://www.gubusoft.com/ )
http://www.treeview.net/


They have plenty of support for their product and demos.

All of their scripts can be integrated with other languages.
by dzcadii
Sun Mar 01, 2015 11:29 pm
Forum: References
Topic: PHP references
Replies: 0
Views: 949

PHP references

Here are some links for PHP references. Please check out the links included for up to date information. PHP Official Site http://us.php.net/ Function Reference http://us.php.net/manual/en/funcref.php Download documentation (you can download the manual for offline use. Comes in very handy for on the ...
by dzcadii
Sun Mar 01, 2015 11:19 pm
Forum: General server configurations and file systems
Topic: Robots.txt
Replies: 0
Views: 4227

Robots.txt

Simple robots.txt example * means all browsers Disallow tells the robots where they can not go (should not index it) All tells the robots where they can go (will index it) To allow complete access to your site/server User-agent: * Disallow: To disallow all robots from the server User-agent: * Disall...
by dzcadii
Sun Mar 01, 2015 11:18 pm
Forum: General server configurations and file systems
Topic: Apache/MySQL/PHP on Windows
Replies: 0
Views: 807

Apache/MySQL/PHP on Windows

Obviously you can simply download WampServer from http://www.wampserver.com/en/ and follow their directions. This article is for downloading and installing each piece then getting it all to work together. More to come, but for right now here is some information on this topic: Setting up Apache, PHP,...
by dzcadii
Sun Mar 01, 2015 11:16 pm
Forum: SQL
Topic: Find string in every DB of an instance
Replies: 0
Views: 952

Find string in every DB of an instance

Here is a way to find a string value in every database in an instance. This returns: DatabaseName, Column, Value Use this to create a stored procedure in the database -- uncomment the following line to create the sproc --CREATE PROC FindStringInDb --uncomment the following line to edit the sproc --A...
by dzcadii
Sun Mar 01, 2015 11:14 pm
Forum: Mysql
Topic: MYSQL Database and Table Alterations
Replies: 0
Views: 995

MYSQL Database and Table Alterations

Here is a quick list of SQL lines for editing/altering your tables and database: **Note** "table_name" would be the name of your table in the database. I do caution you to shutdown access to the database server if it is supporting a production site or has allot of traffic. My opinion about the two t...
by dzcadii
Sun Mar 01, 2015 11:01 pm
Forum: JavaScript
Topic: Display current Date in JavaScript
Replies: 0
Views: 930

Display current Date in JavaScript

place this in the <head> tag of the html document <html><head> <title>Just the date</title> <script language="JavaScript" type="text/javascript"> //--------------- LOCALIZEABLE GLOBALS --------------- var d=new Date(); var monthname=new Array("January","February","March","April","May","June","July",...
by dzcadii
Sun Mar 01, 2015 11:00 pm
Forum: JavaScript
Topic: onmouseover to open a new window for <a>
Replies: 0
Views: 733

onmouseover to open a new window for <a>

<html><head> <script type="text/javascript"> function my_fun(my_win){ my_win = my_win; //Below you can add the additional parameters for the window.open() see reference list window.open(my_win); } </script> </head> <body> <a href="" onmouseover="my_fun('http://dzsoundnirvana.com/')">Open my window<...
by dzcadii
Sun Mar 01, 2015 11:00 pm
Forum: JavaScript
Topic: JavaScript Function, Passing arguments
Replies: 0
Views: 706

JavaScript Function, Passing arguments

Need to use <a href="">Something</a> and let JavaScript handle it? Say you want to open new window and display certain content based on query arguments. Here is a simple "How to" <!-- HTML page index.html --> <html><head><title>Something</title> <script language="JavaScript" type="text/javascript"> ...
by dzcadii
Sun Mar 01, 2015 11:00 pm
Forum: JavaScript
Topic: JavaScript Count down timer
Replies: 0
Views: 1410

JavaScript Count down timer

Simple JavaScript count down timer display() calls the function <script language="javascript"> <!-- // var milisec=0 var seconds="60"//Change to how many seconds to count down document.counter.d2.value="30" function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 secon...
by dzcadii
Sun Mar 01, 2015 10:59 pm
Forum: JavaScript
Topic: JavaScript prompt(), confirm(), alert()
Replies: 0
Views: 705

JavaScript prompt(), confirm(), alert()

JavaScript prompt(), confirm(), alert() functions **Note** To add a newline feed in a JavaScript popup use \n //Prompt var say_yes = prompt("::ATTENTION::\nThis is a prompt! To separate lines use the \n\n\nSee\n\n\n3\n\n\nand type yes or no === string"); if(say_yes != "yes"){ alert("::ATTENTION::\n...
by dzcadii
Sun Mar 01, 2015 10:58 pm
Forum: JavaScript
Topic: JavaScript screen resolution
Replies: 0
Views: 909

JavaScript screen resolution

Find the screen resolution with JavaScript <script language="JavaScript"> function resolution(){ var wid = screen.width; var hei = screen.height; alert('Your screen resolution is '+wid+'x'+hei); } </script> <a href="javascript:resolution();">Click here to action the function to find your resolution...
by dzcadii
Sun Mar 01, 2015 10:58 pm
Forum: JavaScript
Topic: JavaScript go back/forward hyperlink
Replies: 0
Views: 702

JavaScript go back/forward hyperlink

history.go(-1);

Code: Select all

<a href=javascript:history.go(-1)><font color=red size=-2>(Go Back)</font></a>
history.go(+1);

Code: Select all

<a href=javascript:history.go(+1)><font color=red size=-2>(Go Forward)</font></a>
by dzcadii
Sun Mar 01, 2015 10:57 pm
Forum: JavaScript
Topic: Validate Email address
Replies: 0
Views: 677

Validate Email address

Simple way to validate an email address! You still have to validate on the server side! This will only alert the user of invalid input. Email address patterns accepted:(.com,.net,.edu.,.mil,.gov, etc) someone@something.com some.one@something.com. some.one.too@something.com. someone@some.thing.com so...
by dzcadii
Sun Mar 01, 2015 10:57 pm
Forum: JavaScript
Topic: Call JavaScript function from <a href>
Replies: 0
Views: 680

Call JavaScript function from <a href>

Tired of using onclick, onmouseover, etc. to call a JavaScript function? <!-- ************* file name: js.js *****************--> function from_ahr(){ var my_alert = alert("Hello, you clicked the link"); } <!--****************** file name: index.html *******************--> <html> <head> <script lang...
by dzcadii
Sun Mar 01, 2015 10:55 pm
Forum: Batch file (.bat) and Windows PowerShell
Topic: Log directory structure to output file Batch file (.bat)
Replies: 0
Views: 1816

Log directory structure to output file Batch file (.bat)

Simple way to iterate through a directory structure and log the output. Options: Files only Directories only Directories and files *Note: Place this file in the root of where you want the scanning to begin Deliminator is "::.::" Save file as yourfilename.bat (just make sure the extension is " .bat "...
by dzcadii
Sun Mar 01, 2015 10:53 pm
Forum: C# (C Sharp)
Topic: How to use Stopwatch Calculate Program Execution time in C#
Replies: 0
Views: 1100

How to use Stopwatch Calculate Program Execution time in C#

Here is a little snippet of code if you need to calculate program execution time in C#. //Use these namespaces using System; using System.Diagnostics; using System.Threading; //Place this where you want to start the stopwatch Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); //Place this whe...
by dzcadii
Sun Mar 01, 2015 10:52 pm
Forum: C# (C Sharp)
Topic: Calculate the MD5 of a file while reading from a text file
Replies: 0
Views: 719

Calculate the MD5 of a file while reading from a text file

//Use these namespaces using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Security.Cryptography; //Counter for found files int i = 0; //Loop through the dir and read the files using (var writer = new StreamWriter(logfile)) { //Runs through all directori...
by dzcadii
Sun Mar 01, 2015 10:52 pm
Forum: C# (C Sharp)
Topic: Duplicate file finder (logging only)
Replies: 0
Views: 891

Duplicate file finder (logging only)

I've been searching the internet for a program or script that would find duplicate files on my servers. I had no luck (minus a few) so I came up with this simple console application in C#. Like I said this is a simple program and use it at your own risk. It does not move, rename, or delete files. It...
by dzcadii
Sun Mar 01, 2015 10:51 pm
Forum: C# (C Sharp)
Topic: Send mail using Godaddy C#
Replies: 0
Views: 755

Send mail using Godaddy C#

try { MailMessage message = new MailMessage(); message.To.Add("email@adress.com"); message.Subject = "Mail test from local machine"; message.From = new System.Net.Mail.MailAddress("your@emailaddress.com"); message.Body = "Did it send?"; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtpout.secur...
by dzcadii
Sun Mar 01, 2015 10:51 pm
Forum: C# (C Sharp)
Topic: Simple Encrypt/Decrypt C#
Replies: 0
Views: 726

Simple Encrypt/Decrypt C#

static readonly string PasswordHash = "P@@Sw0rd"; static readonly string SaltKey = "S@LT&KEY"; static readonly string VIKey = "@1B2c3D4e5F6g7H8"; for encrypt public static string Encrypt(string plainText) { byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); byte[] keyBytes = new Rfc2898Deri...
by dzcadii
Sun Mar 01, 2015 10:50 pm
Forum: C# (C Sharp)
Topic: "Restart" a console application
Replies: 0
Views: 2080

"Restart" a console application

Here is a simple way to restart a console application. I'm sure there a better ways but this opens another instance of the allication and kills the current running process. Namespace used: using System.Reflection; //Restart the app for another scan if not kill it static void ResetMe(string resOption...
by dzcadii
Sun Mar 01, 2015 10:50 pm
Forum: C# (C Sharp)
Topic: Calculate file size to human readable format
Replies: 0
Views: 697

Calculate file size to human readable format

All you have to do is call the method and pass in a long :: returns a string //Get human readable total file size #region humanreadfsize public string GetBytesReadable(long i) { string sign = (i < 0 ? "-" : ""); double readable = (i < 0 ? -i : i); string suffix; if (i >= 0x1000000000000000) // Exaby...
by dzcadii
Sun Mar 01, 2015 10:50 pm
Forum: C# (C Sharp)
Topic: Check if file is locked or has a handle on it
Replies: 0
Views: 798

Check if file is locked or has a handle on it

//Check if file is locked #region isfilelocked public virtual bool IsFileLocked(FileInfo file) { FileStream stream = null; try { stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); } catch (IOException) { //the file is unavailable because it is: //still being written to //or be...
by dzcadii
Sun Mar 01, 2015 10:49 pm
Forum: C# (C Sharp)
Topic: Prepared List, Dictionaries, and Arrays C#
Replies: 0
Views: 1061

Prepared List, Dictionaries, and Arrays C#

Here are a few List<type>, Dictionary<type, type>, and Array[] to help you out. Not all of them are complete. These are for reference only ( This post will change often as I build them ): :sad-bored: List<string> URIScheme public static List<string> URIScheme() { List<string> uriSchemeItem = new Lis...
by dzcadii
Sun Mar 01, 2015 10:48 pm
Forum: C# (C Sharp)
Topic: Fun countdown timer C#
Replies: 0
Views: 1155

Fun countdown timer C#

This is for fun! Source: http://stackoverflow.com/a/24232554 *Note: Change the namespace for your needs Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Timers; namespace Helpers.TimeDate { public class FunTimerHelper { static Timer timer = new...
by dzcadii
Sun Mar 01, 2015 10:48 pm
Forum: C# (C Sharp)
Topic: Quick check if int was submitted
Replies: 0
Views: 729

Quick check if int was submitted

This is just a quick way to check if an int was submitted I use this to quickly check for an int from a Console.ReadLine() input when I need an int public static bool CheckForIntInput(string input) { bool isInt = false; int isIntValue; if (int.TryParse(input, out isIntValue)) { isInt = true; } else ...
by dzcadii
Sun Mar 01, 2015 10:47 pm
Forum: C# (C Sharp)
Topic: return the file extension of a file using strings only
Replies: 0
Views: 867

return the file extension of a file using strings only

If you find yourself in a situation where you have to use string(s) and cannot use the Path class: public static string GetFileExtension(string fileName) { string ext = string.Empty; int fileExtPos = fileName.LastIndexOf(".", StringComparison.Ordinal); if (fileExtPos >= 0) ext = fileName.Substring(f...
by dzcadii
Sun Mar 01, 2015 10:47 pm
Forum: C# (C Sharp)
Topic: Dynamic table
Replies: 0
Views: 734

Dynamic table

<% // create a string type variable to generate dynamic table string dynTable = ""; // start with table tag with following attributes dynTable = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; // outer loop to generate table rows for (int tRows = 0; tRows < 10; tRows++) { //start table ...
by dzcadii
Sun Mar 01, 2015 6:42 pm
Forum: MVC (Model–view–controller)
Topic: Access a variable in a View created in a Controller
Replies: 0
Views: 867

Access a variable in a View created in a Controller

:idea: Access a variable in a View created in a Controller: In your controller: public ActionResult Index() { List<string> colors = new List<string>(); colors.Add("red"); colors.Add("green"); colors.Add("blue"); ViewBag.ListColors = colors; //colors is List ViewBag.DateNow = DateTime.Now; ViewBag.Na...
by dzcadii
Sun Mar 01, 2015 6:40 pm
Forum: PHP (Hypertext Preprocessor)
Topic: foreach / Array Loops Filling from $_GET or $_POST
Replies: 0
Views: 714

foreach / Array Loops Filling from $_GET or $_POST

/********************************************************************************************************************************** This way you can work out of the GLOBAL scope. This will allow you to add anything to the array and use ****************************************************************...
by dzcadii
Sun Mar 01, 2015 6:40 pm
Forum: PHP (Hypertext Preprocessor)
Topic: PHP Switch/else if/ternary operator
Replies: 0
Views: 746

PHP Switch/else if/ternary operator

Here is a simple Switch in PHP. If you are tired of: if(){}else{}elseif(){} <? $MyName=$_GET['MyName']; if($MyName==""){ echo "Blank"; } elseif($MyName=="Something"){ echo $MyName; } else{ echo "Please give me a name"; } ?> switch(){case:} switch($MyName){ case $MyName=="": echo "Blank"; //break wil...
by dzcadii
Sun Mar 01, 2015 6:39 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Re: Simple Class PHP
Replies: 0
Views: 740

Re: Simple Class PHP

<? class SimpleClass{ //constructor because it has the same name as the class function SimpleClass(){ //Calling the function SayIt through the constructor $this->SayIt(); } function SayIt(){ echo "It"; } } //this is how you call a class when you need to use it $MyNewClass=new SimpleClass(); ?> //To...
by dzcadii
Sun Mar 01, 2015 6:39 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Send Email PHP ::Class::
Replies: 0
Views: 1988

Send Email PHP ::Class::

<? /*********************** CLASS :: MYMail ************************/ class MyMail{ var $To; var $ToSender;//If you want the email to go to the sender var $Subject; var $Msg; var $Headers; var $From; var $ReplyTo; /* $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.c...
by dzcadii
Sun Mar 01, 2015 6:38 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Auto head "<head></head>". PHP & MYSQL
Replies: 0
Views: 823

Auto head "<head></head>". PHP & MYSQL

Ok, so you are tired of typing in the <head> information and you are using PHP and MYSQL. You can try this out. You can even set it for spiders (allow them to crawl or not). Code view: (tired of typing) <html> <head> <meta name="description" content="I am a description and we can go on forever with ...
by dzcadii
Sun Mar 01, 2015 6:37 pm
Forum: PHP (Hypertext Preprocessor)
Topic: $_SEVER['REQUEST_METHOD']. Put it all into an arry. Auto.
Replies: 0
Views: 1015

$_SEVER['REQUEST_METHOD']. Put it all into an arry. Auto.

/**************************************************************************** This is copyright code released under GNU GENERAL PUBLIC LICENSE, GNU LESSER GENERAL PUBLIC LICENSE Copyright (C) 20008, DzSoundNirvana.com :: http://dzsoundnirvana.com/ :: email support@dzsoundnirvana.com see http://bb.dz...
by dzcadii
Sun Mar 01, 2015 6:37 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Browser type and OS of Server ::CLASS:
Replies: 0
Views: 664

Browser type and OS of Server ::CLASS:

Need to find out what browser is hitting your page? Here is a simple class in PHP for that The OS portion will tell you what OS the server is on. Use this for development servers if you use different variables for each like ::Localhost:: instead of dzsoundnirvana.com **Update** Ok, I have changed th...
by dzcadii
Sun Mar 01, 2015 6:36 pm
Forum: PHP (Hypertext Preprocessor)
Topic: PHP hashing generator
Replies: 0
Views: 779

PHP hashing generator

Some of the hashing methods are: md5() sha1() rand() uniqid() Simply select the required options and see your results You can see a demonstration at http://jobs.dzsoundnirvana.com/m5/ Here is the code if you want to use it locally: <? echo "<html><head><title>DzSoundNirvana.com's Hashing</title></he...
by dzcadii
Sun Mar 01, 2015 6:35 pm
Forum: PHP (Hypertext Preprocessor)
Topic: $_COOKIE (s)
Replies: 0
Views: 739

$_COOKIE (s)

Simple way to set a $_COOKIE in php <? //Must be called before any output to the browser or white space //Note that the $_COOKIE information will be available on the next page (reload) //setcookie(Cookie name, value(s) held in the cookie, time the cookie will be alive for); $value = "This is the in...
by dzcadii
Sun Mar 01, 2015 6:35 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Timer: Time page load time php ::Class::
Replies: 0
Views: 961

Timer: Time page load time php ::Class::

Things to do 1st: Create a new file for the class <? /***************************** timer.class.php *****************************/ class timer{ function timer_start(){ //Start time $time = microtime(); $time = explode(" ", $time); $time = $time['1'] + $time['0']; $this->start = $time; } //End Time. ...
by dzcadii
Sun Mar 01, 2015 6:33 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Basic word filter/replace words ::Class::
Replies: 0
Views: 726

Basic word filter/replace words ::Class::

Here is a simple script that will replace any defined words in a database. This script reads the input, checks the database for that word and replaces it with the instructed replacement. Database set up: Database table name wordfilter id int(11) autoincrement primary word varchar(255) replace_with v...
by dzcadii
Sun Mar 01, 2015 6:33 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Calculate file size ::Class::
Replies: 0
Views: 707

Calculate file size ::Class::

Outputs 12B or 20MB <? /********************************** files.class.php **********************************/ class Files{ var $Errors=array(); function Files(){ } function StaticFSize($IVal){ $TFileS=$IVal; $Type=array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"); $Index=0; while($TFileS>=...
by dzcadii
Sun Mar 01, 2015 6:32 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Query a database and return results ::function::
Replies: 0
Views: 681

Query a database and return results ::function::

Simple function that queries a database and returns results <? function get_my_info($passed_var){ //link to your database right here $link=mysql_connect("databasehost","databaseuser","databasepassword"); $sel_db=mysql_select_db("databasetoworkwith"); $query_string = "SELECT * FROM database_table WHE...
by dzcadii
Sun Mar 01, 2015 6:31 pm
Forum: PHP (Hypertext Preprocessor)
Topic: File Upload system :: Reference only
Replies: 0
Views: 744

File Upload system :: Reference only

**This is BETA a revision is on the way. Please use this as a guide and modify as needed!!** Here is a complete solution for uploading files Requirements: PHP MYSQL Write access to directory tree 2 Database tables (files, mime_types)SQL below -- -- Table structure for table `mime_types` -- DROP TAB...
by dzcadii
Sun Mar 01, 2015 6:30 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Show all elements of an array. :: Loops ::
Replies: 0
Views: 711

Show all elements of an array. :: Loops ::

Simple way to display all elements of an array. This array can be from $_GET/$_POST or MYSQL query <? /********************************* From $_GET/$_POST *********************************/ foeach($_GET as $key => $value){ echo $value . "<br>";//You can for mat with HTML right here too } ?> <? /****...
by dzcadii
Sun Mar 01, 2015 6:29 pm
Forum: PHP (Hypertext Preprocessor)
Topic: ereg() - Regular expression match
Replies: 0
Views: 779

ereg() - Regular expression match

Yes i know right from the manual; but simpler! The function is ereg(); Description: int ereg ( string $pattern , string $string [, array &$regs ] ) Searches a string for matches to the regular expression given in pattern in a case-sensitive way. If you want to see ereg(); for JavaScript http://bb.dz...
by dzcadii
Sun Mar 01, 2015 6:29 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Generate random file names File upload
Replies: 0
Views: 804

Generate random file names File upload

Here is a little snippet if you want to generate random file names from move_uploaded_file(); <? // Generate a 32 bit file name with md5(); $File_Name = $_FILES['file_to_upload']['name']; $Ext = substr($File_name,0,strlen($File_Name)-3); $new_file_name = md5($File_Name . time()) . $Ext; ?> <? // Gen...
by dzcadii
Sun Mar 01, 2015 6:28 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Basic mysql queries :: PHP ::
Replies: 0
Views: 700

Basic mysql queries :: PHP ::

Basic mysql queries: My basic table will be: id first_name last_name email_address Insert data into a mysql database with PHP $insert = mysql_query("INSERT INTO table_name (id, first_name, last_name, email_address) VALUES('0','Dz','Sound','support@dzsoundnirvana.com')"); Update data in a mysql datab...
by dzcadii
Sun Mar 01, 2015 6:28 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Common PHP errors
Replies: 0
Views: 696

Common PHP errors

Here are some common errors you may run into. When trying to upload a large file nothing is uploaded and the browser seems to "refresh" without any error generation. Solution (set the following two directives in the php.ini): post_max_size upload_max_filesize This is assuming you have access to the ...
by dzcadii
Sun Mar 01, 2015 6:27 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Complete web crawler/spider (PHP)
Replies: 0
Views: 846

Complete web crawler/spider (PHP)

:!: Here is an awesome web crawler/spider package written in PHP. Really easy to configure and you can do just about anything you want with it. It is GNU so give credit to Uwe Hunfeld, phpcrawl | at | cuab.de http://phpcrawl.cuab.de/

http://phpcrawl.cuab.de/
http://phpcrawl.cuab.de/download.html
by dzcadii
Sun Mar 01, 2015 6:26 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Show files in a directory
Replies: 0
Views: 778

Show files in a directory

Easy way to show files in a directory: <? if ($handle = opendir('.')) { echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "<tr><td>$file</td></tr><tr><td><a href=\"$file\" target=\"_blank\"><img...
by dzcadii
Sun Mar 01, 2015 6:26 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Recursive Directory Listing (Show full directory structure)
Replies: 0
Views: 661

Recursive Directory Listing (Show full directory structure)

<?php function getDirectory( $path = '.', $level = 0 ){ $ignore = array( 'cgi-bin', '.', '..' ); // Directories to ignore when listing output. Many hosts // will deny PHP access to the cgi-bin. $dh = @opendir( $path ); // Open the directory to the handle $dh while( false !== ( $file = readdir( $dh ...
by dzcadii
Sun Mar 01, 2015 6:25 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Generate <select> from MYSQL with PHP "USA States Drop Down"
Replies: 0
Views: 927

Generate <select> from MYSQL with PHP "USA States Drop Down"

Simple way to generate a drop down (<select>) from MYSQL using PHP. In this example I am grabbing State. This way I wouldn't have to sit there and type all of them out every time I needed them. //This is how I have the Database table set up. You will have to customize your connection settings. //Sim...
by dzcadii
Sun Mar 01, 2015 6:23 pm
Forum: HTML (HyperText Markup Language)
Topic: Favorite icon (favicon.ico)
Replies: 0
Views: 896

Favorite icon (favicon.ico)

Favorite icon (favicon.ico) If you want a favorites icon or favicon here are the simple steps for it Create your image go here http://htmlkit.com/services/favicon/ upload your file (follow the instructions on the site) look to the right and add the following code before the </head> :arrow: <link re...
by dzcadii
Sun Mar 01, 2015 6:23 pm
Forum: HTML (HyperText Markup Language)
Topic: Collecting info HTML/JavaScript
Replies: 0
Views: 729

Collecting info HTML/JavaScript

Here is a simple way to collect information from a link (<a href></a>). This example could be used in changing a users email address: **Note: There is no error checking in this example <!-- File name would be index.html --> <html> <head> <title>Change My Email</title> <script language="javascript"> ...
by dzcadii
Sun Mar 01, 2015 6:21 pm
Forum: PHP (Hypertext Preprocessor)
Topic: Basic Comment form with HTML & PHP
Replies: 0
Views: 771

Basic Comment form with HTML & PHP

There are allot of people trying to use "comment forms" with HTML alone. You will not get anything accomplished. HTML is static. So, I chose to back it with a server side language such as PHP. In this tutorial I will use a combination of: HTML PHP MYSQL This is a simple comment script that will take...
by dzcadii
Sun Mar 01, 2015 6:18 pm
Forum: Prefabricated/Populated database quires
Topic: Time Zones (SQL) w/ examples
Replies: 0
Views: 1847

Time Zones (SQL) w/ examples

{TEXT1} Time Zones SQL Simply copy that into a file and name it what ever you want. Make sure you put ".sql" as the extension. -- Table structure for table `time_zones` -- CREATE TABLE IF NOT EXISTS `time_zones` ( `id` int(11) NOT NULL AUTO_INCREMENT, `GMT_Offset_Name` varchar(100) NOT NULL, `GMT_O...
by dzcadii
Sun Mar 01, 2015 6:11 pm
Forum: Prefabricated/Populated database quires
Topic: Countries MSSQL
Replies: 0
Views: 663

Countries MSSQL

/****** Object: Table [dbo].[tbl_Countries] Script Date: 07/26/2013 12:02:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_Countries]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[t...
by dzcadii
Sun Mar 01, 2015 6:10 pm
Forum: Prefabricated/Populated database quires
Topic: U.S States MSSQL
Replies: 0
Views: 717

U.S States MSSQL

/****** Object: Table [dbo].[tbl_States] Script Date: 07/26/2013 12:02:33 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_States]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tbl_Sta...
by dzcadii
Sun Mar 01, 2015 6:05 pm
Forum: Prefabricated/Populated database quires
Topic: Extensions and Mime type :: MSSQL
Replies: 0
Views: 1044

Extensions and Mime type :: MSSQL

This is still a working project but I'm willing to share what I have. **This comes as is! I will be updating this post and eventually get around to posting the full script in one file for SQL and MySQL. USE [YourDatabaseNameGoesHere] GO /****** Object: Table [dbo].[ExtMimeTypes] Script Date: 03/10/2...
by dzcadii
Sun Mar 01, 2015 5:39 pm
Forum: Technical news
Topic: Java 7 SE End of Life (EOL)
Replies: 0
Views: 1815

Java 7 SE End of Life (EOL)

Start preparing to move to Java 8 if you are using Java 7. If not you will have to buy into their support. EOL note EOL Timeline SE support program Examples of some key product dates for Oracle Java SE product offerings include: Oracle Java SE Support Roadmap* Major Release GA Date Premier Support U...
by dzcadii
Sun Mar 01, 2015 4:28 pm
Forum: DzSoundNirvana.com's TOS
Topic: COPPA - Children's Online Privacy Protection Act
Replies: 0
Views: 2937

COPPA - Children's Online Privacy Protection Act

COPPA - Children's Online Privacy Protection Act http://www.coppa.org/coppa.htm TITLE XIII-CHILDREN'S ONLINE PRIVACY PROTECTION SEC. 1301. SHORT TITLE. This title may be cited as the "Children's Online Privacy Protection Act of 1998". SEC. 1302. DEFINITIONS. In this title: (1) CHILD.—The term "chil...
by dzcadii
Sun Mar 01, 2015 4:27 pm
Forum: DzSoundNirvana.com's TOS
Topic: Copyright information
Replies: 0
Views: 1153

Copyright information

Here are the 3 main copyright licensees GNU GENERAL PUBLIC LICENSE GNU Free Documentation License GNU LESSER GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verb...
by dzcadii
Sun Mar 01, 2015 4:16 pm
Forum: DzSoundNirvana.com's TOS
Topic: DzSoundNirvana.com's Terms Of Service
Replies: 0
Views: 1649

DzSoundNirvana.com's Terms Of Service

DzSoundNirvana.com's Terms Of Service DzSoundNirvana.com's Terms of Service Agreement (TOSA) and Copyright (C) notification Version 1, November 2007 Copyright (C) 2007, DzSoundNirvana.com email support@dzsoundnirvana.com You are not permitted to copy or distribute this TOSA without the explicit wri...