Coffee Script ,backbone - - escape '#' character , instead of reading it as 'this' [closed] - backbone.js

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am trying to save email like example#gmail.com to the model and then save to the server using backbone.
When i am sending normal words like "sdnfkjs" , it is saving correctly and sending model to server.
But when i am sending "example#gmail.com" it is saying "400 Bad Request" with the url like this :->
...test/contact_email/sdf#hjkg.com/tid/2924 400 Bad Request
What should be the reason ?
Thanks

You might want to use with the built in Javascript encoder/decoder :
encodeURIComponent("example#gmail.com") // returns "example%40gmail.com"
decodeURIComponent("example%40gmail.com") // returns "exampl#gmail.com"

Related

Apertura de form en C# [closed]

Closed. This question is not written in English. It is not currently accepting answers.
Stack Overflow is an English-only site. The author must be able to communicate in English to understand and engage with any comments and/or answers their question receives. Don't translate this post for the author; machine translations can be inaccurate, and even human translations can alter the intended meaning of the post.
Closed 9 days ago.
This post was edited and submitted for review 9 days ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Good day people, sorry to bother with a consultation that is sure is very easy but I am very new to the subject and there are simple things that complicate me. The issue is that I have a Form which is the main screen and from the menu I call another Form (Customers) and without closing this second I want to open a third (Articles) but it does not let me open it until the first child closes. This is all in C#. I would appreciate it if someone could explain to me how I should do it. Thank you
I've always called with .Show() but in this case I do not know how to do it

CakePHP cannot create/ find action in controller [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I am having some trouble creating an additional view in CakePhp
From what I understand you need to match the view file name and the controller function.
The function is in the correct controller, but CakePHP still gives me this error:
Error: The action userMutualFriends is not defined in controller UserProfileController
Error: Create UserProfileController::userMutualFriends() in file: app\Controller\UserProfileController.php.
<?php
class UserProfileController extends AppController {
public function userMutualFriends() {
}
}
Though I pasted the exact same function into the controller.
I have no experience with CakePhp, so maybe I am just missing something..
Thanks,
Sam
I am the biggest idiot, was using a back-up so changing the wrong files..
Sorry for wasting your time.

Implementation of an own message dispatcher in C [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to make my own message dispatcher in C...
For example, I want to send a message to MyButton or MyWindow structures.
And these structures have their own handlers.
Have any gurus any suggestions?
PS: for embedded application (using microcontroller)
PPS: thanks to sean - this is what I need.
My simple interpretation of sean's advice:
typedef void (*MyHandler)(size_t param);
MyHandler Handlers[32];
void RegisterHandlers(size_t id, MyHandler handler) {
Handlers[id] = handler;
}
void SendMessage(size_t id, size_t param) {
Handlers[id](param);
}
To implement this I would do the following:
Design a thread safe container for the events that are fired, a queue.
Then I would design a system to tie an event id, string or a integer, to a function through way of a hash table or some other mechanism like that.
After these two chunks are made you just need a way to register event id's with a function pointer and then just have a common way to send parameters to the functions and that's pretty much all there needs to be done with a message dispatcher. You push messages to the queue and then you pop things off the queue and react to whatever the message contains.

Error 1053 Windows service [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have created a windows service, however when I start the service I get a 1053 error.I have installed .net framework 4 on my machine.can anybody help!!
More than likely you are doing to much in the OnStart(). Try something like this.
'Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
Try
Dim worker = New Thread(AddressOf DoWork)
worker.Name = "MyWork"
worker.IsBackground = False
worker.Start()
Catch ex As Exception
'write to a log somewhere, however you usually handle your errors
End Try
End Sub'
Try something like that but we really do need more information to help you
You absolutely need to debug further. As others have already pointed out, "error 1053" is too generic to help much.
1) Read this link. It tells you how to debug a service in Visual Studio. You'll need to create a dummy "OnStart()" method (so that you can debug the "real" OnStart):
http://msdn.microsoft.com/en-us/library/7a50syb3%28v=vs.80%29.aspx
2) Here's a good article on Windows Event logging:
http://www.codeproject.com/Articles/39218/How-To-Create-a-Windows-Event-Log-and-Write-your-C
For starters (if you don't already have your own event log), I'd consider just appending "printf's" to a text file
3) Once you've isolated the problem to a specific part of your code, feel free to post it here.
'Hope that helps!

Writing in a file with Phonegap [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I've a problem with the Phonegap File API.
Here a simple example of my problem :
function gotFileWriter(writer) {
for(var i=0;i<300;i++){
alert(i);
writer.write(i);
}
}
Navigator alert 0.
0 is written is the file
Navigator alert 1.
And nothing else.
Thanks
PhoneGap file operations are async. What is most probably happening is that the first write has not finished before you call the second write which would cause an exception, a PendingOperation one IIRC. You will either want to build up a string with all the information you want to write to the file and send it over in one write command or you'll need to wait for the onwriteend event from the FileWriter before you can write the next item.
Take a look at the FileWriter full example for an idea of how to use onwriteend.
http://docs.phonegap.com/en/1.3.0/phonegap_file_file.md.html#FileWriter

Resources