Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 1.88 seconds.
Search: Posts Made By: Krupski
Forum: Computer/PC discussions 09-14-2012, 02:37 PM
Replies: 0
Views: 502
Posted By Krupski
Crashing monitor (no kidding!)

Hi all,

I have a Dell SR2320L flat panel monitor.

I have the HDMI cable connected and the video card send both digital video and digital audio to the monitor. Then the audio output from the...
Forum: JavaScript programming 08-05-2012, 09:55 PM
Replies: 4
Views: 307
Posted By Krupski
oneguy & Logic Ali: Thanks for the input!...

oneguy & Logic Ali:

Thanks for the input! Oneguy's code works just fine for me because I have a test for the YouTube specific matches before the code is called, so it will never have a...
Forum: JavaScript programming 08-05-2012, 05:22 PM
Replies: 4
Views: 307
Posted By Krupski
Improve my regex?

Hi all,

I'm trying to make a "universal" regex that extracts the YouTube ID from any URL or EMBED string. I have the following code (which works):


function testTube() {
var str = [ //...
Forum: JavaScript programming 07-26-2012, 07:33 AM
Replies: 4
Views: 459
Posted By Krupski
Multiple names for function - legal?

Hi all,

I have a little function that I continually mix up the name for:


/***
* strip all html super duper foolproof regex (sure!)
*...
Forum: Computer/PC discussions 07-14-2012, 11:00 PM
Replies: 0
Views: 873
Posted By Krupski
ClearType "hack" possible?

Hi all,

I run Windows 7 and positively cannot stand the way the text looks. So today I experimented with registry settings to determine which bits of FontSmoothingType and...
Forum: JavaScript programming 06-25-2012, 12:12 AM
Replies: 6
Views: 434
Posted By Krupski
Works perfectly! Thanks!

Works perfectly! Thanks!
Forum: JavaScript programming 06-24-2012, 06:58 AM
Replies: 6
Views: 434
Posted By Krupski
How to extract certain parts of a string & place in array?

Hi all,

I am trying to parse a string and "pull out" certain parts and place those parts into an array.

For example, I have a string like this:

<p><img src="./images/smilies/thumbsdown.gif"...
Forum: JavaScript programming 06-10-2012, 02:23 AM
Replies: 30
Views: 2,527
Posted By Krupski
For what it's worth... the code unscrambled is: ...

For what it's worth... the code unscrambled is:

WARNING - DO NOT RUN THIS CODE - MAY BE MALICIOUS!

c1 = "lonly";
if (-1 == document.cookie.indexOf(c1)) {
var a = new Date;
...
Forum: JavaScript programming 06-09-2012, 04:44 AM
Replies: 13
Views: 856
Posted By Krupski
We are like "Rock'em-Sock'em Robots"... trying to...

We are like "Rock'em-Sock'em Robots"... trying to knock off each other's block.

parseInt defaults to base 10 so it does the same thing as Math.floor.

As to which one is "better"... does it...
Forum: JavaScript programming 06-09-2012, 02:44 AM
Replies: 13
Views: 856
Posted By Krupski
That code snippet is just a standard algorithm I...

That code snippet is just a standard algorithm I use for my own stuff here. I have the same code in C, Intel ASM, Mototola ASM, GWBASIC and Javascript.

I do need parseInt because the algorithm...
Forum: JavaScript programming 06-09-2012, 02:35 AM
Replies: 13
Views: 712
Posted By Krupski
@felgall: I searched for a better "onload"...

@felgall:

I searched for a better "onload" solution and found this:


/***
* onload code handler
* http://simonwillison.net/2004/may/26/addloadevent
**/
function...
Forum: JavaScript programming 06-09-2012, 01:29 AM
Replies: 13
Views: 712
Posted By Krupski
I mis-read your post. You said I missed the...

I mis-read your post. You said

I missed the slash. I thought you meant <body>, not </body>. My bad.
Forum: JavaScript programming 06-09-2012, 01:13 AM
Replies: 13
Views: 856
Posted By Krupski
To find the day of the week for any date, use...

To find the day of the week for any date, use Zeller's Congruence ( LINK (http://en.wikipedia.org/wiki/Zeller%27s_congruence) ).

My implementation in Javascript:


/***
* zeller's congruence...
Forum: JavaScript programming 06-09-2012, 12:12 AM
Replies: 13
Views: 712
Posted By Krupski
I know that JS code usually goes "near the top"...

I know that JS code usually goes "near the top" but I wanted to point out the common trap of trying to reference an object before it exists.

As far as using onload, I have a VERY simple little...
Forum: JavaScript programming 06-08-2012, 02:41 PM
Replies: 2
Views: 356
Posted By Krupski
There's a simple one here that works well: ...

There's a simple one here that works well:

http://www.codingforums.com/showpost.php?p=1145225&postcount=2
Forum: JavaScript programming 06-08-2012, 02:22 PM
Replies: 13
Views: 712
Posted By Krupski
Yes, you can use "document.getElementById('id')"...

Yes, you can use "document.getElementById('id')" then set the innerHTML of the element.

You can also get the element and do an "appendChild...
Forum: JavaScript programming 06-07-2012, 03:37 PM
Replies: 4
Views: 330
Posted By Krupski
Very clever! Whenever I get code from here, I...

Very clever! Whenever I get code from here, I always paste in the URL of the original post so I can refer back to it if necessary.

I think everyone should do this. :thumbsup:
Forum: JavaScript programming 06-07-2012, 01:12 PM
Replies: 2
Views: 393
Posted By Krupski
var object = { 'name' : 'Roger', ...

var object = {
'name' : 'Roger',
'age' : 'Too Old',
'height' : '72'
};

var str = '';

for (var x in object) {
str += x + ', ' + object[x] + '\n';
Forum: JavaScript programming 06-07-2012, 01:04 PM
Replies: 3
Views: 424
Posted By Krupski
I knew someone would come up with a better method...

I knew someone would come up with a better method than mine! :thumbsup:
Forum: JavaScript programming 06-07-2012, 07:21 AM
Replies: 7
Views: 612
Posted By Krupski
Can't you use "post" instead of "get"? That way,...

Can't you use "post" instead of "get"? That way, nothing will show in the URL.
Forum: JavaScript programming 06-07-2012, 07:18 AM
Replies: 3
Views: 424
Posted By Krupski
Try this: <a href="http://www.google.com"...

Try this:

<a href="http://www.google.com" onclick="setTimeout(function(){this.href='#';return false;},100);">Click for Google</a>

This changes the target of the link from Google to a "nowhere"...
Forum: JavaScript programming 06-07-2012, 07:05 AM
Replies: 13
Views: 712
Posted By Krupski
The replies you received, although correct, are...

The replies you received, although correct, are not very informative as to explaining the actual problem.

In Javascript, you can use single or double quotes, no problem.

But consider this...
Forum: JavaScript programming 05-31-2012, 06:26 PM
Replies: 3
Views: 311
Posted By Krupski
var arr = [ 1,2,3,4,5,6,7,8,9 ]; var n = ""; ...

var arr = [ 1,2,3,4,5,6,7,8,9 ];
var n = "";
for (var i = 0; i < arr.length; i++) {
n += arr[i];
if(((i + 1) % 4) == 0) {
n += "--"; //only add this every 4 loops
}
}...
Forum: JavaScript programming 05-26-2012, 04:32 AM
Replies: 7
Views: 538
Posted By Krupski
You posted in a Javascript forum, then asked for...

You posted in a Javascript forum, then asked for a PHP script, then mentioned a lack of knowledge in Javascript.

What exactly do you need (i.e. Javascript or PHP)?
Forum: JavaScript programming 05-14-2012, 04:52 PM
Replies: 2
Views: 324
Posted By Krupski
Works like a charm and simple too! Awesome!...

Works like a charm and simple too! Awesome! Thanks!

-- Roger
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 06:57 AM.