riahc3 50 Â Team Colleague

BTW, if someone wants the source code, Ill put it up as well with some comments :) although its very sloppy :P

riahc3 50 Â Team Colleague

OK, im not sure if there is going to be excitement by this but: First C# app using the API.

Note this is a quick 10 minute job. No error checking, no nothing. Completely alpha. Just a point of concept showing compatibility between the API and C#

Simply introduce a members name and it will print out his post number.

Since the DaniWeb team wont fix the Firefox bug where I cannot see the file dialog box, Ill upload this to Mega.

https://mega.co.nz/#!5JBAhIiD!SogpRGEczT7rKuZkprVG-xWEvehOir_e0x_3wLwvjcw

Simply, extract the folder anywhere and run the exe.

riahc3 50 Â Team Colleague

Ive actually got something small working as a desktop client :) Posting in a bit...

riahc3 50 Â Team Colleague

Hello

Im trying to make a small program but when I get the .EXE from the Debug or/and the Release folder it complains about a DLL missing (RestSharp) which is avaliable in those folders if I move it to (for example) C:/ How can I "embed" the DLL into the EXE? Standalone program.

Thanks

riahc3 50 Â Team Colleague

For the C# users in this thread, all you need to do is use RestSharp. It will handle the API rather nicely. Here is some sample code to use the WhoAmI method:

var accessToken = "use the documentation to learn how to get this";

Mind setting a example on how to aquire the accesstoken in C#?

riahc3 50 Â Team Colleague

Have you recently added any new extensions, or adjusted them?

Nope. Like I said, happens on all browsers and all hosts.

Could you try with another browser? This would help the process of elimination as to whether the issue lies with the browser, firewall, router, or some other cause.

All browsers on all hosts.

Can you temporarily disable your Firewall and AV?

No client FW or/and AV. I went ahead and disabled the router's one as well and still nothing.

