Search Results

Search found 7299 results on 292 pages for 'peter short'.

Page 7/292 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • jQuery callbacks - short version

    - by Frankie
    I've dug the manual and tried extensivelly to drop the extra function(){...} call after the error and success to do it like mootools but to no good luck. Is there any way i can avoid the extra function in jQuery? function doFileDelete(ui) { $.ajax({ error: function() { doFileDeleteAnimation(ui, false) }, success: function() { doFileDeleteAnimation(ui, true) }, url: '/url-to-delete-file' }); } Thank you!

    Read the article

  • VB.NET: short cuts in code

    - by Craig Johnston
    Why is the following VB.NET code setting str to Nothing in my VS2005 IDE: If Trim(str = New StreamReader(OpenFile).ReadToEnd) <> "" Then Button2.Enabled = True TextBox1.Text = fname End If OpenFile is a Function that returns a FileStream

    Read the article

  • Recognizing language of a short text? - Python

    - by RadiantHex
    Hi folks, I'm have a list of articles, each article has its own title and description. Unfortunately, from the sources I am using, there is no way to know what language they are written. Also, text is not entirely written in 1 language; almost always English words are present. I reckon I would need dictionary databases stored on my machine, but it feels a bit unpractical. What would you suggest I do?

    Read the article

  • JavaScript/jQuery short hand function definitions

    - by Baddie
    I'm using a jQuery plugin that has its functions defined as such: $('#mydiv').pluginAction({ someproperty: val, format: 'mm hh', labels: ['yes', 'no', 'maybe'], labels1: ['never', 'always'] }); In my HTML page, I have multiple DIVs that have the same properties for format, labels, labels1, but different values for someproperty. Is there some type of JavaScript notation I can take advantage of to shorten the definition so that I don't have to have duplicate code?

    Read the article

  • Fast double -> short conversion with clamping using SSE?

    - by gct
    Is there a fast way to cast double values to shorts (16 bits signed), currently I'm doing something like this: double dval = <sum junk> int16_t sval; if (val > int16_max) { sval = int16_max; } else if (val < int16_min) { sval = int16_min; } else sval = (int16_t)val; I suspect there's a fast way to do this using SSE that will be significantly more efficient.

    Read the article

  • Generating short license keys with OpenSSL

    - by Marc Charbonneau
    I'm working on a new licensing scheme for my software, based on OpenSSL public / private key encryption. My past approach, based on this article, was to use a large private key size and encrypt an SHA1 hashed string, which I sent to the customer as a license file (the base64 encoded hash is about a paragraph in length). I know someone could still easily crack my application, but it prevented someone from making a key generator, which I think would hurt more in the long run. For various reasons I want to move away from license files and simply email a 16 character base32 string the customer can type into the application. Even using small private keys (which I understand are trivial to crack), it's hard to get the encrypted hash this small. Would there be any benefit to using the same strategy to generated an encrypted hash, but simply using the first 16 characters as a license key? If not, is there a better alternative that will create keys in the format I want?

    Read the article

  • Need help with homework(very short code)

    - by b3y4z1d
    I have a code, and I need to have it done until friday or so.I'd say 95% of it is finished,but the functions and the function-calling could use some grooming. It is really simple for anyone who knows C++ pretty well, but I'm a newbie and I just can't seem to get through this with the functions so if anyone could take a look and correct the few mistakes or add a line or two if needed I'd be very grateful. Here is the link to the full code, you'll understand the purpose of the code once you see it. I use Borland C++ by the way if it helps. Thanks in advance!

    Read the article

  • In short, how is NSFetchedResultsController used?

    - by mystify
    I'm reading now since one hour through the documentation and still don't get the point of NSFetchedResultsController. Is it a replacement for UITableViewController? Or is the UITableViewController using the NSFetchedResultsController? Is the NSFetchedResultsController the data source? What is it?

    Read the article

  • R: simple and short if clauses for combind statements

    - by jorgusch
    Hello, TRUE/FALSE if clauses are easily and quickly done in R. However, if the argument gets more complex, it also gets ugly very soon. For instance: I might want to execute different operations for a row(foo) dependent on the value in one cell (foo[1]). Let the intervals be 0:39 and 40:59 and 60:100 Something like does not exit: (if foo[1] "in" 40:60){... In fact, I only see ways of at least two if clauses and two else statements and the action for the first interval somewhere at the bottom of the code. With more intervals(or any other condition) it is getting more complex. Is there a best practice (for this purpose or others) with a simple construction and nice design to read? Thanks a lot!

    Read the article

  • Convert month number to month short name

    - by Roland
    I have a variable with the following value $month = 201002; the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb My code looks like this <?php echo date('M',substr($month,4,6)); ?> I can I go about to obtain the month name

    Read the article

  • Random forests for short texts

    - by Jasie
    Hi all, I've been reading about Random Forests (1,2) because I think it'd be really cool to be able to classify a set of 1,000 sentences into pre-defined categories. I'm wondering if someone can explain to me the algorithm better, I think the papers are a bit dense. Here's the gist from 1: Overview We assume that the user knows about the construction of single classification trees. Random Forests grows many classification trees. To classify a new object from an input vector, put the input vector down each of the trees in the forest. Each tree gives a classification, and we say the tree "votes" for that class. The forest chooses the classification having the most votes (over all the trees in the forest). Each tree is grown as follows: If the number of cases in the training set is N, sample N cases at random - but with replacement, from the original data. This sample will be the training set for growing the tree. If there are M input variables, a number m « M is specified such that at each node, m variables are selected at random out of the M and the best split on these m is used to split the node. The value of m is held constant during the forest growing. Each tree is grown to the largest extent possible. There is no pruning. So, does this look right? I'd have N = 1,000 training cases (sentences), M = 100 variables (let's say, there are only 100 unique words across all sentences), so the input vector is a bit vector of length 100 corresponding to each word. I randomly sample N = 1000 cases at random (with replacement) to build trees from. I pick some small number of input variables m « M, let's say 10, to build a tree off of. Do I build tree nodes randomly, using all m input variables? How many classification trees do I build? Thanks for the help!

    Read the article

  • Remove short tag in html 4 validation in aspx

    - by iPhone Fun
    hi all, I am new to HTML 4 validations, in that if I put HEAD runat="server" tag I am getting this error - Error Line 6, Column 82: character data is not allowed here …lesheet" type="text/css" media="all" / In the head tag I have called css files. So if any one know about thin can help me,how to solve this error? Thanks in advance.

    Read the article

  • tint2 - short format date?

    - by Tedee12345
    How to shorten the format of the date on this format? 09:58 @ nie 20 paz This is the configuration file: #--------------------------------------------- # CLOCK #--------------------------------------------- time1_format = %H:%M @ %A %d %B time1_font = Visitor TT1 BRK 10 #time2_format = %A %d %B time2_font = (null) clock_font_color = #ffffff 76 clock_padding = 2 1 clock_background_id = 0 Thank you for your help.

    Read the article

  • C++ - Need to learn some basics in a short while

    - by Rubys
    For reasons I will spare you, I have two weeks to learn some C++. I can learn alone just fine, but I need a good source. I don't think I have time to go through an entire book, and so I need some cliff notes, or possibly specific chapters/specialized resources I need to look up. I know my Asm/C/C# well, and so anything inherited from C, or any OOP is not needed. What I do need is some sources on the following subjects(I have a page that specifies what is needed, this is basically it, but I trimmed what I know): new/delete in C++ (as opposed to C#). Overloading cin/cout. Constructor, Destructor and MIL. Embedded Objects. References. Templates. If you feel some basic C++ concept that is not shared with C/C# is not included on this list, feel free to enter those as well. But the above subjects are the ones I'm supposed to roughly know in two week's time. Any help would be appreciated, thanks.

    Read the article

  • Handling of data truncation (short reads/writes) in FUSE

    - by Vi
    I expect any good program should do all their reads and writes in a loop until all data written/read without relying that write will write everything (even with regular files). Am I right? Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer (using -o direct_io). Some programs work, some not (notably mountlo). Are them buggy or programs should not expect truncated writes and reads from the regular files? In general, are seekable file descriptors expected to truncate data like sockets and pipes?

    Read the article

  • Segmentation fault on returning from main (very short and simple code, no arrays or pointers)

    - by Gábor Kovács
    I've been wondering why the following trivial code produces a segmentation fault when returning from main(): //Produces "Error while dumping state (probably corrupted stack); Segmentation fault" #include <iostream> #include <fstream> #include <vector> using namespace std; class Test { vector<int> numbers; }; int main() { Test a; ifstream infile; cout << "Last statement..." << endl; // this gets executed return 0; } Interestingly, 1) if only one of the two variables is declared, I don't get the error, 2) if I declare a vector variable instead of an object with a vector member, everything's fine, 3) if I declare an ofstream instead of an ifstream, again, everything works fine. Something appears to be wrong with this specific combination... Could this be a compiler bug? I use gcc version 3.4.4 with cygwin. Thanks for the tips in advance. Gábor

    Read the article

  • C++ WIN32: Short multitasking example

    - by Con Current
    I searched for examples on how to create a simple multithreaded app that does something similar to this: #include <iostream> using namespace std; int myConcurrentFunction( ) { while( 1 ) { cout << "b" << endl; } } int main( ) { // Start a new thread for myConcurrentFunction while( 1 ) { cout << "a" << endl; } } How can I get the above to output a and b "randomly" by starting a new thread instead of just calling myConcurrentFunction normally? I mean: What is the minimal code for it? Is it really only one function I have to call? What files do I need to include? I use MSVC 2010, Win32

    Read the article

  • How to create AppStore.com short link?

    - by acidic
    For my resume, I am attempting to add a shortened link to the app that I created. I looked around and found that apple provides a link shortener for iOS apps using the AppStore.com URL. Unfortunately, since my app contains the ² character, I cannot figure out how to link to my app. The long link for my app is: https://itunes.apple.com/us/app/squared2/id498133871?mt=8 Also, is there a way to link to an app without having iTunes automatically open (only show the iTunes preview page)?

    Read the article

  • Why doesn't this short php script send email?

    - by RoryG
    I can't seem to get my php script to send email. <?php echo "Does this page work?"; mail('my email address', 'test subject', 'test message'); ?> First, I have set the mail function settings in the php.ini file as follows: I checked my email account settings on outlook. It does not require authentication, its port is 25, and its type of encrypted connection is 'Auto'. Given this I configured my php.ini file accordingly: SMTP = ssl://smtp1.iis.com smtp_port = 25 Then I set: sendmail_from: my email address The echo statement prints out in the browser, so I know the php file is recognized and processed. But the browser also shows the following error: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\mailtest.php on line 3 I have clearly set the sendmail_from so I don't know what else to do. I have also tried removing the 'ssl://' part from the SMTP setting in the php.ini file, and configuring the php5.ini file. Which of these .ini files should I be configuring anyways?

    Read the article

  • Remove short tag in html 4 validation using aspx

    - by iPhone Fun
    hi all, I am new to HTML 4 validations, in that if I put HEAD runat="server" tag I am getting this error - Error Line 6, Column 82: character data is not allowed here …lesheet" type="text/css" media="all" / In the head tag I have called css files. So if any one know about thin can help me,how to solve this error? Thanks in advance. and sorry for my bad english...

    Read the article

  • Problems with usually short solutions to test in a programming language

    - by sub
    I'm currently creating an experimental programming language for fun and educational purpose and in search for some tasks beyond the classical "Hello, World!"-program. I've already come up with these ideas: Print out the program's input Calculator Generate Prime numbers, Fibonacci series What other interesting programming problems do you have for me to test? It would be good if they required the language to solve a broad spectrum of task, take prime numbers for example: You need variables, increment them, divide them, perform actions under certain conditions, etc.

    Read the article

  • Short snippet summarizing a webpage?

    - by Legend
    Is there a clean way of grabbing the first few lines of a given link that summarizes that link? I have seen this being done in some online bookmarking applications but have no clue on how they were implemented. For instance, if I give this link, I should be able to get a summary which is roughly like: I'll admit it, I was intimidated by MapReduce. I'd tried to read explanations of it, but even the wonderful Joel Spolsky left me scratching my head. So I plowed ahead trying to build decent pipelines to process massive amounts of data Nothing complex at first sight but grabbing these is the challenging part. Just the first few lines of the actual post should be fine. Should I just use a raw approach of grabbing the entire html and parsing the meta tags or something fancy like that (which obviously and unfortunately is not generalizable to every link out there) or is there a smarter way to achieve this? Any suggestions? Update: I just found InstaPaper do this but am not sure if it is getting the information from RSS feeds or some other way.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >