I may have missed the whole point about protocols but my question is, can protocol be used to say iterate a custom data structure or how println would print the object?
Hi, I am writing a custom read function for one of the data types in my module. For eg, when I do read "(1 + 1)" :: Data, I want it to return Plus 1 1. My data declaration is data Data = Plus Int Int. Thanks
Please guide me how to make a custom kendo ui widget, like if you could refer to some tutorial or anything. Secondly the main question is that I want to use kendo grid to consume webapi and i want to use it in a widget in which and pass the datasource to this widget.
Bascially I want to make a widget which will consume the webapi using a particular url, and which will return a data source that I can add to this kendogrid widget.
Currently I have a custom module with hook_menu for path 'search'. It's working just fine. However, it couldn't process the request when I access /search?q=something.
How do I do this? I'm using Drupal 6 btw.
Thanks
How can I implement tail calls in a custom virtual machine?
I know that I need to pop off the original function's local stack, then it's arguments, then push on the new arguments. But, if I pop off the function's local stack, how am I supposed to push on the new arguments? They've just been popped off the stack.
I regularly use an ellipsis as a bullet point in a list of items in Word/Outlook 2010.
Example:
I like summer because...
... it's warm out.
... we go on vacation.
... my birthday is in July.
Currently in Word/Outlook if you type certain characters like a hyphen and hit space, it will automatically start a bulleted list using the hyphen.
I would really like the same functionality with the ellipsis. When I type the third period and hit space, start a bulleted list.
Does anyone know of a way to do this? Registry hack? Hidden Word Setting?
How do I pass an argument to my custom save method, preserving proper *args, **kwargs for passing to te super method? I was trying something like:
form.save(my_value)
and
def save(self, my_value=None, *args, **kwargs):
super(MyModel, self).save(*args, **kwargs)
print my_value
But this doesn't seem to work. What am I doing wrong?
I am recording audio in iPhone ..
This is my Audio Queue object
AudioQueueNewInput(
&audioDescription,
recordingCallback, self,
CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, 0,
&mInputQueue
);
But i want to run this in a seperate RunLoop..How to create custom CFRunLoop ?
Please help me..Thanks in advance.
I want to do a class that have properties like font, which will have other properties, such as name, size, unit,bold.I had tried a solution but it isn't working for me.(http://stackoverflow.com/questions/755391/group-properties-in-a-custom-control)
Anyone can help? Any help will be appreciated.
<TypeConverter(GetType(ExpandableObjectConverter))> _
Class TestingClass
'Some property here
End Class
I'm trying to set up a proxy model in django admin. It will represent a subset of the original model. The code from models.py:
class MyManager(models.Manager):
def get_query_set(self):
return super(MyManager, self).get_query_set().filter(some_column='value')
class MyModel(OrigModel):
objects = MyManager()
class Meta:
proxy = True
Now instead of filter() I need to use a complex SELECT statement with JOINS. What's the proper way to inject it wholly to the custom manager?
Instead of changing my host file I'd like Firefox to think my domain is on my own server while my other browser uses the real IP address. I used to edit my host files but that forces both browsers to change the IP address.
I found change host, but it doesn't appear to use the alternative host file. I also saw a comment asking when it will work on Firefox 6+.
I tried Host Admin and it fails. It works but the alternative IP address must be in your host file already (which I don't want) and it lets you deselect a domain so the host file is ignored which is not what I want.
I've written a custom plugin for CKEditor--successful on all fronts, save one currently: I can't, for the life of me, figure out how to customize the image on the button in the toolbar of the editor. As I'm a new user, you'll have to click through to see attached image; the highlighted square in the top left should have a pretty picture (like most of the other toolbar items).
Thanks much for thoughts/advice/help.
Isaac
Screenshot: http://imgur.com/ZNNKe.jpg
I am trying cache for my website use Nginx Proxy module and has following requirements:
If request has cookie (in request header)
The response will use cache of Nginx
Hide Set-Cookie header line
If request has no cookie (in request header)
Foward request to backend
Don't hide h Set-Cookie header line
I use If (of rewrite module) and any directive:
if (!-e $http_cookie)
{
set $not_cache_rq 0;
set $not_cache_rp 0;
}
if ($http_cookie) {
set $not_cache_rq 1;
set $not_cache_rp 1;
}
proxy_cache_bypass $not_cache_rq;
proxy_no_cache $not_cache_rp;
proxy_hide_header Set-Cookie;
I do not know how to call cookie proxy_hide_header option when has cookie and no cookie on header line.
Please help me. Many thanks.
I want to put custom scripts/programs in ~/bin on few machines under version control (repository is on a remote server). In the bin/ folders I have many perl/sh/bash scripts, as well as small .c programs. What layout would you use for such repo?
Just something I'd like to play with, I would like to create a "virtual" file/directory in the File System of Linux or Mac OS X (Not sure if I can share the same code - does POSIX help?), for example /foo and then perform custom code when something is read or written to it.
Similar how /dev/null allows for stuff like
echo "Hello!" > /dev/null
I don't care if it's in /dev, /proc or anywhere else, as said it's mainly something to play with...
Trying to put in FontLabel (http://github.com/zynga/FontLabel) into a UIButton. At first I wanted to set titlelabel. But it's restricting a setter to it so i can't just set the label to it.
Just wondering if anyone has an idea in doing this without using images to set my custom button.
I have a custom keyboard and whenever I touch the backspace button for the first time my app crashes! How can I solve this problem?
My code:
myText.text = [myText.text substringToIndex:([myText.text length]-1)];
I want to pass the sessionID as a json parameter, I can see how to override SessionIDManager and such, but this just covers custom creation/validation of sessionID's as opposed to where it actually gets the sessionID from.
There is of course 'cookieless' which puts it in the url, but that doesn't work for me either.
So i'd like to override the session handling so I can specify where it should look for the sessionID.
I have a TabLayout containing tabs as intents to activities.
I want to set custom menu items for each tab, but the onCreateOptionsMenu version called is the Host's version.
How can I make the menu items created by each activity on its own.
Hi,
I've two columns in a sheet that are interdependent and I want to use validation, drop-down lists, on both as follows:
Column A (TYPE) | Column B (Sub-TYPE)
------------------------------------------|
TypeA, TypeB | If TypeA SubTypeA1, |
... TypeN | SubTypeA2 ... SubTypeAN |
------------------------------------------|
Creating the column A drop down is trivial. How do I create the Column B drop down, that in turn depends on what was chosen in Column A?
TIA
I'm trying to create a popup menu, where I can detect the mouse button that was pressed for a given item. I've created a custom QAction already to build my QMenu, but the triggered signal when the menu item is pressed doesn't provide a QMouseEvent for me to query the button pressed.
Also, I'm setting the a status tip for each QAction, which appears in the status bar when I mouse over it, but it stays even after I close the QMenu. Is this normal behavior?
Hi,
how can i create custom frameworks in cocoa. please tell the steps to create simple frame work like it should contain addition of two number functions in its class.