Can you temporarily change your DNS server to Googles? That would be 8.8.8.8; 8.8.4.4 (OpenDNS is an excellent free service you may want to try, and it's fast. But you would need to sign up for it)

Same thing. Tried this and nothing.

The odd thing is that it happens only on that site. Every other one works perfectly....

riahc3 50 Â Team Colleague

Remove the static host entry you just added.

Can't. Only way it works.

Try it from another browser.

Same result

If you ping the address from CLI, does it resolve to an IP? Is it the correct ip (match it with a ping from a working host).

Can't ping it from CLI either. Only works by adding that static host entry.

riahc3 50 Â Team Colleague

Yes, I said it ... we'll have write functionality.

YES! :D

Expect a desktop client from me soon :P

riahc3 50 Â Team Colleague

I can certainly see the benefit of software that lets you post on your own terms (if you don't like the DaniWeb editor, for example)

You caught me quick :P

But yes, I understand the security issues a writing ability would cause...

riahc3 50 Â Team Colleague

Autosolved.

riahc3 50 Â Team Colleague

Not sure what you mean, but if you are adding anonymous functions, you can't remove them (apparently).

Disabling may work, depending on the event I guess.

I have this:

handleCanvasMouseDown: function(e){
      this.drawManager.unSelectAllPointsOfTheDrawingThatHasPoints(); 
    },

handling the mouse event on a canvas. A simple if

if it is checked
return false
else if it is not checked
this.drawManager.unSelectAllPointsOfTheDrawingThatHasPoints();

Does not work. It stil continues. And yes, it goes into the checked because a alert does show up.

riahc3 50 Â Team Colleague

canvas.removeEventListener should work, but only with named functions.

OK and then how do I had it back?

I just had a thought: Would disabling canvas be enough?

riahc3 50 Â Team Colleague

I have a listener on canvas for whenever I click on it. At certain moments (like when a checkbox is checked) I want to disable that listener and make clicking on it do nothing. How do I do this?

jQuery is allowed.

riahc3 50 Â Team Colleague

I'm using noconflict as below

Personally I do not use the noconflict function like that and I too use Prototype and jQuery.....

I declare, in a totally diferent .js file:

$j = jQuery.noConflict();

Meaning that when ever I want to use a jQuery thing in another library/function/etc, I call $j. Example:

var somevariable = $j("#somecomboboxid").val();
riahc3 50 Â Team Colleague

Is not a bandwidth (speed) problem, is a traffic (volume) one.

Imagine an scenario: 1 web server, 100.000.000 pages accessed each day. If you put some proxies in the middle, all the static parts will flow only from the server once, then from the proxies, while the dynamic part flow always from the server.

This helps to diminish not only the traffic but the server work.

Hope this helps.

Did not think of the server workload.

riahc3 50 Â Team Colleague

No problem AFAIK.

I mean I can check standard things but that pretty much is a give in.

I have no problems accessing other sites.

I cant understand reach the site from any other host on my network. On other networks, (My PC thru Teamviewer for example) I can. I modified the hosts file local on my pc assigning the IP to the address and it works but since I am doing that, it cant find/load the CSS/images so it looks horrible.

riahc3 50 Â Team Colleague

My suggestion:

<?php 
$showmonth=(int)$_POST['showmonth'];
$showyear=(int)$_POST['showyear'];
$showmonth=preg_replace('#[^0-9]#i','',$showmonth);
$showyear=preg_replace('#[^0-9]#i','',$showyear);

$day_count=cal_days_in_month(CAL_GREGORIAN,$showmonth,$showyear);
$pre_days=date('w',mktime(0,0,0,$showmonth,1,$showyear));
$post_days=(6-(date('w',mktime(0,0,0,$showmonth,$day_count,$showyear))));

When you POST something, PHP thinks always it is a string. So you are mixing numbers with strings and that in any program language is always a bad idea.

riahc3 50 Â Team Colleague

Solved?

riahc3 50 Â Team Colleague

Another thing, I you sure it is a jQuery and not a plugin coding problem?

Looking at the source:

<div id="rotate" class="mc-cycle" style="visibility: visible; position: relative; width: 821px; height: 578px; overflow: hidden;">
<div class="mc-image mc-image-n0" style="height: 578px; width: 821px; position: absolute; top: 614px; left: 0px; display: none; z-index: 41; opacity: 1;">
<img src="http://www.aaronvanderzwan.com/maximage/2.0/lib/images/demo/coalesse.jpg" style="height: 616px; width: 821px; margin-left: 0px; margin-top: -109px;">
</div>
<div class="mc-image mc-image-n1" style="position: absolute; top: 614px; left: 0px; display: none; z-index: 41; width: 821px; height: 578px; opacity: 1;">
<div class="mc-image mc-image-n2" style="position: absolute; top: 614px; left: 0px; display: none; z-index: 41; width: 821px; height: 578px; opacity: 1;">
<img src="http://www.aaronvanderzwan.com/maximage/2.0/lib/images/demo/laughing.jpg" style="height: 616px; width: 821px; margin-left: 0px; margin-top: -109px;">
</div>
<div class="mc-image mc-image-n3" style="position: absolute; top: 614px; left: 0px; display: none; z-index: 41; width: 821px; height: 578px; opacity: 1;">
<div class="mc-image mc-image-neach" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div class="mc-image mc-image-neachSlice" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div class="mc-image mc-image-nall" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div class="mc-image mc-image-nany" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div class="mc-image mc-image-ncollect" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div class="mc-image mc-image-ndetect" style="position: absolute; top: 578px; left: 0px; display: none; z-index: 41; width: 364px; height: 313px; opacity: 1;">undefined</div>
<div …
riahc3 50 Â Team Colleague

OK, several things pop into mind

1: Does FireBug throw any errors?
2: Are you sure you are using jQuery's noconflict correctly?
3: http://forum.jquery.com/topic/noconflict-does-not-work

Lets see those three points and see if we can see something.

riahc3 50 Â Team Colleague

OK, here is the same code but without the combobox:

var dataStr = "Name: Bob Last: Han Age: 36#Name: George Last: Alan Age: 45#Name: Amy Last: James Age: 36#",
            storage;
            // Split the string using '#' then remove the last empty element in the result
            // Afterwards, go through each results
            storage = (dataStr.split("#")).slice(0,-1).map(
            // Check any name & value pattern then run through
            // each name and value string
                function(str){
                return (str.match(/\w+:([\w ]+)(?![\w+:])/g)).map(
                    // Convert the name and value match to array
                    function(str){
                    return str.match(/[\w]+(?=:)|[\w ]+/g);
                                }) ;
                });

var arrdex = new Array();
var arrdey = new Array();
var arrdet = new Array();
var posx=0;
var posy=0;
var post=0;

for (a=0;a<storage.length;a++)
            {
                for (b=0;b<storage[a].length;b++)
                {
                    for (c=0;c<storage[a][b].length;c++)
                    {
                        if ((b==0) && (c==1)) //name
                        {
                            arrdex[posx]=storage[a][b][c];
                            posx=posx+1;
                        }
                        if ((b==1) && (c==1)) //last name
                        {
                            arrdey[posy]=storage[a][b][c];
                            posy=posy+1;
                        }
                        if ((b==2) && (c==1)) //age
                        {
                            arrdet[post]=storage[a][b][c];
                            post=post+1;
                        }


                    }
                }
            }

I hope that clears it up :)

riahc3 50 Â Team Colleague

Both can be active, but Windows should prioritize the adapter with a faster connection.

UNIX will also always pick the lower (fastest) metric

riahc3 50 Â Team Colleague

Here is a intresting thought though: In now, a modern area, are proxy servers really neccesary (in the scenario you put of pulling a logo)? With all the bandwidth avaliable to most first class countries....I dont see it logical.

I agree in other scenarios though a proxy server is very important and can save a lot of bandwidth.

riahc3 50 Â Team Colleague

Hello

Im trying to reach a website ( http://developer.mozilla.org/ to be exact ) and I cannot reach it. I cannot ping it either. But http://www.downforeveryoneorjustme.com/developer.mozilla.org says that it is up. What is wrong?

riahc3 50 Â Team Colleague

Also, now I cant get the Files dialog box (CTRL+F5, exiting the page).....It may be a time related bug between my previous post and this post...

riahc3 50 Â Team Colleague

Thats why for some people it did appear.

riahc3 50 Â Team Colleague

OK, there is something intresting....

I clicked the Files button and it shows the two dialog boxes. I post this post (this one you are reading right now) and I click Files again and it does not show the two dialog boxes.

Yup, confirmed. Steps to reproduce:

1: Click Files. The two files dialog boxes will appear.
2: Write a post and post it
3: Again click the Files button and it will not appear.

This is the confirmed way to reproduce it.

riahc3 50 Â Team Colleague

Refresh my memory. What's the bug?

On Firefox 18.0.2 running on Windows 7 SP1 32 bit, clicking on the Files option, just shows

Files will automatically be attached to the post upon upload. Optionally, you can embed uploaded images within your post.

Without any dialog boxes to upload a file. Works for me on Chrome and IE9. It may be something you are slightly changing as today it works again but like I said 5 days it worked, 22 hours ago it did not work, and today it seems it works. I always CTRL+F5 my pages, all of this while having my cache always disabled, so it wasnt a cache issue...

riahc3 50 Â Team Colleague

A lot of reading functionability but no writing; Will there function to make our own client for posting threads/posts to Daniweb?

Nice though :)

This is something not seen on most forums.

riahc3 50 Â Team Colleague

Current code:

var dataStr = $j("#people").val(),
            storage;
            // Split the string using '#' then remove the last empty element in the result
            // Afterwards, go through each results
            storage = (dataStr.split("#")).slice(0,-1).map(
            // Check any name & value pattern then run through
            // each name and value string
                function(str){
                return (str.match(/\w+:([\w ]+)(?![\w+:])/g)).map(
                    // Convert the name and value match to array
                    function(str){
                    return str.match(/[\w]+(?=:)|[\w ]+/g);
                                }) ;
                });

var arrdex = new Array();
var arrdey = new Array();
var arrdet = new Array();
var posx=0;
var posy=0;
var post=0;

for (a=0;a<storage.length;a++)
            {
                for (b=0;b<storage[a].length;b++)
                {
                    for (c=0;c<storage[a][b].length;c++)
                    {
                        if ((b==0) && (c==1)) //name
                        {
                            arrdex[posx]=storage[a][b][c];
                            posx=posx+1;
                        }
                        if ((b==1) && (c==1)) //last name
                        {
                            arrdey[posy]=storage[a][b][c];
                            posy=posy+1;
                        }
                        if ((b==2) && (c==1)) //age
                        {
                            arrdet[post]=storage[a][b][c];
                            post=post+1;
                        }


                    }
                }
            }

Works for me.

riahc3 50 Â Team Colleague

Like I said, no objects. I guess Ill have to use gon1387 method.

riahc3 50 Â Team Colleague

The DaniWeb community is all about the public sharing of information. If there is some stuff that you can't post on the Internet because of company secrets, then unfortunately you can't post that.

I actually think it goes against the spirit of our community to post content and then later retract it. Other members took the time and effort to reply with the expectation that the content would exist into the future and be able to help others as well.

Also, keep in mind, once you post something on the Internet, it's "out there". Within minutes of being posted, it's syndicated from RSS feeds, indexed by the search engines, etc. Deleting the content later doesn't necessarily mean that it's deleted from the web.

DaniWeb actually has a hidden behind-the-scenes forum called Area 51 for community regulars. I'll open it up to you, and it might be a good place for you to post some of your more sensitive questions away from the prying eyes of the general community and search engines.

Yes, I thought of indexing by search engines and pages such as webarchive but nonetheless it would be nice. But it is understandable and even if we delete the thread, it would still there.

I was refering to problems that are very VERY specific to a specific project.; Not something like a general question like a AJAX request.

BTW, completely offtopic, but what areas do you offer consulting services for? Theres thing from assembley to robotics to …

riahc3 50 Â Team Colleague

Thank you Dani

riahc3 50 Â Team Colleague

What exactly is "OP Kudos"? I thought it was when you vote up the OP of a thread but that doesnt seem to be the case...

riahc3 50 Â Team Colleague

Anyone have any ideas?

riahc3 50 Â Team Colleague

Sadly, I perfer to understand what I am doing as that code you put will problably work but the problem is that I do not understand it and wish to apply for simple ideas and methods (like standard arrays). I do not understand slice/map concepts and I HATE using anon functions (one of the worst features in JS, IMO)

I think the code I put I can apply it and use it as well to do what I want. Im just not sure what else to put as I have to get (for example) the name until I find a space. Then from where go to the next "Last: ". So I need some help on that :)

