|
no problem.
Next time. Please say more about what you are attempting to achieve.
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
|
|
|
|
|
Thank you for your help on specific issues than you wanted to ask your help. If you have an email address I can reach?
|
|
|
|
|
Sorry but no.
I'm happy to help you through this forum.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Hakan Bulut wrote: str=myFunction(arrNums[i]);
I'd say it is here. You call your function in a recursive way and it executes and executes and executes...
|
|
|
|
|
Is that an accurate statement do you think about this statement? It does not work.
|
|
|
|
|
It is just my best guess.
|
|
|
|
|
Hi All, the most common radio players on websites are Flash based and they work great on desktop or laptop versions of of most websites. This is acceptable for many site owners but for some owners who want to be able to reach listeners on mobile devices it is problematic. Flash based players are not supported by mobile devices. One could say why don't you register your site with such websites as tunein.com or itune so that your listeners can listen to you with their mobile devices. The reasons for that vary from owner to owner. So having said all that, is it possible to create a player with JavaScript that will handle streams? I have created an interface for a radio player as follows but it does not work.
<button onClick="document.getElementById('audio').play();document.getElementByID('audio').volume=1;">Play</button>
<button onClick="document.getElementById('audio').pause()">Pause</button>
Then I tried to use the Source attribute of HTML5 Audio element to hand the radio stream as follows:
<audio id="audio">
<source src="http://Put your hosting company url here:Put your port number here/"/>
</audio>
Unfortunately the HTML5 Audio Element does not handle streams, it only handles files. I would like to create a JavaScript radio player code that I can place on any website to allow listeners on mobile devices to listen to online radio stations of their choice. Please point me in the right direction, thanks in advance.
modified 5-Mar-13 1:15am.
|
|
|
|
|
To the best of my knowledge and in my opinion
Flash is a very mature and stable platform, although others or perhaps now the majority of people will say that's it's a memory and CPU hog, a security risk, etc.
But I write Flash AS3 code, and have created many different applications with it, such as my own You Tube style movie player.
Flash AS3 is pretty neat because it handles movie and audio streams very well, and can buffer streams from a stream server, while showing the progress.
Now take You Tube, they had to write a iphone app and a android app to play there movies on mobile devices, to replace the flash movie player
Since JavaScript runs in the DOM of a browser, I seriously doubt that you can stream audio with it, and buffer the stream if needed, because of the JavaScript architectural. JavaScript runs when a function is called for it, and just completes. It's sort of linear in design. It doesn't wait for events in motion to occur.
Now take a windows application, windows has a message pump, and the pump constantly runs, waiting for messages, and then processes them. Well flash does that as well, but JavaScript doesn't. JavaScript doesn't have the pump mechanism, that goes round and round waiting for events to occur.
I have no alternatives to offer, but you could of just Googled your question.
|
|
|
|
|
Streamed data
Please use a server for streaming.
Adobe server is not freeware.
Adobe Action Script is not compatible every time (non compatibles upgrades and not cheap).
WebM (HTML-5-audio) can be streamed. Ogg-format too.
Security of streaming: Maybe server an folder of audio data must be on same host.
Javacript only client language. WebM-player (streamed WebM too) is a component of html-5-browsers. Flash not.
Player controls in use of JavaScript - yes.
I have a webpage (twseiten.com) - there e.g. client side html-5-player but NOT streamed data.
|
|
|
|
|
how to get currently running application names using JAVA Script.
ex. in client machine they opened MS word, sqlserver,VS2012, notepad etc.
we have to find what all application are running in client machine from server.
is this possible to call task manager by some querry and store the values in cookies and retrive in server side.
Thanks and regards,
Ajit
mail me
ajitbishoyi@yahoo.com
|
|
|
|
|
This information cannot be obtained by browsers because of security considerations. If the browser is allowed to run executable programs on the client system then it could do all sorts of damage. I don't think users would be happy about that.
Use the best guess
|
|
|
|
|
Modern operating systems do there best to create a barrier between the browser and the operating system.
You could probably do it on the server hosting the website, if the OS is like Server 2003, but that's not going to happen on the client side, unless you can get the user to download a program to do that for you.
Javascript and JQuery runs in the DOM, which is supported by the browser, and cannot cross that barrier.
|
|
|
|
|
client and server connections - use JAVA (Oracle), not JavaScript.
|
|
|
|
|
i want to implement a loader to website.
when any user open the website, loader is visible till that time till when whole page is not loaded included image.
this loader will be in js not in jquery.
Regds
Vishal Bansal
|
|
|
|
|
Hi Vishal,
Here's a nice example:
preload_wait.html[^]
It has sample JS code also
Good luck
Cheees,
Edo
|
|
|
|
|
Hi Edo,
Tx alot.
Regds
Vishal Bansal
|
|
|
|
|
div#page_loader {
position: absolute;
top: 0;
bottom: 0%;
left: 0;
right: 0%;
background-color: white;
z-index: 99;
}
<script language="javascript" type="text/javascript">
<a onclick="javascript:document.getElementById('page_loader').style.display='block';" href="webpage.html">Web Page</a>
</script>
|
|
|
|
|
I'm having trouble with Canadians checking out with with my shopping cart, seems because I use US Zip Codes, I don't have the experience needed to use Canadian Postal Codes.
I thought Canadian postal codes were just 6 straight values XXXXXX, and I suspect that many Canadians split the 6 values into pairs of 3 XXX XXX, or perhaps something else.
I'm not really sure why I'm having trouble with them.
Anyways, rather than reinventing the wheel here on this one, thought I would see if there any Canadian Programmers out there using something better than what I'm using
var re_Billing_PostalCode_CA = new RegExp("^[ABCEGHJKLMNPRSTVXY][0-9][A-Z] [0-9][A-Z][0-9]$")
|
|
|
|
|
A quick google for 'canada postal code regex' found this[^]
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I found this, looks like it allows for the space XXX XXX or XXXXXX
and tested it using L4A 0S1 and L4A0S1, but for some reason I always get bit in the rear for not using more test samples.
var re_Billing_PostalCode_CA = new RegExp(/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]( )?\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i);
|
|
|
|
|
It's been awhile since I've worked with JSON, I created and element with child elements called result_Error,
and I can't remember how to parse the child elements within. I did validate the JSON below to be correct
So like result_WarningMessage and result_Error is what I want to parse.
{
"result_StatusCode": 1,
"result_StatusMessage": "Success",
"result_WarningMessage": [
{
"Message": "Ship To Address Classification is changed from Residential to Commercial"
}
],
"result_API_Code": "12",
"result_API_Name": "UPS Three-Day Select®",
"result_Billing_SurCharge_Value": "$0.00",
"result_Billing_SurCharge_Currency": "USD",
"result_Billing_NetCharge_Value": "$8.29",
"result_Billing_NetCharge_Currency": "USD",
"result_Billing_Weight_Value": "01",
"result_Billing_Weight_UnitType": "LBS",
"result_ShipDate": "",
"result_DayOfWeek": "",
"result_DeliveryDate": "",
"result_Error": [
{
"ErrorSeverity": "Hard",
"ErrorCode": "111211",
"ErrorDescription": "The requested accessory option is unavailable between the selected locations."
}
]
}
|
|
|
|
|
If you have it as a string, then parsed = JSON.parse(yourString) will convert it to an Object.
Then you can access the parts you want as parsed.result_WarningMessage and parsed.result_Error , both of which are arrays of Objects:
var message = parsed.result_WarningMessage[0].Message;
var severity = parsed.result_Error[0].ErrorSeverity;
var code = parsed.result_Error[0].ErrorCode;
var description = parsed.result_Error[0].ErrorDescription;
|
|
|
|
|
yeah, I started playing with JSON a while back - and the first time, attempted to do everything the hard way (I was used to a particular XML class that allowed very manual operations) - I eventually, after a lot of effort, got it done, then chucked it away and redid the operation by parsing JSON -> object(s) .. less than 1/3 of my original code
|
|
|
|
|
I just needed more data back this time around, to check for errors, someone got free shipping to Canada this week, and I didn't catch it.
I did parse it, just could not remember how to grab the child elements.
Oh Well, that was a waste of 2 hours.
|
|
|
|
|
I didn't know about the parsed function.
I ended up taking out the square brackets and revalidating the output, and grabbing the result as a non-array.
Just finished the implementation, but I do need to create a true json array in the next project on my to-do list.
Well thanks from brushing the rust off my head, it's been awhile and I completely blanked out on that one.
{
"result_StatusCode": 0,
"result_StatusMessage": "Success",
"result_WarningMessage": {
"Message": "Ship To Address Classification is changed from Residential to Commercial"
},
"result_API_Code": "12",
"result_API_Name": "UPS Three-Day Select®",
"result_Billing_SurCharge_Value": "$0.00",
"result_Billing_SurCharge_Currency": "USD",
"result_Billing_NetCharge_Value": "$8.29",
"result_Billing_NetCharge_Currency": "USD",
"result_Billing_Weight_Value": "01",
"result_Billing_Weight_UnitType": "LBS",
"result_ShipDate": "",
"result_DayOfWeek": "",
"result_DeliveryDate": "",
"result_Error": {
"ErrorSeverity": "Hard",
"ErrorCode": "111211",
"ErrorDescription": "The requested accessory option is unavailable between the selected locations."
}
}
var objB = jQuery.parseJSON(UPS.d);
var result_StatusCode = objB.result_StatusCode;
var result_Message = objB.result_StatusMessage;
var result_WarningMessage = objB.result_WarningMessage;
var result_API_Code = objB.result_API_Code;
var result_API_Name = objB.result_API_Name;
var result_Billing_SurCharge_Value = objB.result_Billing_SurCharge_Value;
var result_Billing_SurCharge_Currency = objB.result_Billing_SurCharge_Currency;
var result_Billing_NetCharge_Value = objB.result_Billing_NetCharge_Value;
var result_Billing_NetCharge_Currency = objB.result_Billing_NetCharge_Currency;
var result_Billing_Weight_Value = objB.result_Billing_Weight_Value;
var result_Billing_Weight_UnitType = objB.result_Billing_Weight_UnitType;
var result_ShipDate = objB.result_ShipDate;
var result_DayOfWeek = objB.result_DayOfWeek;
var result_DeliveryDate = objB.result_DeliveryDate;
if (0 == result_StatusCode) {
var result_Error = objB.result_Error;
var e_Severity = result_Error.ErrorSeverity;
var e_Code = result_Error.ErrorCode;
var e_Description = result_Error.ErrorDescription;
var m_Error_Text = result_API_Name + " -- " + "ERROR";
$('option:selected', '[id*="_ddl_RTSR_SARates_Unified_SelectRate"]').text(m_Error_Text);
$('[id*="_lbl_RTSR_Status"]').text(e_Description);
$('[id*="_lbl_RTSR_OrderInformation_EstimatedRate_Field"]').text("ERROR " + e_Code);
|
|
|
|
|