if (pathname == "/" || pathname == "/default.asp")
in js using jquery library.
I want this to catch "Default.asp" as well as "DeFaULT.asp" and "default.asp"
halp.
I'm looking to do some sentence analysis (mostly for twitter apps) and infer some general characteristics. Are there any good natural language processing libraries for this sort of thing in Ruby?
Similar to http://stackoverflow.com/questions/870460/java-is-there-a-good-natural-language-processing-library but for Ruby. I'd prefer something very general, but any leads are appreciated!
In the same vein as http://stackoverflow.com/questions/2593399/process-a-set-of-files-from-a-source-directory-to-a-destination-directory-in-pyth I'm wondering if it is possible to create a function that when given a web directory it will list out the files in said directory. Something like...
files[]
for file in urllib.listdir(dir):
if file.isdir:
# handle this as directory
else:
# handle as file
I assume I would need to use the urllib library, but there doesn't seem to be an easy way of doing this, that I've seen at least.
What security concerns are there when you create a hybrid of languages? For instance using python and java code together with jython, or creating a python module from a C++ library. There are other ways of mixing 2 or more languages. Do you know of an example where this creates a vulnerability?
Whenever I load ONLY the 1.3 or 1.4 library on an html page im developing on my desktop I get an error that says "setting a property that only has a getter"
I dont have any additonal code, this is coming straight from the jquery.min.js file
I also get a bazillion warnings in Firebug.
Can someone help me resolve this issue?
I can't determine why this is happening
Hi,
I have a vb app working now but many users have complained to me that it requires .net library installed. Is there a way to bundle it with my program without having a seperate exe?
Hi,
I am trying to implement my own version of pow() and sqrt() function as my custom library doesn't have pow()/sqrt() floating point support.
Can anyone help?
I have written a epytext to reST markup converter, and now I want to convert all the docstrings in my entire library from epytext to reST format.
Is there a smart way to read the all the docstrings in a module and write back the replacements?
ps: ast module perhaps?
I doubt if this is encryption but I can't find a better phrase. I need to pass a long query string like this:
http://test.com/test.php?key=[some_very_loooooooooooooooooooooooong_query_string]
The query string contains NO sensitive information so I'm not really concerned about security in this case. It's just...well, too long and ugly. Is there a library function that can let me encode/encrypt/compress the query string into something similar to the result of a md5() (similar as in, always a 32 character string), but decode/decrypt/decompress-able?
I've found plenty of tutorials / questions on Stackoverflow that deal with copying char arrays from C/JNI side into something like a byte[] in Java, but not the other way around.
I am using a native C library which expects a byte array. I simply want to get data from a byte[] in java, into preferably an unsigned char[] in C.
Long story short: What is the best way of copying data from a jBytearray in JNI? Is there any way to detect it's size?
I'd like to remove a layer (in this case the results of geom_ribbon) from a ggplot2 created grid object. Is there a way I can remove it once it's already part of the object?
library(ggplot2)
dat <- data.frame(x=1:3, y=1:3, ymin=0:2, ymax=2:4)
p <- ggplot(dat, aes(x=x, y=y)) + geom_ribbon(aes(ymin=ymin, ymax=ymax), alpha=0.3)
+ geom_line()
# This has the geom_ribbon
p
# This overlays another ribbon on top
p + geom_ribbon(aes(ymin=ymin, ymax=ymax, fill=NA))
my helloworld_tags:
from django import template
register = template.Library()
def show_profile():
return {"eee": '333'}
register.inclusion_tag("b.html")(show_profile)
my view:
def b(request):
return render_to_response('b.html')
my html:
{% load helloworld_tags%}
dsad {{ eee }}
but only show 'dsad' ,not show 'dsad333'
why??
thanks
I have some nested datastructures, each something like:
[ ('foo', [ {'a':1, 'b':2},
{'a':3.3, 'b':7} ]),
('bar', [ {'a':4, 'd':'efg', 'e':False} ]) ]
I need to compare these structures, to see if there are any differences. Short of writing a function to explicitly walk the structure, is there an existing library or method of doing this kind of recursive comparison?
Hello all,
I have a Document Library that receives a mail every week. I want to show the list of mails with their summaries. Is it possible to get that mail's content in Sharepoint, without deploying a custom code?
Thanks.
I know the .NET framework and WPF pretty well, but I think the whole thing has gotten too blown up, especially for small apps as the whole .NET framework 3.5 weighs 197 MB by now.
I am looking for a language/framework/library that provides functionality similar to that of WPF (animations, gradients, a.s.o.) and the .NET framework (of course not everything, but the basic features) and which is faster and more lightweight than the .NET framework and creates smaller and faster applications than the ones using .NET.
Do you have any suggestions?
The lack of expression trees in Compact Framework has bugged me for some time now, but I haven't really looked for a solution.
Today, I've found a blog post about an alternative System.Linq.Expressions built on top of Mono System.Core and used e.g. by db4o (you can find it here).
My question is - have you used this library and if so, what were your experiences with it (especially regarding performance)?
Can anyone recommend a plugin or library that allows people to upload images which automatically gets cropped and resized? I don't mind editting some config files to specify how images should be cropped and resized.
Additionally, after uploading, the front end user should be able to drag and drop for re-ordering.
Can someone recommend something that works with php?
I'm searching for a free component or library that could convert HTML to PostScript ( .ps file format ). I'm using .Net framework 1.1. Any one have experience with situation like this ?
I'm base64 encoding a JPG in AS3 and passing it to PHP where it would be decoded. It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm.
Is there a library or API for either language that would allow it to interface with the other? Alternatively, does anyone even know what PHP's default base64 map is? My Google searching is not yielding results.
Hi,
I have one audio file captured from my iphone. I want to upload this audio file using SFTP protocol?
Is is possible? Is there any third party library available? Is it the same as putting file on FTP?
Thanks,
Jim.
Hi folks,
I'm trying to submit a few forms through a Python script, I'm using the mechanized library.
This is so I can implement a temporary API.
The problem is that before after submission a blank page is returned informing that the request is being processed, after a few seconds the page is redirected to the final page.
I understand if it might sound a bit generic, but I'm not sure what is going on. :)
Any ideas?
I'm having a problem displaying data from a function to text box within a tab.
If you run the code and click "Select Tab 2 and Fill..." I get an error;
"TypeError: Error #1009: Cannot access a property or method of a null object reference."
I'm guessing this is because "Tab 2" is/was not rendered yet. Now if I run the code,
select "Tab 2" then select "Tab 1" and click "Select Tab 2 and Fill..." it works
the way I would like. Dose any one know a way around this problem.
----Full Flex 4/Flash Builder Code just copy paste----
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
creationComplete=" ">
<fx:Script>
<![CDATA[
public function showtab2():void
{
mytextbox.text="I made it!";
tn.selectedIndex=1;
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:Panel title="TabNavigator Container Example" height="90%" width="90%"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
<mx:Label width="100%" color="blue"
text="Select the tabs to change the panel."/>
<mx:TabNavigator id="tn" width="100%" height="100%">
<!-- Define each panel using a VBox container. -->
<mx:VBox label="Panel 1">
<mx:Label text="TabNavigator container panel 1"/>
<mx:Button label="Select Tab 2 and Fill with Text" click="showtab2()"/>
</mx:VBox>
<mx:VBox label="Panel 2">
<mx:Label text="TabNavigator container panel 2"/>
<s:TextInput id="mytextbox" />
</mx:VBox>
</mx:TabNavigator>
<mx:HBox>
</mx:HBox>
</mx:Panel>
</s:WindowedApplication>
Is there any function that converts
<a href="test.php"/>
to
< href="test.php"/>
It would be helpful if all html characters were converted in the similar manner.
Is there a function or library to do this?
Hi
have tried to create a inclusion tag on Django but don't work and return
str' object has no attribute
'autoescape'
this is the code of custom tag:
from django import template
from quotes.models import Quotes
register = template.Library()
def show_quote():
quote = Quotes.objects.values('quote', 'author').get(id=0)
return {'quote': quote['quote']}
register.inclusion_tag('quotes.html')(show_quote)
EDIT: Quote class
from django.db import models
class Quotes(models.Model):
quote = models.CharField(max_length=255)
author = models.CharField(max_length=100)
class Meta:
db_table = 'quotes'
quotes.html
<blockquote id="quotes">{{ quote }}</blockquote>
Hi,
I have developed a signed plugin for eclipse. I have refered this document http://www.ibm.com/developerworks/opensource/library/os-eclipse-plugin-sigs/index.html
When i am installing that plugin in my system it is ok. and asking for certificate verification .But when i am installing that plugin in other system's eclipse it is giving error. Signed plugin is not getting install in other machine except mine.Why it is like that how to solve that problem please tell???