http://stackoverflow.com/questions/383777/php-function-to-get-facebook-status
I've got to step 5 but im stuck.
How can I output these results in html format for say 10 status messages?
Thanks,
David
In my views i have the date in the following format s_date=20090106 and e_date=20100106
The model is defined as
class Activity(models.Model):
timestamp = models.DateTimeField(auto_now_add=True)
how to query for the timestamp filed with the above info.
Activity.objects.filter(timestamp>=s_date and timestamp<=e_date)
Thanks.....
I have to build a string like this
{ name: "john", url: "www.dkd.com", email: "[email protected]" }
where john, www.dkd.com and [email protected] are to be supplied by variables
I tried to do the following
s1 = "{'name:' {0},'url:' {1},'emailid:' {2}}"
s1.format("john","www.dkd.com","[email protected]")
I am getting the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: "'name"
Dont able to understand what I am doing wrong
I'm writing a migration to convert a non-rails app into the right format for rails - one of the tables for some reason does not have auto increment set on the id column. Is there a quick way to turn it on while in a migration, maybe with #change_column or something?
Using Google Mini for a website that needs output from the Google Mini in a JSON/JSONP format for front-end querying purposes. Google Mini does publish an XML feed that could potentially be used by a middle process to convert to JSON/JSONP.
Can Google Search Appliance / Mini output to JSON/JSONP using a plug-in, modification to an XSLT template, or other unknown method?
Hi, I'm looking to write a quick program to read and inspect packets of a certain format and then blacklist ips with a certain style of packet-traffic (packet patterns of an attack against the network). Are there decent samples of reading and inspecting packet flow on a network?
Is there an easy way to generate a labeled bitmap image for each glyph contained in a given bitmap font file?
I'm trying to convert a collection of Japanese .bdf fonts into a format usable in MATLAB and C++, where each glyph is used as the OCR classification key for the character it represents.
Hello,
So I have an MVC project that exposes my services in JSON format.
What would be the ideal method of (unit?) testing whether or not my methods return correct content (in terms of JSON syntax as well)?
Thank you,
Sammy
I have a list of data indicating attendance to conferences like this:
Event Participant
ConferenceA John
ConferenceA Joe
ConferenceA Mary
ConferenceB John
ConferenceB Ted
ConferenceC Jessica
I would like to create a binary indicator attendance matrix of the following format:
Event John Joe Mary Ted Jessica
ConferenceA 1 1 1 0 0
ConferenceB 1 0 0 1 0
ConferenceC 0 0 0 0 1
Is there a way to do this in R? Sorry for the poor formatting.
Hi all,
I am writing a small script by Python to connect and post content to my WordPress blog. It's pretty straightforward with https://github.com/maxcutler/python-wordpress-xmlrpc
However, when i tried to input a HTML data, for example:
<b>Hello</b>
It appears exactly in the WordPress post (I watch it from the visual editor, and I need to re-format it by copying the data to HTML mode to have the expected result.
What should I do with my python script ?
Thank you very much
I need to export the pages of an arbitrary PDF document into a series of individual images in jpeg/png/etc format. I need to do this in in Java.
Although I do know about iText, PDFBox and various other java pdf libraries, I am hoping for a pointer to some working example, or some how-to.
Thanks.
I have several thousand objects with string property in the format of "yyyy-MM-ddTHH:mm:ssZ". I want to sort these objects ordered by time.
Is there any useful packages or scripts for this ?
(currently I'm just comparing individual numeric values and it seems it's not very efficient and neat)
Hi all,
I'm doing some endian-sensitive file manipulation on iPhone. Are there standard macros or #defines in that environment that indicate native endianness and offer swapping if necessary? I know I can check in advance and just do the right thing for this particular architecture, but wondering if there are cleaner ways of doing the right thing. (The file format is little endian; if it were big-endian, I'd probably just use the htons/htonl family.)
Thanks.
I'm programming an app in which one of the ViewControllers is showing an UIScrollView that shows an image.
I'd like to load an image (pushpin in png format) and draw it (and delete it) in some points of the UIScrollView image.
I'd also would like to draw bezier paths in that image (and deleting them).
I've programmed several apps but this is the first time I face graphic programming and don't know where to start from.
Any suggestions?
Thanks!
Hi, I am new to webtest and I read that it is possible to record script in selenium and then run it via webtest/fitnesse. I have got webtest and selenium installed and configured. Is there specific format of code that suites webtest? Any help regarding this will be appreciated
I'm going to receive 10 points - coordinates (X,Y,Z).
The program should read these points (.txt format), after that do a polygon with these points. Finally, should be done a buffer polygon two times larger than the primitive.
Thanks for help!
i am trying to implement impersonation in a project. this is the first time i am trying it
this is what i have done.
<identity impersonate="true" userName="NS1\name" password="secret" />
i am using the username and password provided as the plesk credantials.
I don't if my username format is correct.
These are the details.
Windows 2003 shared server
IIS6
provider name : space2host
thanks in advance
Hi folks,
I have a text box which has a Ajax calendar extender attached. You click on the text box, the calendar pops up, you select a date and that gets displayed in the text box. That all good but the date is displayed in mm/dd/yyyy format. Can this be changed?
Thanks,
Jonesy
I have some MSIL in byte format (result of reflection's GetMethodBody()) that I'd like to analyze a bit. I'd like to find all classes created with the new operator in the MSIL. Any ideas on how to do that programmatically?
Hey guys,
My Flex client app has got some data from the back end (RemoteObjects, BlazeDS, Spring). Client has got all the data it needs, it now needs to put some information in a CSV format and make it available for download.
Using Flex 3 for this. Any ideas?
Thanks,
Sri
Hi:
I am writing to active directory using JNDI, it is successful for
"CN=Yuri Gagarin,OU=Admins,DC=ead,DC=ubc,DC=ca"; but fails for
"CN=Gagarin, Yuri,OU=Admins,DC=ead,DC=ubc,DC=ca".
I need to store displayName, cn, name in the format 'lastName, FirstName'.
What do I need to do to get this going?
Thanks very much.
I'm having trouble finding a regular expression that matches the following String.
Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1
One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \? as a valid escape sequence but it also fails to work with the tester at myregexp.com.
Here's what I have so far:
([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+
Any suggestions?
I am a newbie to Amazon SQS and ruby on rails. And i am working on a project that some XML messages must be send to SQS. How do i do that?
Now i have this in the controller after the .save
def create
@thing = Thing.new(params[:thing])
respond_to do |format|
if @thing.save
message = @thing.to_xml
and in the model
inputqueue.send_message(message)
Is this the way i can send an XML file to SQS or??
I am working on the module in which I have to decompress the data. The data comes from server which is zipped using gzip format. I am using NSData+Gzip.m file in which there is a function named "gzipInflate" to unzip the data. but it gives me the error "Z_OK -3". Now what is the solution of that error. How can I solve it. Please reply me :)