Download PDF file from AJAX Post return callback

When I try to link to a data-generated file that I've set up to be rendered as a PDF document, this works to open a PDF document in a new window, but only for small sets of data: window.open(myUrl + params, "_blank", "menubar=no,status=no&q

Entity Equivalent Framework of InsertonSubmit

I know there is a question with basically the same header but is different in my case. I moved from Linq-to-SQL to Entity Framework (which I am a little new to) and I have a method where I use InsertOnSubmit, and so I found out it is in Linq-to-SQL a

Kill a process in bash script

I would like to kill and restart a process and this command works on interactive mode but not in script mode. Any suggestion: echo "Killing the running server" kill $(ps -a | grep 'myserver.jar' | awk '{print $2}') || echo 'No active myserver' ;

Can I get bigger thumbnails using the YouTube API?

I'm using the YouTube API to get thumbnails. I have noticed the thumbnails are all 90 × 120 pixels. Is there a way I can get them larger? I'm using PHP 5.3 & SimpleXML to parse the XML.Yes, you can sir! // Get the thumbnail $thumb = $media->group-&

A problem with the common prefix list function

(define (long a b) (cond ((null? a) '()) ((null? b) '()) (else (if (equal? (car a) (car b)) (cons a (long (cdr a) (cdr b))) (cons b (long (cdr a) (cdr b))))))) This function is suppose to the find the longest common prefix between 2 lists. So when I

Isolation of title and text Belle soup

I have a some code that parses out a div from a page then finds all "p" tags which will have a title and some some text sample: for fn in os.listdir('.'): if os.path.isfile(fn): url = "%s/%s" % (path, fn) page = open(url) soup = Beauti

Logo prototype Javascript

I'm new to prototype based languages and have read this question: Preserving a reference to "this" in JavaScript prototype functions I'm wondering what value there is, of using a prototype based signature to attach methods to an object. Why not

CRM 2011 - ITracingService with access to traceInfo at run time

I have some custom logging in my plugin and want to include the contents of my tracingService in my custom logging (which is called within a catch block, before the plugin finishes). I cant seem to access the content of tracingService. I wonder if it

Using C # Count () with a function

I'm trying to figure out how many times the maximum value of an array occurs within the array by using Linq's.Count() with a predicate inside. However, I don't fully understand how to do it. From reading the MSDN's scant example I thought I understoo

declare Struct in Header and use in several Sources

I need to define a Structure in on source file and also others sources should be able to see that. I declare struct in ONE source file and then extern declaration in header to include in other sources, but the compiler following error is there: lcd.c

What are the uses of the circular buffer?

What are some of the uses of circular buffer? What are the benefits of using a circular buffer? is it an alternative to double linked list?I've used it for an in-memory log with a restricted size. For example, the application would write log entries

PHP publication on the wall of the page

I have a website where users can post jobs for free. How can I link these posts to a facebook page about this website? I don't want the users to login to fb. At this moment I post them to twitter and then using selective tweets to post them on my pag

How does the same origin policy (SOP) work?

I had a read of what same origin policy means on Wikipedia however fail to understand how it works. I do understand that it prevents for example a javascript on my website from interacting with a script on a separate site however what does this exact

Rails Active Record call backs

I have been trying to figure out when exactly each callback for active record is called in rails. My specific problem is: does a before_save ever not get called. For example if you do a create. The broader approach is when and where is each called. A

PHP: output account ()

How do i work with the COUNT() $sql = $connect->prepare("SELECT COUNT() FROM discos_events e INNER JOIN discos_events_guests eg ON (e.ID = eg.eID) INNER JOIN users u ON (eg.uID = u.id) WHERE e.dID =:id"); $sql->bindValue(":id", $

View report - Unable to load file or assembly

I use VS2008 to develop a web application. When I open a local report, it's report datasource does not show. I click the report->DataSource to see it's datasource, but it appear an error message: Could not load file or assembly ### But the file or as

Problem with sending email in Android?

I had used the Intent code for sending Email , I was able to send the email Successfully, but my problem is if the user click the Gmail App and open Inbox click a email and press Home Key , then open my app and click Email Button it opens the Inbox r

How to track BFS depth in C ++

I want to do BFS on a 2D array, and each of the cell can be represented as pair<int,int>. I use queue<pair<int,int>> to keep track of cells at each level, but I find no clever way to keep track of the depth. (I don't want to define anoth

Does Google NaCl support exceptions with a C ++ 11 compiler?

Google NaCL comes with at least two C++ compilers: a very old gcc version, and a very recent clang version. The gcc version does not support C++ 11, so I would rather not use it. The very new clang compiler generates intermediate code, and then eithe