Thank you

riahc3 50 Â Team Colleague

Bad news: You broke it again :(

18.0.2 Windows 7

riahc3 50 Â Team Colleague

the Django(Python) code is for the server side

Yes, this is what I meant. Im almost sure that in Django the Python code is server side.

riahc3 50 Â Team Colleague

Django is written in Python which AFAIK only is server side, for web applications (It can be used client side but there is few support on browsers or it does not come out of the box) . Javascript is client side and supported on all browsers out of the box.

riahc3 50 Â Team Colleague

Where Im at so far:

var arrayofnames= new Array();
var arrayoflast= new Array();
var arrayofages= new Array();

/*PEOPLE IS A STRING WITH THE INFORMATION THAT I HAVE MENTIONED*/

for (l=0;l<people.length;l++)
            {
                if(people.indexOf("Name: ",l)!=-1)
                {
                    //???
                }
            }
riahc3 50 Â Team Colleague

No, storing them isnt the problem. The problem is correctly storing them when they are presented as:

Name: Bob Last: Han Age: 36#Name: George Last: Alan Age: 45#Name: Amy Last: James Age: 36#

Sorry if that wasnt clear. I need to get that string and pass it to a array. How do I do that?

riahc3 50 Â Team Colleague

Like I said, I have no intrest in using a object. Does not give me anything that I would need in the future.

I have a string (this string isnt modifiable or anything) in that format and I would need it to be a in a seperate array:

Something like:

array[0]=Name: Bob Last: Jones Age: 36
array[1]=Name: James Last: Brown Age: 29
array[2]=Name: Lloyd Last: Mals Age: 45

And convert it to:

name[0]=Bob
last[0]=Jones
age[0]=36

name[1]=James
last[1]=Brown
age[1]=29

name[2]=Lloyd
last[2]=Mals
age[2]=45

That would fufill the requirements I need.

riahc3 50 Â Team Colleague
riahc3 50 Â Team Colleague

LOL just noticed it was MY thread :P I knew that title sounded familiar.

riahc3 50 Â Team Colleague

Hello

I know threads are problably better just left (even if solved/closed) but I think it would be nice to be able to delete our own threads.

If we post a custom algorthim (for example, this is a exageration) to the meaning of life, we wouldnt like other people to see/copy it BUT we would like people temporarly on perfecting it because of bugs.

Ive found myself at times not being able to post completely code that my tell others how to help me because there are custom things that noone should see because of company secrets.

Its more a privacy thing if anything else.

What do you guys think?

riahc3 50 Â Team Colleague

You could post a link to it :)

riahc3 50 Â Team Colleague

My information is presented as a string in the following format:

"Name: Bob Last: Han Age: 36#"

I want to be able to access each of those traits of the string.

riahc3 50 Â Team Colleague

Hello

I know the title is horribly explained....

I want to store about Bob his name (string), last name (string), and age (integer).

Basically that; Im thinking about a 3 demensional array. Would this be correct? Also I want easy; I dont care if it takes up more memory of if it is slower. By that, I mean that I am not going to make a object just for this.

What is the best way to do this?

riahc3 50 Â Team Colleague

Worked perfectly. Stupid jQuery. Thanks.

riahc3 50 Â Team Colleague

Hello

Im trying to modify something when clicking on a input text field. The id of that field is cart[1223686][qty].

Tried your standard:

$j("#cart[1223686][qty]").click(function() {
alert("Handler for .click() called.");
});

But nothing. What is wrong?

(Yes, $j is correct)