unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
RegExp Validate First http === i want to validate a link have http or not if it hasent http frist of link then it add http to frist of link like this: www.example.com convert to http://www.example.com only the frist http is important for me .
0
[ 2, 7953, 6899, 7394, 1373, 64, 7775, 800, 3726, 3726, 31, 259, 20, 7394, 1373, 21, 3508, 57, 7775, 54, 52, 100, 32, 63, 2291, 7775, 6266, 384, 16, 3508, 94, 32, 3547, 7775, 20, 6266, 384, 16, 3508, 101, 48, 45, 13, 6483, 9, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drupal 7 switch between forms === I'm new to drupal and need to create a login form which i've succesfully done. But when i'm logged in i want the form to swtich to another form where you can edit your details. I'm having trouble finding out how to swtich between the forms. <?php /** * Implements hook_help. * * Displays help and module information. * * @param path * Which path of the site we're using to display help * @param arg * Array that holds the current path as returned from arg() function */ function login_kms_help($path, $arg) { switch ($path) { case "admin/help#login": return '<p>'. t("Creates login module") .'</p>'; break; } } /** * Implements hook_block_info(). */ function login_kms_block_info() { $blocks['login_kms'] = array( 'info' => t('Login KMS'), //The name that will appear in the block list. 'cache' => DRUPAL_CACHE_PER_ROLE, //Default ); return $blocks; } function login_kms_block_view($delta = '') { $block = array(); if($delta == 'login_kms') { $block['subject'] = 'Login'; $block['content'] = drupal_render(drupal_get_form('login_kms_form_mode0')); } else if($delta == 'login_kms'){ $block['subject'] = 'Edit'; $block['content'] = drupal_render(drupal_get_form('login_kms_form_mode1')); } return $block; } function login_kms_form_mode0() { $form['username'] = array( '#type' => 'textfield', '#title' => t('Username:'), ); $form['password'] = array( '#type' => 'password', '#title' => t('Password:'), ); $form['Log in'] = array( '#type' => 'submit', '#value' => t('Log in'), ); return $form; } function login_kms_form_mode1(){ $form['username'] = array( '#type' => 'textfield', '#title' => t('mode1'), ); } function login_kms_form_submit($form, &$form_state) { $mysql_user = $form_state['values']['username']; $mysql_pass = $form_state['values']['password']; // drupal_set_message(t($mysql_pass)); // some logic }
0
[ 2, 15708, 6720, 453, 5521, 128, 1997, 800, 3726, 3726, 31, 22, 79, 78, 20, 15708, 6720, 17, 376, 20, 1600, 21, 6738, 108, 505, 56, 31, 22, 195, 21792, 5052, 5655, 677, 9, 47, 76, 31, 22, 79, 13, 19287, 19, 31, 259, 14, 505, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Linq to parse XML, return no result === I am using Linq to to parse an XML, but it return no result: public class Merc { public string CompanyName { get; set; } } string result = @"<?xml version=""1.0"" encoding=""UTF-8""?> <soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org soap/envelope/"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> <soapenv:Body> <downloadInfoResponse xmlns=""http://webService""> <downloadInfoReturn> <city>city</city> <companyName>company name</companyName> </downloadInfoReturn> </downloadInfoResponse> </soapenv:Body></soapenv:Envelope> "; using (XmlReader reader = XmlReader.Create(new StringReader(result))) { XDocument doc = XDocument.Load(reader, LoadOptions.SetLineInfo); List<Merc> m = (from downloadInfoReturn in doc.Descendants("downloadInfoReturn") select new Merchant { CompanyName = downloadMerchantInfoReturn.Element("companyName").Value }).ToList<Merchant>(); } Is there any other good method to do it? Thank you.
0
[ 2, 568, 6294, 1251, 20, 2017, 870, 23504, 15, 788, 90, 829, 800, 3726, 3726, 31, 589, 568, 6294, 1251, 20, 20, 2017, 870, 40, 23504, 15, 47, 32, 788, 90, 829, 45, 317, 718, 9046, 13, 1, 317, 3724, 237, 7259, 13, 1, 164, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PhoneGap Script reads contacts correctly until the first contact without an email address appears === Following script is supposed to return a list of contacts together with their emails, phone numbers and avatars (photos). It works like a charm it I remove the avatar (photo) retrieval code, the moment I add it back. The script breaks. Does anyone have any experiences trying to display contact photos via phonegap? <!DOCTYPE html> <html> <head> <title>Contact Example</title> <script type="text/javascript" src="jquery-1.7.2.min.js"></script> <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { // specify contact search criteria var options = new ContactFindOptions(); options.filter=""; // empty search string returns all contacts options.multiple=true; // return multiple results filter = ["displayName", "name", "phoneNumbers"]; // find contacts navigator.contacts.find(filter, onSuccess, onError, options); } // onSuccess: Get a snapshot of the current contacts // function onSuccess(contacts) { console.log(contacts.length); for (var i=0; i<contacts.length; i++) { var LI=$("#list").append('<li>'+contacts[i].displayName+'</li>'); if (contacts[i].phoneNumbers) { for (var j=0; j<contacts[i].phoneNumbers.length; j++) { $(LI).append('<span>'+contacts[i].phoneNumbers[j].value+'</span><Br/>'); } } if (contacts[i].emails) { for (var j=0; j<contacts[i].emails.length; j++) { $(LI).append('<span>'+contacts[i].emails[j].value+'</span><br/>'); } } if (contacts[i].photos) { for (var j=0; j<contacts[i].photos.length; j++) { alert(contacts[i].photos[j].value); //$(LI).append('<span>'+contacts[i].photos[j].value+'</span><br/>'); } } /*if (contacts[i].photos) { for (var j=0; j<contacts[i].photos.length; j++) { $(LI).append('<img src="'+contacts[i].photos[j].value+'"/><br/>'); } }*/ } }; // onError: Failed to get the contacts // function onError(contactError) { alert('onError!'); } </script> </head> <body> <h1>Example</h1> <p>All Contacts in a list</p> <ul id="list"> </ul> </body> </html>
0
[ 2, 1132, 1136, 306, 3884, 11137, 11894, 12044, 163, 14, 64, 2203, 366, 40, 8517, 3218, 1780, 800, 3726, 3726, 249, 3884, 25, 2293, 20, 788, 21, 968, 16, 11894, 429, 29, 66, 8517, 18, 15, 1132, 2116, 17, 22234, 18, 13, 5, 25445, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Having trouble with explode() in uploadify.php === I have this snippet from my uploadify.php: if (!empty($_FILES)) { $name = $_FILES['Filedata']['name']; $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $targetFolder; $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name']; $path = pathinfo($targetFile); // this portion here will be true if and only if the file name of the uploaded file does not contain '.', except of course the dot(.) before the file extension $count = 1; list( $filename, $ext) = explode( '.', $name, ); $newTargetFile = $targetFolder . $filename . '.' . $ext; while( file_exists( $newTargetFile)) { $newTargetFile = $targetFolder . $filename . '(' . ++$count . ')' . '.' . $ext; } // Validate the file type $fileTypes = array('pdf'); // File extensions $fileParts = pathinfo($_FILES['Filedata']['name']); if (in_array($fileParts['extension'],$fileTypes)) { move_uploaded_file($tempFile,$newTargetFile); echo $newTargetFile; } else { echo 'Invalid file type.'; } return $newTargetFile; } Basically this is quite working. Uploading the file and getting the path of the file which will then be inserted on the database and so on. But, I tried uploading a file which file name looks like this, filename.1.5.3.pdf and when succesfully uploaded, the file name then became `filename` alone, without having the file extension and not to mention the file name is not complete. From what I understood, the problem lies on my explode(). It exploded the string having the delimiter `'.'` and then assigns it to the variables. What will I do to make the `explode()` cut the string into two where the first half is the filename and the second is the file extension? PLease help.
0
[ 2, 452, 2572, 29, 13383, 5, 6, 19, 71, 8294, 8612, 9, 26120, 800, 3726, 3726, 31, 57, 48, 13, 29061, 37, 51, 71, 8294, 8612, 9, 26120, 45, 100, 13, 5, 187, 26542, 5, 4403, 1, 16877, 18, 6, 6, 13, 1, 5579, 7259, 800, 5579, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does 2>&1 need to come before a | (pipe) but after a "> myfile" (redirect to file)? === When combining stderr with stdout, why does `2>&1` need to come before a `|` (pipe) but after a `> myfile` (redirect to file)? To redirect stderr to stdout for file output: echo > myfile 2>&1 To redirect stderr to stdout for a pipe: echo 2>&1 | less <br><br> My assumption was that I could just do: echo | less 2>&1 and it would work, but it doesn't. Why not?
0
[ 2, 483, 630, 172, 1, 1569, 165, 376, 20, 340, 115, 21, 13, 1, 13, 5, 15185, 6, 47, 75, 21, 13, 7, 1, 51, 16877, 7, 13, 5, 99, 14706, 20, 3893, 6, 60, 800, 3726, 3726, 76, 12803, 354, 1157, 139, 29, 354, 43, 1320, 15, 483...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Zend_Form_Element_Select default value === In my form, I want to set the selected (default) value for a select element. However, using `setDefaults` is not working for me. Here is my code: $gender = new Zend_Form_Element_Select('sltGender'); $gender->setMultiOptions(array( -1 => 'Gender', 0 => 'Female', 1 => 'Male' )) ->addValidator(new Zend_Validate_Int(), false) ->addValidator(new Zend_Validate_GreaterThan(-1), false); $this->setDefaults(array( 'sltGender' => 0 )); $this->addElement($gender); My controller is simply assigning the form to a view variable which just displays the form. It works by using `$gender->setValue(0)`, but it would be easier to set them all at once with an array of default values. Am I misunderstanding something here? Also, where is the Zend Framework documentation for classes and methods? I am looking for something similar to the [Java documentation][1]. The best I could find is [this one][2], but I don't like it - especially because every time I try to search, it crashes. [1]: http://docs.oracle.com/javase/6/docs/api/ [2]: http://framework.zend.com/apidoc/core/
0
[ 2, 10526, 43, 1, 4190, 1, 27567, 1, 18, 16964, 12838, 1923, 800, 3726, 3726, 19, 51, 505, 15, 31, 259, 20, 309, 14, 1704, 13, 5, 13862, 9708, 6, 1923, 26, 21, 5407, 4520, 9, 207, 15, 568, 13, 1, 3554, 13862, 9708, 18, 1, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tie DIV element to overflow scrollbar === I'm trying to create a datagrid table that will allow me to fix the header. I have placed the table within two DIV elements and fixed the THEAD portion of the table. I populate the table dynamically and there can be a different number of columns and may have different widths each time. <DIV style="position: relative; width="500px"> <DIV style="height:105px; overflow: auto;"> <TABLE width="502px"> <THEAD> <TR style="left:-1px;top: 0;position: absolute;"> ... header content ... </TR> </THEAD> <TBODY> ... data columns ... </TBODY> </TABLE> </DIV> </DIV> The solution works well for the horizontal overflow. However, I'm struggling with the vertical overflow. Because I fixed the THEADs TR element, if my table exceeds the DIV width, the vertical scrollbar appears and I can scroll the data vertically, but the titles are static and don't scroll. I was thinking that I might be able to somehow scroll the table header using jquery if I could get the id/name of the dynamically created scrollbar, but I don't know if this is the right solution or if it is even possible. Please advise and thanks in advance.
0
[ 2, 3795, 13, 12916, 4520, 20, 20285, 12159, 1850, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 1054, 16375, 859, 30, 129, 1655, 55, 20, 6098, 14, 157, 106, 9, 31, 57, 1037, 14, 859, 363, 81, 13, 12916, 2065, 17, 3535, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows CLI equivalent to Linux lesser than symbol? === This is my first post and I'm already apologetic as this may be too simple of a question. I'm starting to teach myself SQL and the super guide I'm following (http://sql.learncodethehardway.org) uses linux commands while I'm trying to learn on a Windows PC. The author uses the linux command < to send inputs from a text file on the right to the program on the left. Is there an equivalent to this command in Windows PowerShell? I googled the heck out of it and searched as much as I could here but couldn't find an answer. Thanks for your assistance!
0
[ 2, 1936, 19391, 4602, 20, 13024, 8051, 119, 4678, 60, 800, 3726, 3726, 48, 25, 51, 64, 678, 17, 31, 22, 79, 614, 22796, 28, 48, 123, 44, 266, 1935, 16, 21, 1301, 9, 31, 22, 79, 1422, 20, 5348, 992, 4444, 255, 17, 14, 1026, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP exec() with double quote argument === I've been having trouble running a command using PHP's exec() function on Windows. Per a comment on PHP's site on [exec()](http://php.net/manual/en/function.exec.php): >In Windows, exec() issues an internal call to "cmd /c your_command". My command looks like: "path\to\program.exe" -flag1 attribute1 -flag2 attribute2 -flag3 "attribute3 attribute4" Under regular execution of this command in my local command prompt, without the /c flag, the command runs fine. However, with the introduction of the /c flag, command prompt tells me that "The system cannot find the path specified." I think the command prompt is interpreting the double-quoted argument as a path to another file, but that's the furthest I've gotten with this problem. Does anybody have any ideas on how to get past this? Thanks!
0
[ 2, 13, 26120, 1396, 3319, 5, 6, 29, 1494, 16371, 5476, 800, 3726, 3726, 31, 22, 195, 74, 452, 2572, 946, 21, 1202, 568, 13, 26120, 22, 18, 1396, 3319, 5, 6, 1990, 27, 1936, 9, 416, 21, 6484, 27, 13, 26120, 22, 18, 689, 27, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Maintaining consistency between downscaled representation and real world data? === I have inherited a project written in jQuery that allows users to drag and drop items (draggable divs) onto a page (a bigger div). The page is draggable and resizable and items may be placed freely or snapped to each other and the edge of the page. Items cannot hang off the edge of the page or overlap. The data to create these items is read in from another program. Each item has a "real" integer width and height with units of 1/10mm's. To create the divs representing these items these "real units" are converted to pixels using a scaling factor (currently 50%, we'd like to make it dynamic in the future so users can zoom in and out). When the user is satisfied with the placement of items on the page they can then export their design. The x,y pixel placement of the items relative to the top left corner of the page is converted back to "real units" using the same scaling factor. Items need to snap to a 5x5 real unit (0.5mm) grid. Obviously this is impossible because 5 real units = 2.5px, although we'd like this to work regardless of scale factor. What is the easiest way to go back and forth between real units and pixels, making sure that the real units are always on the grid, while keeping the pixel representation consistent? Can this be done while still leaning on the jQuery draggable/droppable/resizable classes or am I better off rewriting the whole thing?
0
[ 2, 8215, 22061, 128, 125, 5093, 43, 5442, 17, 683, 126, 1054, 60, 800, 3726, 3726, 31, 57, 7179, 21, 669, 642, 19, 487, 8190, 93, 30, 2965, 3878, 20, 5501, 17, 2804, 3755, 13, 5, 3030, 4572, 579, 13, 12916, 18, 6, 1204, 21, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
XCode unit tests asynchronous test === I use unit test. Also I use asynchronous requests for retrive data from server. My questions is how can I test this request, cause now my tests work without waiting retriving data. I using ASIHTTPRequest for get data from the server. There is how I check my request - (void)testSignIn { self.request = [[Requests alloc] init]; [self.request signInWithEmail:@"some.email@gmail.com" andPassword:@"123456"]; } Here I have a problem. If in this method I will insert STFail befaore I get response it will complete with error in each time (because retrive data will take it some time and this is not a synchronize reuest) How to resolve this problem?
0
[ 2, 993, 9375, 1237, 4894, 21, 16023, 1291, 1289, 800, 3726, 3726, 31, 275, 1237, 1289, 9, 67, 31, 275, 21, 16023, 1291, 12279, 26, 302, 3367, 195, 1054, 37, 8128, 9, 51, 2346, 25, 184, 92, 31, 1289, 48, 3772, 15, 1679, 130, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Synchronous external JS loading with zombie.js === The problem: I'm using zombie.js to test my client-side javascript, but I am running into a problem. Zombie.js does not provide synchronous <script> tag execution, and, in fact seems to not execute external JS files at all. A basic test confirms this: <script type="text/javascript" src="test1.js"></script> <script type="text/javascript" src="test2.js"></script> <script type="text/javascript" src="test3.js"></script> <script type="text/javascript"> console.log("Inline javascript."); </script> Each test#.js contains a single line: `console.log("TEST#.JS");` When I render this in a regular browser, the console displays the expected: TEST1.JS TEST2.JS TEST3.JS Inline javascript. But when I run it with zombie.js, I only see a single line `Inline javascript.` Here's what I have tried to get around the issue: 1. using document.createElement to dynamically append a script tag to the document 2. using document.write to add the script block into the html 3. using a setTimeout on `console.log("Inline javascript") in combination with 1) and 2) to give the test scripts some time to load. Is there any way to resolve this issue, besides placing the JS code from all my external JS files into a huge script block? Thanks!
0
[ 2, 13, 16023, 1291, 4886, 487, 18, 12797, 29, 13007, 9, 728, 18, 800, 3726, 3726, 14, 1448, 45, 31, 22, 79, 568, 13007, 9, 728, 18, 20, 1289, 51, 6819, 8, 1416, 8247, 8741, 15, 47, 31, 589, 946, 77, 21, 1448, 9, 13007, 9, 72...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ondestory is not called after pressing the back button === I have an activity1(inside a tabhost) that will call another activity(activity2) when an event happens. And the activity2 will call another activity(activity3) when other event happen. Then the activity2 and 3 will finish() themselves and go back to activity1. My problem is, if I am on activity1, and press the back button, activitiy1 will get destory() properly, which make sense. But when I trigger events and go to activity2 or activity3, then finish the event and go back to activity1, then when I press back button, the activity1 didn't get destory() properly, so next time when i enter my app again, it will crash. Here is my codes: activity1: public void onClick(View v) { Intent feedbackintent = new Intent(StartActivity.this, //activity1 calling activity2 FeedBackActivity.class); startActivity(feedbackintent); activity2: public void onClick(View v) { Intent intent2 = new Intent(FeedBackActivity.this, //act2 called act3, and finish act2 itself SaveNewRecord.class); startActivity(intent2); finish(); } activity3: savesomething...() //act3 do something and finish itself and go back to act1 finish();
0
[ 2, 27, 546, 4416, 25, 52, 227, 75, 7196, 14, 97, 5167, 800, 3726, 3726, 31, 57, 40, 2358, 165, 5, 108, 1416, 21, 6523, 11694, 6, 30, 129, 645, 226, 2358, 5, 19348, 135, 6, 76, 40, 807, 5531, 9, 17, 14, 2358, 135, 129, 645, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In a nested loop, should Parallel.For be used on the outer or inner loop? === I'm shifting some code from .NET 2 to 4 and making use of TPL among other things. Although I'm sure this question must have been asked somewhere on SO, I could not find it. I know that over-nesting TPL tasks can be detrimental to performance. for (int y=0; y < h; y++) for (int x=0; x < w; x++) grid [x, y] = ((x + 1) * (y + 1)); Would you substitute the outer or inner loop above to TPL and why? And what if there were an additional level of nesting?
0
[ 2, 19, 21, 5618, 69, 5293, 15, 378, 3821, 9, 1106, 44, 147, 27, 14, 4896, 54, 3754, 5293, 60, 800, 3726, 3726, 31, 22, 79, 10255, 109, 1797, 37, 13, 9, 2328, 172, 20, 268, 17, 544, 275, 16, 13, 38, 5727, 497, 89, 564, 9, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Apache ActiveMQ fall back mechnism === I am using Apache Active MQ with Spring..... the problem I am facing is that I am creating producer on one machine let say Machine1 and I am creating one consumer on second machine let say Machine2... I am creating producer on Machine1 by calling a simple servlet call.... and then create a consumer on Machine2.... Problem I am facing is that suppose in anyway if my producer is not able to send any data packet in specified time duration then I want to delete my consumer and Queue from Machine2... Is there anyway I can set my Consumer and Queue to get auto delete and perform some business logic if I do not get any packet from producer in a specified time duration.... connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER,ActiveMQConnection.DEFAULT_PASSWORD,ConnectorURL); connection = connectionFactory.createConnection(); connection.start(); session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE); destination = session.createQueue(queueID+""); connection = connectionFactory.createConnection(); connection.start(); consumer = session.createConsumer(destination); basically this code create consumer for my application....then I assign this consumer to my application listener that listen if producer send any message to consumer.... ScenarioExecutionQueueListenerImpl executionQueueListener = new ScenarioExecutionQueueListenerImpl(scenario,result, host); beanFactory.autowireBean(executionQueueListener); connection.setExceptionListener(executionQueueListener); Message message = consumer.receive(); consumer.setMessageListener(executionQueueListener); executionQueueListener.setConsumer(consumer); executionQueueListener.onMessage(message);
0
[ 2, 17140, 1348, 79, 1251, 1080, 97, 55, 673, 103, 756, 800, 3726, 3726, 31, 589, 568, 17140, 1348, 307, 1251, 29, 1573, 9, 9, 9, 9, 9, 14, 1448, 31, 589, 4325, 25, 30, 31, 589, 2936, 1421, 27, 53, 1940, 408, 395, 1940, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
VirtualBox not running on Ubuntu === I wished to install virtualbox on ubuntu 11.10. I installed it from ubuntu software center. It was installed successfully on my PC. So I tried to open it but it didn't work. I rebooted the system, although it was displaying in the software installed list, yet it didn't work again. I uninstalled it and again tried the same through command-line as well. Still the same problem was there. VirtualBox is actually installed on the system but is not able to run neither it is displaying any unusual behavior or event. Please help me regarding this issue. Thanks in advance.
2
[ 2, 6599, 5309, 52, 946, 27, 287, 12968, 2473, 800, 3726, 3726, 31, 5098, 20, 16146, 6599, 5309, 27, 287, 12968, 2473, 547, 9, 1036, 9, 31, 4066, 32, 37, 287, 12968, 2473, 2306, 459, 9, 32, 23, 4066, 3673, 27, 51, 5168, 9, 86, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Acces path of audio files stored in native ipod application of iPhone === I have built an iPhone application whereby I want to upload video, images and audio stored in user's iPhone to a server. I have successfully done this for video and images stored in photo library. The code for this is as follows: imageData = UIImageJPEGRepresentation(image.image, 90); NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; if (image_selected) { stringForImagePathToUpload = [[NSString alloc]initWithFormat:@"..."]; [request setURL:[NSURL URLWithString:stringForImagePathToUpload]]; }else if (video_selected){ stringForVideoPathToUpload = [[NSString alloc]initWithFormat:@"..."]; [request setURL:[NSURL URLWithString:stringForVideoPathToUpload]]; } [request setHTTPMethod:@"POST"]; NSString *boundary = [NSString stringWithString:@"*****"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; if (image_selected) { [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"uploadedfile\";filename=\"%@"".jpg""\r\n\r\n", imageTitle.text] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imageData]]; }else if (video_selected){ NSFileHandle *file = [NSFileHandle fileHandleForReadingFromURL:videoURL error:nil]; NSData *data = [file readDataToEndOfFile]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"uploadedfile\";filename=\"%@"".m4v""\r\n\r\n", imageTitle.text] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:data]]; } [body appendData:[[NSString stringWithFormat:@"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; /* setting the body of the post to the reqeust */ [request setHTTPBody:body]; /* setting up the connection to the web*/ NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]autorelease]; NSLog(@"Content uploaded %@", returnString); Now, I found ot the audio files get stored in the ipod application of the iPhone. I want to know if I can access the path to this audio like i did for images and videos from photo library. If it is possible to access the audio files, please help me to know how to access them. Thank you in advance.
0
[ 2, 7602, 160, 2013, 16, 4023, 6488, 8214, 19, 1275, 31, 10670, 3010, 16, 21024, 800, 3726, 3726, 31, 57, 392, 40, 21024, 3010, 15630, 31, 259, 20, 71, 8294, 763, 15, 3502, 17, 4023, 8214, 19, 4155, 22, 18, 21024, 20, 21, 8128, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to dynamically build a tree structure,i code is as shown below:-I am customising my tree structure === ----in my view..i get all pages--- <% for page in @pages%> <li id="<%= page.id%>_page"> <div class="link"> #my attributes for the div </div> **#here i got the all siblings of that page...but here the structure is of just two levels..i need upto n-levels** <% @childs = page.*descendants* %> <% if !@childs.nil? && !@childs.empty? %> <% for child in @childs%> <ol class="child"> <li id="<%= child.id%>_page"> <div class="link"> #my attributes for the div </div> </li> </ol> <%end%> <%end%> </li> <%end%> **I am using nested set and want the structure in this way..** page1 page 2 page 3 page 3.1 page 3.2 page3.4 ...so on to last child page 4 page 5 ....so on to N-levels...**
0
[ 2, 184, 20, 7782, 1326, 1895, 21, 1541, 1411, 15, 49, 1797, 25, 28, 1721, 1021, 45, 8, 49, 589, 5816, 7552, 51, 1541, 1411, 800, 3726, 3726, 13, 8, 8, 8, 8, 108, 51, 1418, 9, 9, 49, 164, 65, 4434, 8, 8, 8, 13, 1, 11881, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get new view from clicking barbuttonitem? === I have made a barbuttonitem programmatically on a toolbar overlay. All of this appears when my camera is accessed. The button functions fine and the selector is fully capable of calling it. Here's the overlay in .m , take a look at the doneButton selector. - (UIView*)CommomOverlay { //Both of the 428 values stretch the overlay bottom to top for overlay function. It doesn't cover it. UIView* view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,420)]; UIImageView *FrameImg = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,420)]; [FrameImg setImage:[UIImage imageNamed:@"newGraphicOverlay.png"]]; FrameImg.userInteractionEnabled = YES; UIToolbar *myToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 428, 320, 50)]; UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneButtonPressed)]; [myToolBar setItems:[NSArray arrayWithObjects: cancelButton, flexiSpace2, flexiSpace, doneButton, nil] animated:YES]; [view addSubview:FrameImg]; [view addSubview:myToolBar]; return view; } Here's method I'm using for my void function. //NewViewController is the nib I want to bring up when done is clicked. -(void)doneButtonPressed { NewViewController *UIView = [[NewViewController alloc] initWithNibName:nil bundle:nil]; UIView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:UIView animated:NO]; [UIView release]; NSLog(@"Acknowledged!"); } The button is being called, but nothing happens. As you can see I added an NSLog function to see whether it was being called or not. "Acknowledged" shows up in the log when the button is clicked, so it's not a problem with the selector. The app doesn't crash when i use the button either, which should occur had I done some heavily faulty coding (in fact I don't even get any warnings about it), as far as Xcode is considered, everything is fine which, needless to say isn't. I also have my .h files of NewViewController in place correctly in the view controller in which this code is being implemented.
0
[ 2, 184, 20, 164, 78, 1418, 37, 25590, 748, 811, 444, 2119, 79, 60, 800, 3726, 3726, 31, 57, 117, 21, 748, 811, 444, 2119, 79, 625, 6732, 1326, 27, 21, 5607, 1850, 84, 4414, 9, 65, 16, 48, 1780, 76, 51, 3336, 25, 12904, 9, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to run Rails console with pager like less? === I'm using the [awesome_print][1] to prettify objects to print. But when I use it for many objects, I can't see all of them because they are too many to display in terminal scroll. I would like to use a pager like `less` in rails console. Is there a way? [1]: https://github.com/michaeldv/awesome_print/
0
[ 2, 25, 32, 938, 20, 485, 2240, 18, 8650, 29, 2478, 139, 101, 787, 60, 800, 3726, 3726, 31, 22, 79, 568, 14, 636, 58, 458, 3220, 1, 10299, 500, 2558, 165, 500, 20, 782, 5249, 9596, 3916, 20, 4793, 9, 47, 76, 31, 275, 32, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating and ajusting a UIButton within a cell === I want to create a button (not dynamically) bellow the last row in the table. All the rows and sections are fixed. Do I have to create another section and row just to add a button? and if yes how can I ajust the button to the same width and curvature of the cell? Here is what I did. I create a specific section for the button and one row for it. }else if(indexPath.section ==2) { UIButton *cellButton = [UIButton buttonWithType:UIButtonTypeCustom]; [cellButton setFrame:CGRectMake(0.0f, 5.0f, cell.frame.size.width, 44.0f)]; // not filling the round parts of the cell [cellButton setBackgroundColor: [UIColor yellowColor]]; [cellButton setTitle:@"test" forState:UIControlStateNormal]; [cell.contentView addSubview:cellButton]; } return cell;
0
[ 2, 2936, 17, 21, 2759, 68, 21, 13, 5661, 811, 444, 363, 21, 1667, 800, 3726, 3726, 31, 259, 20, 1600, 21, 5167, 13, 5, 1270, 7782, 1326, 6, 23040, 14, 236, 3131, 19, 14, 859, 9, 65, 14, 11295, 17, 4501, 50, 3535, 9, 107, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Repost using graph pai === how do I share a friend's post on my own wall ? I don't want to copy the original post's text and create a new post, becuase I need my friend to see that I shared his post. please post your suggestion if you have solutions;
0
[ 2, 302, 6962, 568, 7210, 13, 11541, 800, 3726, 3726, 184, 107, 31, 1891, 21, 860, 22, 18, 678, 27, 51, 258, 769, 13, 60, 31, 221, 22, 38, 259, 20, 4344, 14, 501, 678, 22, 18, 1854, 17, 1600, 21, 78, 678, 15, 44, 3987, 6105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
fire ajax request only when user pauses in jquery UI autocomplete === I have a jQuery UI autocomplete form that fetched data from remote source, but it becomes erratic when connection is slow,(queuing up the requests, and messing up results). How we can hold request from firing until user pauses.
0
[ 2, 535, 20624, 3772, 104, 76, 4155, 6911, 18, 19, 487, 8190, 93, 13, 5661, 3108, 15990, 800, 3726, 3726, 31, 57, 21, 487, 8190, 93, 13, 5661, 3108, 15990, 505, 30, 13, 28998, 1054, 37, 5388, 1267, 15, 47, 32, 2633, 23187, 76, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ALAsset thumbnail at specific timestamp === I'm working working on an iPhone application for uploading video files to a specific platform, and one feature I would really love is to be able to present, say, ten different thumbnails for the same video for the user to pick from. The problem is, that ALAsset only provides a _thumbnail_ method, which just returns the default thumbnail. I have read through the ALAssetRepresentation and ALAsset documentation and I can't seem to find a way to get a thumbnail for a _specific_ timestamp. I guess one option would be to use something along the lines of libav to get thumbnails but that seems a little "over the top" for something like this. Can anyone help me on this one? Best regards, Nick
0
[ 2, 21, 4830, 3554, 5078, 325, 947, 35, 1903, 436, 38, 10158, 800, 3726, 3726, 31, 22, 79, 638, 638, 27, 40, 21024, 3010, 26, 71, 16866, 763, 6488, 20, 21, 1903, 2452, 15, 17, 53, 1580, 31, 83, 510, 339, 25, 20, 44, 777, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Contoso U tutorial: enrolling a student in a course and then adding the subsequent grade === Where in the Contoso University MVC tutorial do we get to enroll a student in a course, and then add the subsequent grade?
1
[ 2, 1065, 262, 656, 287, 29724, 45, 19208, 68, 21, 1209, 19, 21, 674, 17, 94, 4721, 14, 3147, 2044, 800, 3726, 3726, 113, 19, 14, 1065, 262, 656, 155, 307, 8990, 29724, 107, 95, 164, 20, 19208, 21, 1209, 19, 21, 674, 15, 17, 94...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
JMS client applications and the Business Activity Monitor === I was wondering if there was a way to connect to the Business Activity Monitor located on a WebLogic server via the client applications. I am wanting to replace the log statements in my JMS Producer/Consumer clients with BAM statements so BAM is updated with message progress/errors? I am hoping there is an API for this, but have not been successful in locating it?
0
[ 2, 487, 79, 18, 6819, 3767, 17, 14, 508, 2358, 7626, 800, 3726, 3726, 31, 23, 5712, 100, 80, 23, 21, 161, 20, 6379, 20, 14, 508, 2358, 7626, 335, 27, 21, 2741, 24268, 8128, 1197, 14, 6819, 3767, 9, 31, 589, 4638, 20, 3934, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OMP - more threads than the number of processors? === By default OpenMP directive: `opm_get_num_threads` gives number of threads equivalent to processors/cores. I have an 8 core machine, so it gives me 8 threads. Is that the maximum? Can I get more threads than 8, if I deliberately specify more than 8? Thanks
0
[ 2, 635, 2554, 13, 8, 91, 20396, 119, 14, 234, 16, 21034, 60, 800, 3726, 3726, 34, 12838, 368, 2554, 15626, 45, 13, 1, 2594, 79, 1, 3060, 1, 6336, 1, 96, 10647, 18, 1, 2352, 234, 16, 20396, 4602, 20, 21034, 118, 10375, 18, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
"Object does not support this property or method" in IE === I have looked through a lot of the other questions for this issue and I have not been able to find anything that helps my specific issue. I've tried a lot of the suggestions with no help... Here is what I am working with that is showing up with the error:
0
[ 2, 13, 7, 23793, 630, 52, 555, 48, 1354, 54, 2109, 7, 19, 13, 660, 800, 3726, 3726, 31, 57, 292, 120, 21, 865, 16, 14, 89, 2346, 26, 48, 1513, 17, 31, 57, 52, 74, 777, 20, 477, 602, 30, 7778, 51, 1903, 1513, 9, 31, 22, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to convert Unicode chars from \xXX to \xXXXX format in PHP === I have some content that is generated by the Drupal CMS that contains strings like: "... \n Proficient knowledge of \x3cstrong\x3emedical\x3c/strong\x3e terminology; typing skills at 40 wpm. Excellent communication and ... which involves access to sensitive and/or confidential \x3cstrong\x3emedical\x3c/strong\x3e information. Must demonstrate leadership skills in decision making and ..." I'm trying to transfer this data as json, but it doesn't validate. I think that's because the Unicode characters like `\x3c` may need to be in the longer 6 character format (see http://tools.ietf.org/html/rfc4627, section *2.5. - Strings*). Is this actually the problem? And if so, is there a good way to convert the format?
0
[ 2, 184, 20, 8406, 28010, 4892, 18, 37, 13, 1, 13290, 20, 13, 1, 8962, 13290, 2595, 19, 13, 26120, 800, 3726, 3726, 31, 57, 109, 2331, 30, 25, 6756, 34, 14, 15708, 6720, 2390, 18, 30, 1588, 7887, 101, 45, 13, 7, 9, 9, 9, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting Django to recognize PIL JPEG support === I am running `Django 1.4` and `PIL 1.1.7` in a `virtualenv` managed with `pip`. Whenever I upload a JPEG file via my admin interface, I get the following error: `Upload a valid image. The file you uploaded was either not an image or a corrupted image.` As many Ubuntu users have reported, on installation, PIL erronously looked in `/usr/lib/` for `libjpeg`, while its true location was in `/usr/lib/i386-linux-gnu/`. That's taken care of; I followed the answers in these posts: http://stackoverflow.com/questions/7606614/django-imagefield-upload-a-valid-image-the-file-you-uploaded-was-either-not-an http://stackoverflow.com/questions/1402002/why-cant-i-upload-jpg-files-to-my-django-app-via-admin Now the final output of installation looks as follows: -------------------------------------------------------------------- PIL 1.1.7 SETUP SUMMARY -------------------------------------------------------------------- version 1.1.7 platform linux2 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC 4.6.3] -------------------------------------------------------------------- --- TKINTER support available --- JPEG support available --- ZLIB (PNG/ZIP) support available --- FREETYPE2 support available *** LITTLECMS support not available -------------------------------------------------------------------- To add a missing option, make sure you have the required library, and set the corresponding ROOT variable in the setup.py script. To check the build, run the selftest.py script. changing mode of build/scripts-2.7/pilfile.py from 644 to 755 changing mode of build/scripts-2.7/pilfont.py from 644 to 755 changing mode of build/scripts-2.7/pilconvert.py from 644 to 755 changing mode of build/scripts-2.7/pilprint.py from 644 to 755 changing mode of build/scripts-2.7/pildriver.py from 644 to 755 changing mode of /usr/local/bin/pilfile.py to 755 changing mode of /usr/local/bin/pilfont.py to 755 changing mode of /usr/local/bin/pilconvert.py to 755 changing mode of /usr/local/bin/pilprint.py to 755 changing mode of /usr/local/bin/pildriver.py to 755 Successfully installed PIL -------------------------------------------------------------------- However, Django *still* doesn't allow me to upload anything but BMP files, which is not acceptable for this project. Unlike the user in the second link, I'm using SQLite, not Apache, so I'm not sure if this is a database problem. My suspicion is that Django is still using an old installation of PIL. The problem is that I don't know where it could be getting it from. The files in `~/.virtualenvs/project/local/lib/python2.7/site-packages` seem up-to-date to me. Any ideas?
0
[ 2, 1017, 3857, 14541, 20, 5844, 8483, 487, 20427, 555, 800, 3726, 3726, 31, 589, 946, 13, 1, 14365, 14541, 137, 9, 300, 1, 17, 13, 1, 10091, 137, 9, 165, 9, 465, 1, 19, 21, 13, 1, 8145, 2473, 4482, 20763, 1, 1471, 29, 13, 1,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pass *args to string.format in Python? === Is it possible to pass *args to string.format? I have the following function: @classmethod def __log(cls, level, component, msg, *args): """Log a message at the requested level""" logging.getLogger("local").log(level, " - ".join([component, msg.format(args)])) When I try unit test it with LogCapture I get the following: def test_logWithArgs(self): Logger.level(Logger.Level.INFO) with LogCapture(level=Logger.Level.INFO) as lc: Logger.info("MyComponent", "{0}", "TestArg") lc.check(("nggt", "INFO", "MyComponent - TestArg")) AssertionError: Sequence not as expected: same: () first: (('nggt', 'INFO', 'MyComponent - TestArg'),) second: (('nggt', 'INFO', "MyComponent - (('TestArg',),)"),)
0
[ 2, 1477, 1637, 10663, 18, 20, 3724, 9, 23588, 19, 20059, 60, 800, 3726, 3726, 25, 32, 938, 20, 1477, 1637, 10663, 18, 20, 3724, 9, 23588, 60, 31, 57, 14, 249, 1990, 45, 13, 1, 1898, 5909, 1807, 43, 6312, 13, 1, 5567, 5, 5316, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Disable animate when condition is met jQuery === This may be an easy question and perhaps I am missing something here. The desired affect would be when a user clicks on the `.left` or `.right` href tags, the `.tabs` scroller will scroll left or right by `105px` every time. This part is working. Where I am running into a road block is how to disable the animate effect when the `.tabs` div's css is at `0px` or at the end of the div. This seems like it could easily be accomplished with `offset` or `position` but both of these are giving me a different value. I believe it's because the `.tabs` div is actually centered using `magin: 0 auto`. Trying to retrieve the `css("left")` and writing a conditional `if == 0` statement is also a bust. Am I missing something here? Should I not be trying to disable the `left` button based on position? Is there an easier way to do this? $(".right").click( function () { $(".tabs").animate({ left: '-=105' }, 500); return false; }); $(".left").click( function () { $(".tabs").animate({ left: '+=105' }, 500); return false; });
0
[ 2, 1460, 579, 14487, 591, 76, 2874, 25, 798, 487, 8190, 93, 800, 3726, 3726, 48, 123, 44, 40, 2010, 1301, 17, 1774, 31, 589, 2863, 301, 235, 9, 14, 9264, 6245, 83, 44, 76, 21, 4155, 10840, 18, 27, 14, 13, 1, 9, 9742, 1, 54, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
flatten record based list/object into dataframe === I am dealing a lot with datastreams that have record-based encoding, usually in JSON. The structure of the object (i.e. the names in the JSON) are known from the API documentation, however, values are mostly optional and not present in every record. Lists can contain new lists, and the structure is sometimes quite deep. Here is a quite simple example of some GPS data: http://pastebin.com/yz6z9t25. Note that in the lower rows, the "l" object is missing due to no GPS signal. I am looking for an elegant way to flatten these objects into a dataframe. I am currently using something like this: library(RJSONIO) library(plyr) obj <- fromJSON("http://pastebin.com/raw.php?i=yz6z9t25", simplifyWithNames=FALSE, simplify=FALSE) flatdata <- lapply(obj$data, as.data.frame); mydf <- rbind.fill(flatdata) This does the job, however it is slow and a bit error prone. A problem with this approach is that I am not using my knowledge about the structure (object names) in the data; instead it is inferred from the data. This leads to problems when a certain property happens to be absent in every record, it doesn't appear in the dataframe at all, instead of a column with NA values. This can easily lead to issues downstream. Furthermore both the `as.data.frame` and `rbind.fill` make things quite slow. Any suggestions for better implementation? I would prefer a solution that always yields a dataframe with the same columns in the same order, and where only number of records varies.
0
[ 2, 1844, 1316, 571, 432, 968, 118, 23793, 77, 1054, 8361, 800, 3726, 3726, 31, 589, 5746, 21, 865, 29, 1054, 11260, 18, 30, 57, 571, 8, 1281, 19608, 15, 951, 19, 487, 528, 9, 14, 1411, 16, 14, 3095, 13, 5, 49, 9, 62, 9, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Understanding discrepancy in Javascript Design Patterns === I picked up [this book][1] a while ago to help understand how to apply my knowledge of design patterns in Java to web developement. However, I've come across an odd discrepancy in the introduction. The authors state that the following code defines a class that lets the user create animation objects: //Anim class var Anim = function(){ //code here }; Anim.prototype.start = function(){ //start code here }; Anim.prototype.stop = function() { //stop code here }; //create a new Anim object and call the start method var newAnim = new Anim(); newAnim.start(); I tried something similar with my app. //Nucleus class and addLink function var Nucleus = function(){ this.location=null; this.links = []; } //revamp object and add to link array Nucleus.prototype.addLink = function(marker){ } The above class was instanciated as a global variable via var curSpot = new Nucleus(); However, Firebug threw an error at page load stating that `Nucleus is not a constructor`, and Javascript button handling functionality was disabled. The problem was solved by changing the `Nucleus` definition to function Nucleus(){ //instance members here } and now the OO functionality works. Why does the latter example work, but the book's example throws an error? [1]:http://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X/ref=sr_1_1?ie=UTF8&qid=1340656253&sr=8-1&keywords=pro+javascript+design+patterns
0
[ 2, 3260, 3626, 99, 306, 10821, 19, 8247, 8741, 704, 6282, 800, 3726, 3726, 31, 2114, 71, 636, 1565, 360, 500, 2558, 165, 500, 21, 133, 1464, 20, 448, 1369, 184, 20, 5645, 51, 1918, 16, 704, 6282, 19, 8247, 20, 2741, 2803, 9632, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Button won't re-enable it self using Jquery === I can't figure out why my button won't re-enable it self. Any help will be most appreciated My code is as follows: $(document).ready(function() { $('#btnAdd').click(function() { // enable the "remove" button $('#btnDele').attr('disabled',''); } }); demo here: http://jsfiddle.net/ATzBA/2/
0
[ 2, 5167, 230, 22, 38, 302, 8, 219, 579, 32, 1119, 568, 487, 8190, 93, 800, 3726, 3726, 31, 92, 22, 38, 1465, 70, 483, 51, 5167, 230, 22, 38, 302, 8, 219, 579, 32, 1119, 9, 186, 448, 129, 44, 127, 13746, 51, 1797, 25, 28, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to handle a delegate previously associated with a method that now does no longer exist? === I created a duplex service (`NetTcpBinding`) like [this example][1]: I used the publish-subscribe pattern, and for each connection request from a new client, it creates a new instance of the service (containing a different callback). In this example, the callback is invoked through events and delegates. Now I would like to change this example: suppose we do not want to respond immediately to client's request, that is, suppose we want to invoke the callback method after a certain time interval. In this case I need to maintain a reference in order to invoke the method of the callback at a later time, so I could define the following delegate and the following list: public delegate void ProcessingHandler(string item, double price, double change); //... static List<ProcessingHandler> pointersToHandlers = new List<ProcessingHandler>(); In order to later invoke the method of the callback, first we should store a reference in this list just defined: pointersToHandlers.Add(callback.PriceChange); // ... When it came time to invoke the callback for all clients, simply use the following instructions: foreach(ProcessingHandler handler in pointersToHandlers) handler(new_item, new_price, new_change); Everything should work without problems, unless you disconnect any client: if any client has disconnected, the corresponding service instance is destroyed, then you lose even the callback... How can I handle this problem? [1]: http://msdn.microsoft.com/en-us/library/ms752254.aspx
0
[ 2, 184, 20, 3053, 21, 11300, 1343, 1598, 29, 21, 2109, 30, 130, 630, 90, 1045, 3182, 60, 800, 3726, 3726, 31, 679, 21, 1052, 11326, 365, 13, 5, 1, 11874, 7439, 22260, 1, 6, 101, 636, 1565, 823, 500, 2558, 165, 500, 45, 31, 147...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I exit a script in SQLPlus when an error occurs and return to the SQLPlus prompt, without disconnecting or exiting SQLPlus? === I have some scripts that get run often, always from within a connected SQLPlus session. I need a way to exit the script when an error occurs, *without* disconnecting or exiting SQLPlus itself. 100% of the time, when an error occurs, the connected DBA will need to issue one or more commands into the session. 100% of the time, when an error occurs, there are other SQLPlus statements (and thus *must* be *outside* of a `BEGIN..END;`) later on in the script that *must not* be executed or serious problems could arise. NOTE: If you suggest `WHENEVER SQLERROR EXIT` then you didn't read the above text. That will disconnect and exit SQLPlus *in addition to* the script, which is not acceptable behavior.
0
[ 2, 184, 107, 31, 4350, 21, 3884, 19, 4444, 255, 13349, 76, 40, 7019, 3690, 17, 788, 20, 14, 4444, 255, 13349, 11443, 4417, 15, 366, 29363, 68, 54, 24999, 4444, 255, 13349, 60, 800, 3726, 3726, 31, 57, 109, 17505, 30, 164, 485, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Enumerate int to match values in array c# === This is a bit confusing to describe in a title, anyway here is my problem. I have an array with int values and another int with one value. int[] weights = new int[] { 10, 15, 20 }; int weight = 28; What I would like to do is to enumerate this in a way finding out the best possible match. In the example above the selection should be 20 and 10. If my weight would have been 39 the result would have been 20 and 20. If the weight would have been 14 the best match would have been 15, and so on. Any good techniques out there handling this kind of issues other than regular foreach loops? I was thinking of retracting the largest value available in the array and check if the weight is negative, if not then lets go for the next value. This is not homework :) Thanks
0
[ 2, 26940, 62, 19, 38, 20, 730, 4070, 19, 7718, 272, 5910, 800, 3726, 3726, 48, 25, 21, 1142, 18084, 20, 4996, 19, 21, 581, 15, 2774, 235, 25, 51, 1448, 9, 31, 57, 40, 7718, 29, 19, 38, 4070, 17, 226, 19, 38, 29, 53, 1923, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CoreText with images === I want to add image in UIView using coreText and then text around image like below. eg.. Baaa img aaaa aaaa aaaaaaaa aaaaaaaa aaaaaaaa I want something like this where "img" is an image..and text start from "B".. thanks..
0
[ 2, 2884, 11969, 29, 3502, 800, 3726, 3726, 31, 259, 20, 3547, 1961, 19, 13, 5661, 4725, 568, 2884, 11969, 17, 94, 1854, 140, 1961, 101, 1021, 9, 12369, 9, 9, 22982, 58, 797, 263, 21, 22160, 21, 22160, 21, 58, 22160, 22160, 21, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Selecting List values automatically === In my search page i have a list continuing with a input box and Go button <br> I got the List value in my console but what i want is to iterate the list and enter the text(text is static) in the Input box. Evert time when list is selected it automatically searches rather to press the GO button. <br> Manually i can select a single using the below 1st line alone but how do i iterate. <br> driver.findElement(By.xpath("//*[@id='ctl00_mainContentPlaceHolder_StateDDL']")).sendKeys("LA");<br> WebElement search_list = driver.findElement(By.xpath("//*[@id='ctl00_mainContentPlaceHolder_StateDDL']")); <br> List <WebElement> li = search_list.findElements(By.tagName("option")); <br> for(int i =0; i<li.size();i++){ <br> System.out.println(li.get(i).getText()); <br> try{ <br> driver.findElement(By.xpath("//*@id='ctl00_mainContentPlaceHolder_StateDDL']")).sendKeys(li.get(i)); <br> **I can't use it as sendKeys, should be in quotes. Any option guys.** <br> driver.findElement(By.xpath("//*@id='ctl00_mainContentPlaceHolder_CityTextBox']")).sendKeys("text"); <br>
0
[ 2, 20764, 968, 4070, 7499, 800, 3726, 3726, 19, 51, 2122, 2478, 31, 57, 21, 968, 4489, 29, 21, 6367, 1649, 17, 162, 5167, 13, 1, 5145, 1, 31, 330, 14, 968, 1923, 19, 51, 8650, 47, 98, 31, 259, 25, 20, 32, 106, 1373, 14, 968,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to compare two tables in linq to sql? === I am trying to compare two tables (i.e values, count, etc..) in linq to sql but I am not getting the way to achieve it. I tried the following, Table1.Any(i => i.itemNo == Table2.itemNo) It gives error. Could you please help me? Thanks in Advance.
0
[ 2, 184, 20, 11590, 81, 7484, 19, 6294, 1251, 20, 4444, 255, 60, 800, 3726, 3726, 31, 589, 749, 20, 11590, 81, 7484, 13, 5, 49, 9, 62, 4070, 15, 2468, 15, 2722, 9, 9, 6, 19, 6294, 1251, 20, 4444, 255, 47, 31, 589, 52, 1017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is 'Protection' an acceptable Java class name === I'm trying my best to write good readable, code, but often have doubts in my work! I'm creating some code to check the status of some protected software, and have created a class which has methods to check whether the software in use is licensed (there is a separate Licensing class). I've named the class 'Protection', which is currently accessed, via the creation of an appProtect object. The methods in the class allow to check a number of things about the application, in order to confirm that it is in fact licensed for use. Is 'Protection' an acceptable name for such a class? I read somewhere that if you have to think to long in names of methods, classes, objects etc, then perhaps you may not be coding in an Object Oriented way. I've spent a lot of time thinking about this before making this post, which has lead me to doubt the suitability of the name! In creating (and proof reading) this post, I'm starting to seriously doubt my work so far. I'm also thinking I should probably rename the object to applicationProtection rather than appProtect (though am open to any comments on this too?). I'm posting non the less, in the hope that I'll learn something from others views/opinions, even if they're simply confirming I've "done it wrong"!
2
[ 2, 25, 13, 22, 16265, 872, 22, 40, 12513, 8247, 718, 204, 800, 3726, 3726, 31, 22, 79, 749, 51, 246, 20, 2757, 254, 1302, 579, 15, 1797, 15, 47, 478, 57, 16313, 19, 51, 170, 187, 31, 22, 79, 2936, 109, 1797, 20, 2631, 14, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
listview Layout in android === In my application i have 2 databases.My requirement is i have to show this 2 databases side by side in a single activity.I don't know exactly how many data are there in database.Is which way is easy for this?Whether i have to use Listview or table Layout to get this.If it is listview means how can split the screen to show two databases(One more thing is i cant place 2 list views y because if i scroll the screen both the part should scroll).Anybody please help me.I am looking for this for past 2 days,I cant get correct solution.
0
[ 2, 968, 4725, 9106, 19, 13005, 800, 3726, 3726, 19, 51, 3010, 31, 57, 172, 6018, 18, 9, 915, 8981, 25, 31, 57, 20, 298, 48, 172, 6018, 18, 270, 34, 270, 19, 21, 345, 2358, 9, 49, 221, 22, 38, 143, 1890, 184, 151, 1054, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
griedview binding === I got a combobox that I bind to database and when I select a order from combobox it must display OrderDetails and Customer Dfetails on seperate gridviews i achieved that now i want to have an "All" option in that combobox when ALL is selected it display all ordersDetails and Customer Details from database.Note I got tables which are ordersDetails and Customer Details they have foreign key from Orders table.I retrieve data using a foreign key but now option ALL doesnt have foreign key thats the problem that i am facing.i have binded my griedviews with datasource My code for select combobox binding SELECT [ID], [orderName] , from Orders my gridview select code that display selected item on gridview according to what is selected from combobox SELECT CustomerName,CustomerName, FROM Orders inner join OrderDetails on Orders .ID = OrderDetails .orderRef WHERE ID = @.orderRef
0
[ 2, 13, 6702, 69, 4725, 8728, 800, 3726, 3726, 31, 330, 21, 22621, 5309, 30, 31, 10193, 20, 6018, 17, 76, 31, 5407, 21, 389, 37, 22621, 5309, 32, 491, 3042, 389, 546, 8682, 18, 17, 7705, 13, 43, 3739, 8682, 18, 27, 10332, 106, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mail integration cancel === - (void) showMail { [[CCDirector sharedDirector] pause]; NSString*myemail=@"sirano0629@me.com"; NSArray*email=[[NSArray alloc]initWithObjects:myemail, nil]; if([MFMailComposeViewController canSendMail]) { mail = [[MFMailComposeViewController alloc] init]; [mail setSubject:[NSString stringWithFormat:@"건의 및 문의"]]; [mail setToRecipients:email]; [self presentModalViewController:mail animated:YES]; [mail release]; } } - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { [mail dismissModalViewControllerAnimated:YES]; mail.view.hidden=YES; [[CCDirector sharedDirector] resume]; //return to previous scene [[CCDirector sharedDirector] replaceScene:[HelloWorldLayer scene]]; } here is my code for email integration within app.. first that open email view is successful but after I press send or cancel, the view has not gone away... can u guys please help to go throw it...
0
[ 2, 4216, 8078, 14815, 800, 3726, 3726, 13, 8, 13, 5, 2625, 1340, 6, 298, 8079, 13, 1, 636, 2558, 3384, 10197, 2592, 10197, 500, 6911, 12660, 13, 2172, 11130, 2483, 915, 62, 8079, 3726, 1, 7, 9982, 3571, 3370, 2738, 1, 790, 9, 96...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
progress bar and requiredfieldvalidator === I am using progressbar and required field validator. But when i click on the submit button. the progressbar and validator message both shown. my code is function ShowDiv() { setTimeout('document.getElementById("PB").style.display ="inline";', 500); } </script> <asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="ValGrpSave" onclick="btnSubmit_Click" OnClientClick="ShowDiv()" />
0
[ 2, 3455, 748, 17, 1390, 1109, 18506, 43, 3457, 800, 3726, 3726, 31, 589, 568, 3455, 1850, 17, 1390, 575, 7394, 3457, 9, 47, 76, 31, 10840, 27, 14, 12298, 5167, 9, 14, 3455, 1850, 17, 7394, 3457, 2802, 156, 1721, 9, 51, 1797, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which Text To Speech should i use in iOS? === Now i am confusing about Text To Speech Engine for iOS. When i search in internet, i found two kinds of Text To Speech Engine for iOS. These are iSpeech and Dragon Mobile SDK from Nuance. i have to use Text To Speech for multiple languages and also have to use Speech To Text. I want to know which engine is better and which is faster? Thanks in advance.
0
[ 2, 56, 1854, 20, 2974, 378, 31, 275, 19, 13, 7760, 60, 800, 3726, 3726, 130, 31, 589, 18084, 88, 1854, 20, 2974, 1406, 26, 13, 7760, 9, 76, 31, 2122, 19, 2620, 15, 31, 216, 81, 8623, 16, 1854, 20, 2974, 1406, 26, 13, 7760, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Delphi PeekMessage access violation Delphi 2009 Windows API === Periodically getting an access violation from a PeekMessage. This is not my call to PeekMessage, it's from Application.Run. Stack trace from MadExcept shows Application.Run calling PeekMessage which in turn is calling kiUserCallBackDispatcher. Delphi 2009. Stack trace is: callstack crc : $0202d0d7, $a09d5671, $3195cde5 exception number : 1 exception class : EAccessViolation exception message : Access violation at address 0202D0D7. Write of address 00310038. main thread ($1650): 0202d0d7 +000 ??? 7c90e470 +010 ntdll.dll KiUserCallbackDispatcher 7e4193fd +162 USER32.dll PeekMessageW 0050b2a4 +01c infraWrapper90.exe Forms TApplication.ProcessMessage 0050b3ea +00a infraWrapper90.exe Forms TApplication.HandleMessage 0050b715 +0c9 infraWrapper90.exe Forms TApplication.Run I assume this means that PeekMessage() is making a call to one of one my Window Procedures to process a message, and it can't find that Window procedure. At first I didn't see why Peekmessage would be calling any window procedure as it is just peeking at messages but from futher reading on here and elsewhere I think I see that: PeekMessage() will process SendMessages() sent from other threads PeekMessage() will sometimes handle Paint messages Someone else has reported seeing PeekMessage calling a Window procedure for other messages, such as WM_ERASEBKGND. From MSDN: <<During this call, the system delivers pending, nonqueued messages, that is, messages sent to windows owned by the calling thread using the SendMessage, SendMessageCallback, SendMessageTimeout, or SendNotifyMessage function>> Which I don't quite understand as I thought SendMessage() calls were handled immediately. Someone else seemed to think this only applied when the SendMessage was from another thread. I can't duplicate this in a stand alone project. From the error it appears as if PeekMessage is calling a Window Procedure which no longer exists - but I've tried doing this myself by intentionally destroying a form then doing a SendMessage() and Postmessage() to an invalid window handle and Windows just seems to ignore it. I've tried posting messages from a form's destructor to itself and all sorts of other things but I can't get it to fail. Any suggestions as to anything else to check? Thanks in advance. Rick
0
[ 2, 23030, 14918, 3845, 18, 1303, 1381, 12120, 23030, 588, 1936, 21, 2159, 800, 3726, 3726, 19886, 1017, 40, 1381, 12120, 37, 21, 14918, 3845, 18, 1303, 9, 48, 25, 52, 51, 645, 20, 14918, 3845, 18, 1303, 15, 32, 22, 18, 37, 3010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Localization of Date formats in Django === I am working on an app that should support different languages and flavours such as American, British and German. Now looking at the <a href="https://docs.djangoproject.com/en/1.4/ref/contrib/localflavor/#united-states-of-america-us">documentation</a>, e.g. there seem to be no direct support for American date format. It seems this part needs to be done by hand. So I kept digging into the documentation and found <a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#date">this:</a> {{ value|date:"D d M Y" }} This doesn't seem to work well with forms though, when I tried this in my code: {{form.birth_date|date:"D d M Y"}} It seems the formatting needs to be set right at the form field itself. More research showed a similar question was asked in Stackoverflow in <a href="http://stackoverflow.com/questions/1453413/making-django-forms-datefield-show-use-local-date-format">2009:</a> This solution could work, but it looks quite engaging for such a simple problem. Django has come a long way since 2009, so I wonder if there is a better way of doing it right into ModelForm? Let say we have the following code: **Model:** class ConversationHistory(models.Model): contact_date = models.DateField(_(u"Conversation Date")) **Form:** class ConversationForm(ModelForm): class Meta: model = ConversationHistory Could I just add the following to ModelForm: widgets = { 'contact_date': forms.DateInput(format='M d, Y') } is this the right way of localization? What if I wanted to change the format to Brtish English or German? So I have the feeling I am missing here something... Many Thanks,
0
[ 2, 375, 1829, 16, 1231, 13767, 19, 3857, 14541, 800, 3726, 3726, 31, 589, 638, 27, 40, 4865, 30, 378, 555, 421, 2556, 17, 22408, 18, 145, 28, 189, 15, 388, 17, 548, 9, 130, 699, 35, 14, 13, 1, 58, 746, 14057, 3726, 7, 21127, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JQuery to get label for checkbox in a CheckBoxList .next() not supported error === Ignoring how I got to this (I have rolled up various function calls to simplify the example), why do I get *Object doesn't support this property or method* for the `next()` call of the 4th line below? JQuery to string together all selected items label text: - var cbs = $('#controlId :checkbox'); // Get all checkboxes for the specified control id var rest = cbs.slice(1); // Get all items except the first var checked = rest.filter(':checked'); // Get all checked items var result = checked.get(0).next('label').text(); // Error here getting first label text for (var i = 1; i < checked.length; i++) { result = result + ', ' + checked.get(i).next('label').text(); } HTML is generated by ASP.Net for a `CheckBoxList` and looks like: - <table id="controlId"> <TBODY> <TR> <TD> <INPUT id=MainContent_DropDownCheckBoxList4_checkBoxList_0 value=ALL type=checkbox> <LABEL for=MainContent_DropDownCheckBoxList4_checkBoxList_0>All</LABEL></TD> </TR> <TR> <TD> <INPUT id=MainContent_DropDownCheckBoxList4_checkBoxList_1value=0 type=checkbox> <LABEL for=MainContent_DropDownCheckBoxList4_checkBoxList_1>Item 0</LABEL></TD></TR> <TR> <TD> <INPUT id=MainContent_DropDownCheckBoxList4_checkBoxList_2 type=checkbox> <LABEL for=MainContent_DropDownCheckBoxList4_checkBoxList_2>Item 1</LABEL> </TD> </TR> </TBODY> </TABLE> What is the correct way to get the label text for the checkboxes (*using the above style of code*)? **Please do not provide answers using selectors that start back at $('#controlId')**
0
[ 2, 487, 8190, 93, 20, 164, 1899, 26, 2631, 5309, 19, 21, 2631, 5309, 5739, 13, 9, 20021, 5, 6, 52, 1827, 7019, 800, 3726, 3726, 9321, 184, 31, 330, 20, 48, 13, 5, 49, 57, 2958, 71, 617, 1990, 3029, 20, 28257, 14, 823, 6, 15,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
load wcf hosts configurations from a different files === My application is self-hosting several wcf services. This creates quite a mess in the application configuration file and quite difficult to maintain. I would like to find a way to separate those configurations, so that each wcf services will have it's own configuration file. Thank you
0
[ 2, 6305, 11801, 410, 5397, 8091, 18, 37, 21, 421, 6488, 800, 3726, 3726, 51, 3010, 25, 1119, 8, 11694, 68, 238, 11801, 410, 687, 9, 48, 9695, 1450, 21, 3957, 19, 14, 3010, 8091, 3893, 17, 1450, 1956, 20, 4027, 9, 31, 83, 101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google search like text box === am want to create a text box like google search text box... What i have tried is When entered a character, using AJAX the words starting with that word will be displayed in a div its working fine but i want that it should work exactly like google search box.. Now the arrow keys are not working only by clicking the text will be selected MY CODE <style> #resultDiv { width:154px; position:absolute; left:121px; top:30px; } p { padding:0px; margin:0px; } #resultDiv p:hover { background-color:#999; } </style> <script type="text/javascript"> $(document).ready(function(e) { $('#resultDiv p').live('click',function(){ var value = $(this).text(); $('#word').val(value); }); }); </script> </head> <body> <form action="" method="post"> <label>Enter Your Word </label><input type="text" id="word"/> <div id="resultDiv"></div> </form> <script> // prepare the form when the DOM is ready $(document).ready(function() { $('#word').keyup(function(e) { $.ajax({ type: "POST", url: "googleDropSearch.php", data: "word="+this.value, success: function(msg){ $('#resultDiv').html(msg); $('#resultDiv').css('border-left','1px solid #ccc').css('border-right','1px solid #ccc').css('border-bottom','1px solid #ccc'); } }); }); }); </script> </body> </html> ACTION PAGE <?php $connection = mysql_connect('localhost','root','') or die("ERROR".mysql_error()); $connection = mysql_select_db('ajax',$connection) or die("ERROR".mysql_error()); if(!empty($_POST)): if(isset($_POST['word']) && $_POST['word'] != ''): /**************** Sanitize the data ***************/ $key =$_POST['word']; $query = mysql_query("SELECT county FROM fl_counties WHERE county LIKE '$key%';"); $rows = mysql_num_rows($query); if($rows != 0): while($result = mysql_fetch_array($query)): echo "<p>".$result[0]."</p>"; endwhile; endif;//rows > 0 endif;//county not sent endif; ?>
0
[ 2, 8144, 2122, 101, 1854, 1649, 800, 3726, 3726, 589, 259, 20, 1600, 21, 1854, 1649, 101, 8144, 2122, 1854, 1649, 9, 9, 9, 98, 31, 57, 794, 25, 76, 1297, 21, 925, 15, 568, 20624, 14, 715, 1422, 29, 30, 833, 129, 44, 6115, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create a cross-browser gallery of your facebook albums with PHP and JSON using FB API === Ok this is to save a loooot of your time creating a dynamic page that connects to FB and fetches your albums. On selecting an album it fetches (without reloading the page) this album's photos . On the latter part I didn't find any working cross-browser examples, so here it is: include 'facebook.php'; $facebook = new Facebook(array( 'appId' => 'YOUR_APP_ID', 'secret' => 'YOUR_SECRET_CODE', )); //get token $access_token = $facebook->getAccessToken(); //don't forget to include the js libraries for jquery and json //I am omitting those to save space //now get albums $albums = $facebook->api('/me/albums'); //create a drop down list for the user to select one of his albums echo " <form name='frm'> <select name='album_id' onchange=\"showAlbum(this.value)\"> <option type='hidden' value=0>Select an album</option>"; foreach($albums['data'] as $album) echo "<option type='hidden' value='".$album['id']."'> ".$album['name']."</option>"; echo '</select></form>'; ?> <!--this is the div to display the photos of the album selected--> <div id="txtHint" > </div> <!--and now the js--> <script> function showAlbum(album_id) { //until it loads the photos show a loading gif document.getElementById("txtHint").innerHTML = "<br><img src='images/ajax-loader.gif' /><br/><br/>Loading photos..."; //here is the IE fix $.support.cors = true; // get images - the addition of the callback parameter is the 2nd IE fix $.getJSON('https://graph.facebook.com/' + album_id + '/photos?access_token=<?=$access_token?>&callback=?', function(json, status, xhr) { var imgs = json.data; var images=''; for (var i = 0; i < imgs.length; i++) { //each image has a variety of different dimensions //i am selecting the first image i.e. [0] and set my own width images +='<br /><img src="' + imgs[i]['images'][0]['source'] + '" width=320><br><br>'; } //append all the photos found for this album id inside the div document.getElementById("txtHint").innerHTML = images; }).error(function(jqXHR, textStatus, errorThrown) { alert(errorThrown); }); } </script>
0
[ 2, 184, 20, 1600, 21, 919, 8, 25699, 4104, 2246, 16, 154, 9090, 2675, 29, 13, 26120, 17, 487, 528, 568, 13, 13478, 21, 2159, 800, 3726, 3726, 5854, 48, 25, 20, 2079, 21, 644, 28290, 38, 16, 154, 85, 2936, 21, 7782, 2478, 30, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create nested tree open/close buttons with pure javascript === I have the following html structure. When someone clicks on the "switch" divs I want to add a hide class to the content div and branch ul siblings. When clicked on again I want to remove them. I can write the click event, but I don't know how to reference the nested content and branch from the click event. <ul id="tree"> <li> <div class="switch"></div> <div class="content"> ... stuff </div> <ul class="branch"> <li> <div class="switch"></div> <div class="content"> ... stuff </div> <ul class="branch"> <!-- Can be many layers deep --> <ul> <li> <ul> <li> <li> <div class="switch"></div> <div class="content"> ... stuff </div> <ul class="branch"> <li> <div class="switch"></div> <div class="content"> ... stuff </div> <ul class="branch"> <!-- Can be many layers deep --> <ul> <li> <ul> <li> <!-- Can be many more of these --> </ul> Javascript var Library = (function () { "use strict"; /** * Create click events for all classes passed in. * * This is used by newer browsers that have getElementsByClassName. * * @param {array} class_names The class names to attatch click events to. * @param {function} The callback to handle the click event. * * @return void */ var classNameClick = function(class_names, clickEvent) { for(var i = 0; i < class_names.length; i++) { var elements = document.getElementsByClassName(class_names[i]); for(var j = 0; j < elements.length; j++) { elements[j].onclick = clickEvent; } } }; /** * Loops through all DOM elements to find classes to attatch click events to. * * This is used by older browsers that don't have getElementsByClassName * * @param {array} class_names The class names to attatch click events to. * @param {function} The callback to handle the click event. * * @return void */ var classTagClick = function(class_names, clickEvent) { var elements = document.getElementsByTagName("*"); for(var i = 0; i < elements.length; i++) { var element = elements[i]; for(var j = 0; j < class_names.length; j++) { if(element.className.indexOf(class_names[j]) >= 0) { element.onclick = function() { clickEvent(); } } } } }; return { /** * Loops through all DOM elements to find classes to attatch click events to. * * @param {array} class_names The class names to attatch click events to. * @param {function} The callback to handle the click event. * * @return void */ classClick : function(class_names, clickEvent) { if (typeof document.getElementsByClassName !== "undefined") { classNameClick(class_names, clickEvent); } else { classTagClick(class_names, clickEvent); } } }; }()); var Tree = (function () { "use strict"; return { construct : function () { Library.classClick("switch", function() { // Not sure how to reference the relevant content and branch class here. }); } }; }()); window.onload = function() { Tree.construct(); } I can't use jQuery or other libraries (It's easy with jQuery).
0
[ 2, 184, 20, 1600, 5618, 69, 1541, 368, 118, 14330, 12861, 29, 4267, 8247, 8741, 800, 3726, 3726, 31, 57, 14, 249, 13, 15895, 1411, 9, 76, 737, 10840, 18, 27, 14, 13, 7, 18, 15915, 7, 13, 12916, 18, 31, 259, 20, 3547, 21, 3077,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ant sql task in different jvm/ process === I am new to ant and before sending mail to this list I explored the issue on google but didn't get any satisfactory results. In one of my project, I require to run the below sql task in a different jvm or a different process. <target name="query"> <sql driver="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@${host_name}:${port}:${sid}" userid="sys as sysdba" password="passwordNew" output="/tmp/QueryResult.out" print="yes" classpathref="myclasspath" src="./QueryFile.sql"></sql> </target> Actually in my build.xml file, I call a junit test using junit task and in that task I use fork=yes so that it runs in a different jvm. But before running the junit task I need to run the sql task, but somehow it happens that both sql task and junit tasks are running in same jvm which I don't want. Could you please help me in making sure that the sql task which I run should run in a separate jvm / process ? Can we specify fork=yes or some other attribute to do this? Thanks & Regards, Vineet
0
[ 2, 40, 38, 4444, 255, 3005, 19, 421, 487, 20147, 118, 953, 800, 3726, 3726, 31, 589, 78, 20, 40, 38, 17, 115, 4907, 4216, 20, 48, 968, 31, 11252, 14, 1513, 27, 8144, 47, 223, 22, 38, 164, 186, 25549, 1736, 9, 19, 53, 16, 51,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
change in the alignment of xml attributes === I am using an xslt transformation to transform some xml files. In order to format the output, what i am using is two tags in the xsl style sheet. <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/> But the problem is , in windows i am getting a kind of output , and when i run the program in a unix machine, i am getting a different kind of output. eg: `<Book name="Godfather" author="MarioPuzo" `/> But in unix, what i am getting is , `<Book author="MarioPuzo" name="Godfather" />` it is kind of a weird problem. Any help is appreciated.
0
[ 2, 753, 19, 14, 12448, 16, 23504, 13422, 800, 3726, 3726, 31, 589, 568, 40, 993, 18, 255, 38, 6978, 20, 8007, 109, 23504, 6488, 9, 19, 389, 20, 2595, 14, 5196, 15, 98, 31, 589, 568, 25, 81, 3383, 18, 19, 14, 993, 18, 255, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing database from a Windows Service === I have this ASP.NET app, in which I use Entity Framework to connect to the DB. Inside this app I have a class which provides different operations on the DB (add, remove etc). Everything works dandy. Now I needed to create a Windows Service which once a week updates the DB with info gathered from a repository. I thought that I could add my ASP.NET dll as a reference to my windows service, so that I could use the operations I defined there. But I get the following error: *The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid* I read in some other thread that I should copy the connect string to the app.config, but I don't have any app.config file in my windows service project. How can I use the EDM operations I defined in the class in both the ASP app and the windows service?
0
[ 2, 1381, 68, 6018, 37, 21, 1936, 365, 800, 3726, 3726, 31, 57, 48, 28, 306, 9, 2328, 4865, 15, 19, 56, 31, 275, 9252, 6596, 20, 6379, 20, 14, 13, 9007, 9, 572, 48, 4865, 31, 57, 21, 718, 56, 1927, 421, 1311, 27, 14, 13, 90...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TELERIK STOP .PHP AND CLASSIC .ASP THO WORK === I have a website running under IIS with asp.net 3.5 and in the same projetct asp + php. Its everything working fine until i insert telerik in project and change the webconfig for it work. After this change, the telerik and .NET applications are running fine, but php and stap stop working. This happens when i add this configuration in web.config: <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" /> in <modules> section.
1
[ 2, 4338, 6639, 747, 13, 9, 26120, 17, 2732, 13, 9, 472, 306, 14963, 170, 800, 3726, 3726, 31, 57, 21, 2271, 946, 131, 595, 18, 29, 28, 306, 9, 2328, 203, 9, 264, 17, 19, 14, 205, 895, 10307, 4812, 28, 306, 2754, 13, 26120, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to loop a text based game depending on input in python === i have this so far: print('a skeleton comes into view, the hiker must have been dehydrated.') print ('he was wearing a Yankees HAT, to the right of his body he set his BACKPACK and WOODEN WALKING STICK next to the wall') input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") if input2 == 'PICK UP HAT': print 'taken' hat = hat+1 input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") # # # if input2 == 'SEARCH BACKPACK': print ("there are OLD CLOTHES in here as well as a TARP") input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") elif input2 == 'PICK UP CLOTHES': print ("tsken") input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") elif input2 == 'PICK UP TARP': print ("taken") input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") elif input2 == 'PICK UP BONE': print ("taken") input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") elif input2 == 'PICK UP WOODEN WALKING STICK': print "Taken" input2 = raw_input ("You may SEARCH____(object),PICK UP____, USE____ ON_____, or GO ON: ") elif input2 == 'GO ON': input3 = raw_input ("left or right: ") if input3 == 'left': import module3 elif input3 == 'right': import module4 I am having trouble understanding if i should create a while or for statement here. For example: how do I make it so that the person playing the game cannot pick up a hat twice or pick up the tarp without searching the back pack Thank you for the time in answering this question for a novice programmer.
0
[ 2, 184, 20, 5293, 21, 1854, 432, 250, 4758, 27, 6367, 19, 20059, 800, 3726, 3726, 31, 57, 48, 86, 463, 45, 4793, 5, 22, 58, 11714, 1624, 77, 1418, 15, 14, 16095, 139, 491, 57, 74, 121, 23673, 43, 9, 22, 6, 4793, 13, 5, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Split row field mysql create new columns === I have a MySQL table containing several fields; like this: id name ton dyr 1 moo FRET_GTR ra 2 maa DER_GY fe 3 tee SAME_IQ tete ... The question is that the contents for every row of the column **ton** are independent, but they are joined with a symbol "_". I would like to modify the table, splitting the field **ton** to end up keeping all the same entries in the other fields, but just one entry per row in the **ton** field, like this... id name ton dyr 1 moo FRET ra 1 moo GTR ra 2 maa DER fe 2 maa GY fe 3 tee SAME tete 3 tee IQ tete ... I tried to modify the code given in this [page][1] to perform the job, but as i'm not that expert in MySQL, i am not able to get it to work my way. In the link above, the code is given suitable to rewrite the two columns given, not any other fields. Any help on how to modify the code, or do it another way? [1]: http://www.marcogoncalves.com/2011/03/mysql-split-column-string-into-rows/
0
[ 2, 2132, 3131, 575, 51, 18, 22402, 1600, 78, 7498, 800, 3726, 3726, 31, 57, 21, 51, 18, 22402, 859, 3503, 238, 2861, 73, 101, 48, 45, 4924, 204, 13, 444, 9841, 139, 137, 13, 8765, 20421, 1, 263, 6384, 13, 525, 172, 1216, 58, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mysql querie that includes TWO sums from columns in other tables === Got a query running one sum from a different table, which works perfectly (and obtained from this forum as well): SELECT R.REP_ID as repid, R.REP_DESBREV as repdesc, IFNULL(SUM(RD.REPDATA_CANT),0) as cant FROM REPUESTOS R LEFT JOIN REP_DATA RD, ON RD.REPDATA_REPID = R.REP_ID GROUP BY RD.REPDATA_REPID Now, the thing is that I'd like to add an extra column that obtains the total inventory (something like IFNULL(SUM(I.INV_CANT),0) as inv) from table INVENTARIO I, where I.INV_REPID = R.REP_ID. THis value can be obtained by means of a JOIN, in the exact same way we got the first statement that works, but I have not found the way to include BOTH SUMS in just one query. Any ideas? THANKS!
0
[ 2, 51, 18, 22402, 9386, 3272, 30, 1103, 81, 3907, 18, 37, 7498, 19, 89, 7484, 800, 3726, 3726, 330, 21, 25597, 946, 53, 3907, 37, 21, 421, 859, 15, 56, 693, 5759, 13, 5, 290, 3048, 37, 48, 5691, 28, 134, 6, 45, 5407, 761, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
on click of shortcut on homescreen launching from spalsh screen in android === I reated configuration in mainfest file as follows <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> shortcut is created on homescreen, but the problem is when i click on this it is not retaining the state correctly, it is starting from splash screen. when i launch an app from all apps it is retaining the state correctly. Myapp-->splashscreen-->Activity1-->Activity2-->click home-->click shortcuticon-->splashscreen Myapp-->splashscreen-->Activity1-->Activity2-->click home-->-->click menu-->all apps-->click shortcuticon-->Activity2
0
[ 2, 27, 10840, 16, 502, 4118, 27, 213, 7187, 13762, 37, 13, 18, 6720, 1635, 2324, 19, 13005, 800, 3726, 3726, 31, 302, 1669, 8091, 19, 407, 9962, 3893, 28, 2415, 13, 1, 3699, 18, 8, 1432, 12385, 13005, 45, 7259, 3726, 7, 960, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Setting VisualState on ItemsControl item Templates === I have an ItemsControl with an ItemTemplate that is bound to a data item. The ItemTemplate is quite complicated and I have added some visual state to it so that I can change it's appearance. I want to be able to switch all the items VisualState to another state of my choice, on an event that occurs outside the ItemsControl. How can I go about doing this? I've tried using the VisualStateManager.SetState, but this relies on a control, rather than a template, which seems to be all I can get via WaveItems.ItemContainerGenerator.ContainerFromIndex(i). Regards Tristan
0
[ 2, 2697, 3458, 3859, 27, 3755, 12898, 9101, 22894, 18, 800, 3726, 3726, 31, 57, 40, 3755, 12898, 29, 40, 9101, 9577, 6554, 30, 25, 4138, 20, 21, 1054, 9101, 9, 14, 9101, 9577, 6554, 25, 1450, 8343, 17, 31, 57, 905, 109, 3458, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting XML data into combobox === I have a windows form with 3 comboboxes and a XML file as following <?xml version="1.0"?> <shrtcutkeys> <Keysmain> <keychars> <key1> Ctrl </key1> <key1> Alt </key1> <key1> Shift </key1> </keychars> </Keysmain> <Seckeys> <keychars> <key2> Ctrl </key2> <key2> Alt </key2> <key2> Shift </key2> </keychars> </Seckeys> <Alphas> <keychars> <key3> a </key3> <key3> b </key3> <key3> c </key3> </keychars> </Alphas> </shrtcutkeys> So i would like to display all key1 in combobox1 and all key2 in combox2 and so on so forth..tried doing this but not really working DataSet dsSet = new DataSet(); dsSet.ReadXml("C:\\Users\\jackandjill\\Documents\\Visual Studio 2010\\Projects\\highlite\\highlite\\keys.xml"); comboBox1.DataSource = dsSet.Tables["keys"]; comboBox1.DisplayMember = "key1";
0
[ 2, 1017, 23504, 1054, 77, 22621, 5309, 800, 3726, 3726, 31, 57, 21, 1936, 505, 29, 203, 22621, 5309, 160, 17, 21, 23504, 3893, 28, 249, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 60, 1, 13, 1, 18, 3112, 38, 4118, 42...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP 5.3.0: Strange Behaviour With Foreach Loop === I am experiencing some strange behaviour with the following foreach loop. I am running it on PHP 5.3.0. print_r($this->form_spec['fields']);<br /> foreach($this->form_spec['fields'] as $f=>$field) {<br /> print_r($this->form_spec['fields']); } The first print_r prints the following (note: I've excluded a bunch of keys to make my point clearer): ` Array ( [0] => Array ( [field_name] => d_first_name ) [1] => Array ( [field_name] => d_last_name ) ) The second print_r prints: Array ( [0] => Array ( [field_name] => d_first_name ) [1] => Array ( [field_name] => d_first_name ) ) The first field basically overwrites all the others without any other code running, all I do is basic iteration. Nothing implies overwriting. The only way I could get round the problem was by using a for loop instead, but the Foreach SHOULD work, it always has done before. Can anybody enlighten me? PS I am sorry about the formatting, I am new to Stack Overflow and couldn't figure it out.
0
[ 2, 13, 26120, 331, 9, 240, 9, 387, 45, 2578, 7727, 29, 26, 14322, 5293, 800, 3726, 3726, 31, 589, 15138, 109, 2578, 7727, 29, 14, 249, 26, 14322, 5293, 9, 31, 589, 946, 32, 27, 13, 26120, 331, 9, 240, 9, 387, 9, 4793, 1, 139...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javascript not giving the desired output === What is the difference between split(' ') and the same split(" ").. Is there anything that the second type of split is supported in ie8?
0
[ 2, 8247, 8741, 52, 1438, 14, 9264, 5196, 800, 3726, 3726, 98, 25, 14, 2841, 128, 2132, 5, 22, 13, 22, 6, 17, 14, 205, 2132, 5, 7, 13, 7, 6, 9, 9, 25, 80, 602, 30, 14, 153, 1001, 16, 2132, 25, 1827, 19, 13, 660, 457, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Wrong like count from Facebook fql.query === any idea why it displays 2 likes here: http://www.facebook.com/plugins/like.php?href=https://rodenstock.fbapp.eu/gallery/image/508&layout=box_count and 0 here: https://api.facebook.com/method/fql.query?query=select%20%20like_count,%20total_count,%20url,%20share_count,%20click_count%20from%20link_stat%20where%20url=%22https://rodenstock.fbapp.eu/gallery/image/508%22 and 0 here: http://api.facebook.com/restserver.php?method=links.getStats&urls=https://rodenstock.fbapp.eu/gallery/image/508 I konw that the like-button counts shares and likes together. But this does not explain the difference. Thx for help.
0
[ 2, 1389, 101, 2468, 37, 9090, 398, 22402, 9, 8190, 93, 800, 3726, 3726, 186, 882, 483, 32, 9412, 172, 101, 18, 235, 45, 7775, 6903, 6483, 9, 6413, 5199, 9, 960, 118, 18527, 17040, 118, 1403, 9, 26120, 60, 252, 14057, 3726, 21127, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LINQ Getting Distinct Data and looping through to get related data === I'm new to Linq. I have a requirement where from a web service, I receive a list of items: class Item { string ItemName { get; set;} string GroupName { get; set; } } I receive the following data: ItemName: Item1; GroupName: A ItemName: Item2; GroupName: B ItemName: Item3; GroupName: B ItemName: Item4; GroupName: A ItemName: Item5; GroupName: A Now I want to get all of the unique Groups in the list, and associate all the Items to that Group. So I made a class: class Group { string GroupName { get; set; } List<string> Items { get; set; } } So that there is a single group and all associated Items will be under the List. I made two LINQ statements: var uniqueGroups = (from g in webservice where g.Group != null select g.GroupName).Distinct(); Then I loop through it foreach (var gn in uniqueGroups) { var itemsAssociated = (from item in webservice where item.GroupName = gn.ToString() select new { }); } and then I got the items, and save them to my object. Is this the best way to do this or is there any LINQ statement that can do all these in one go? Thanks.
0
[ 2, 6294, 1251, 1017, 4421, 1054, 17, 5293, 68, 120, 20, 164, 1597, 1054, 800, 3726, 3726, 31, 22, 79, 78, 20, 6294, 1251, 9, 31, 57, 21, 8981, 113, 37, 21, 2741, 365, 15, 31, 2588, 21, 968, 16, 3755, 45, 718, 9101, 13, 1, 37...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
EJB3.1: entity facade in servlet is null (NetBeans NewsApp tutorial sample) === New to EJB3.1, I'm following the tutorial sample on http://netbeans.org/kb/docs/javaee/javaee-entapp-ejb.html and after completion, I run the project but get a `NullPointerException`; same happens when I use the source code zip from that tutorial, so I guess it's not a typo in my own source code. **Problem is that the `newsEntityFacade` in my `ListNews` servlet is `null`, and therefore throwing a NPE at `List news = newsEntityFacade.findAll();`** (Java7, Glassfish 3.1.2, Netbeans 7.1.2) Error log: WARNING: StandardWrapperValve[ListNews]: PWC1406: Servlet.service() for servlet ListNews threw exception java.lang.NullPointerException at web.ListNews.processRequest(ListNews.java:53) at web.ListNews.doGet(ListNews.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) ListNews.java servlet: package web; [...] @WebServlet(name = "ListNews", urlPatterns = {"/ListNews"}) public class ListNews extends HttpServlet { @EJB private SessionManagerBean sessionManagerBean; @EJB private NewsEntityFacade newsEntityFacade; /** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getSession(true); response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println("<html>"); out.println("<head>"); out.println("<title>Servlet ListNews</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet ListNews at " + request.getContextPath() + "</h1>"); List news = newsEntityFacade.findAll(); for (Iterator it = news.iterator(); it.hasNext();) { NewsEntity elem = (NewsEntity) it.next(); out.println(" <b>"+elem.getTitle()+" </b><br />"); out.println(elem.getBody()+"<br /> "); } out.println("<a href='PostMessage'>Add new message</a>"); out.println("<br><br>"); out.println(sessionManagerBean.getActiveSessionsCount() + " user(s) reading the news."); out.println("</body>"); out.println("</html>"); } finally { out.close(); } } [...] } NewsEntityFacade: package ejb; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; @Stateless public class NewsEntityFacade extends AbstractFacade<NewsEntity> { @PersistenceContext(unitName = "NewsApp-ejbPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public NewsEntityFacade() { super(NewsEntity.class); } } which extends from AbstractFacade: package ejb; import java.util.List; import javax.persistence.EntityManager; public abstract class AbstractFacade<T> { private Class<T> entityClass; public AbstractFacade(Class<T> entityClass) { this.entityClass = entityClass; } protected abstract EntityManager getEntityManager(); public void create(T entity) { getEntityManager().persist(entity); } public void edit(T entity) { getEntityManager().merge(entity); } public void remove(T entity) { getEntityManager().remove(getEntityManager().merge(entity)); } public T find(Object id) { return getEntityManager().find(entityClass, id); } public List<T> findAll() { javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); cq.select(cq.from(entityClass)); return getEntityManager().createQuery(cq).getResultList(); } public List<T> findRange(int[] range) { javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); cq.select(cq.from(entityClass)); javax.persistence.Query q = getEntityManager().createQuery(cq); q.setMaxResults(range[1] - range[0]); q.setFirstResult(range[0]); return q.getResultList(); } public int count() { javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); javax.persistence.criteria.Root<T> rt = cq.from(entityClass); cq.select(getEntityManager().getCriteriaBuilder().count(rt)); javax.persistence.Query q = getEntityManager().createQuery(cq); return ((Long) q.getSingleResult()).intValue(); } }
0
[ 2, 13, 10022, 220, 240, 9, 165, 45, 9252, 7224, 19, 13, 10321, 1336, 25, 16203, 13, 5, 2328, 863, 5950, 996, 7753, 29724, 5717, 6, 800, 3726, 3726, 78, 20, 13, 10022, 220, 240, 9, 165, 15, 31, 22, 79, 249, 14, 29724, 5717, 27,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to determine if copy() is successful? === I can copy remote image to my server with; @copy("http://www.example.com/image.jpg", $title.'.jpg'); But I want to make sure it has been copied successfully. I want to do something if it has not been copied succesfully. How can I do that ? Thanks.
1
[ 2, 184, 20, 3746, 100, 4344, 5, 6, 25, 1300, 60, 800, 3726, 3726, 31, 92, 4344, 5388, 1961, 20, 51, 8128, 29, 73, 13, 1, 19625, 5, 7, 21127, 6903, 6483, 9, 29041, 9, 960, 118, 22039, 9, 12851, 263, 7, 15, 5579, 22235, 9, 22,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
firefox' string break behavior in other browsers? === I have a long string without spaces, but with slashes, that I want to display in a table-cell. Firefox adds breaks before the slashes at the end of a line. Other browsers only break the string if I add td { word-break: break-all; } to my CSS. **Firefox:** ![screenshot firefox][1] **Chrome** ![screenshot chrome][2] **Chrome with word-break** ![screenshot chrome with word-break][3] Is there any CSS-property to get the firefox behavior in Chrome, etc.? You can find a demo here: http://jsfiddle.net/rM9Dx/2/embedded/result/ [1]: http://i.stack.imgur.com/HsKwx.png [2]: http://i.stack.imgur.com/XzNC0.png [3]: http://i.stack.imgur.com/hg7Kk.png
0
[ 2, 535, 18219, 22, 3724, 1442, 3257, 19, 89, 16495, 18, 60, 800, 3726, 3726, 31, 57, 21, 175, 3724, 366, 7644, 15, 47, 29, 14098, 160, 15, 30, 31, 259, 20, 3042, 19, 21, 859, 8, 9725, 9, 535, 18219, 10621, 7947, 115, 14, 14098...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
fatal: Not a git repository (or any of the parent directories): .git- Error in Xcode 4.3 === I want to rename my project. For that, I have to just choose project name press(command +1) , and after that I can able to edit my project name. My project is in SVN, I have deleted the local git repositories. Now, whenever I want to rename my project, fatal: Not a git repository (or any of the parent directories): .git..this errors come. Any idea, why this is happening and how to fix this
0
[ 2, 8773, 45, 52, 21, 13, 10404, 24869, 13, 5, 248, 186, 16, 14, 4766, 559, 1596, 6, 45, 13, 9, 10404, 8, 7019, 19, 993, 9375, 268, 9, 240, 800, 3726, 3726, 31, 259, 20, 302, 7259, 51, 669, 9, 26, 30, 15, 31, 57, 20, 114, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iPad SplitViewController not using popovers on Portrait mode likely same as on its Landscape view === I've seen couple of tutorials regarding SplitViewControllers but can someone suggest a tutorial on creating a SplitViewController like Settings on iPad when on in portrait view not using popovers likely same as its view on landscape when on portrait mode, I want to know this and implemented in Storyboard! Thanks in advance!
0
[ 2, 31, 8240, 2132, 4725, 12898, 1252, 52, 568, 1675, 2549, 18, 27, 5548, 3740, 1720, 205, 28, 27, 82, 4453, 1418, 800, 3726, 3726, 31, 22, 195, 541, 1335, 16, 29724, 18, 3467, 2132, 4725, 12898, 1252, 18, 47, 92, 737, 5601, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
uiview fixing the contents === my UIView has a UILabel and a UIWebView inside, the UILabel is in the top, the UILabel has the height variable: theTitle.text = [NSString stringWithFormat:@"%@", noticeTitle]; theTitle.lineBreakMode = UILineBreakModeWordWrap; theTitle.numberOfLines = 0; [theTitle sizeToFit]; how can I start the UIWebView when it finishes? Thank you in advance. Regards.
0
[ 2, 13, 5661, 4725, 20047, 14, 8478, 800, 3726, 3726, 51, 13, 5661, 4725, 63, 21, 13, 5661, 21018, 17, 21, 13, 5661, 14113, 4725, 572, 15, 14, 13, 5661, 21018, 25, 19, 14, 371, 15, 14, 13, 5661, 21018, 63, 14, 2947, 7612, 45, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mysql - using if in subquery to CONCAT === I trying to write a query to correct an error in a DATETIME field in a table, but my subquery can return NULL as transactiondetails and CreateDate field needs to have a valid value. My current query is this one: <!-- language: sql --> UPDATE transactionsheaders H SET CreateDate = CONCAT( DATE((SELECT CreateDate FROM transactionsdetails WHERE TransactionUID=H.UID GROUP BY TransactionUID)), ' ', TIME(CreateDate)) WHERE UID>0; and I want to use the result of <!-- language: sql --> SELECT CreateDate FROM transactionsdetails WHERE TransactionUID=H.UID GROUP BY TransactionUID if it isn't **NULL** and **DATE(CreateDate)** otherwise. I've been trying to use **IF** for this purpose, but I am having problems writing something that works... One more thing, **transactionsdetails** refers to **transactionsheaders** through **TransactionUID** (1 to many). Is **GROUP BY** guaranteed to return only one result?
0
[ 2, 51, 18, 22402, 13, 8, 568, 100, 19, 972, 8190, 93, 20, 1065, 5782, 800, 3726, 3726, 31, 749, 20, 2757, 21, 25597, 20, 4456, 40, 7019, 19, 21, 1231, 891, 575, 19, 21, 859, 15, 47, 51, 972, 8190, 93, 92, 788, 16203, 28, 127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Storing a leap second in Sql Server 2008 === This weekend is an extra long one as there will be an [extra second][1] inserted after `23:59:59` on June 30th. We have a system that logs a lot of data around the clock and one of the business rules is that no two records can be logged as having occured at the same time, to within one second. We're using UTC datetimes along with the new [`datetimeoffset`][2] data type, but as far as I can tell they won't let you have more than 60 seconds in a minute. Certainly, this throws an error: select datediff(ss, getdate(), '30-jun-2012 23:59:60') But according to the UTC gods this will be a real time. Events can take place at `23:59:60` but we have no way of recording this fact. `23:59:59` plus one second offset will still be considered `00:00:00` on July 1st. How can I correctly log that an event occurred at `23:59:60` in the database? [1]: http://en.wikipedia.org/wiki/Leap_second#Insertion_of_leap_seconds [2]: http://msdn.microsoft.com/en-us/library/bb630289.aspx
0
[ 2, 25615, 21, 10336, 153, 19, 4444, 255, 8128, 570, 800, 3726, 3726, 48, 4010, 25, 40, 2230, 175, 53, 28, 80, 129, 44, 40, 636, 23631, 153, 500, 2558, 165, 500, 14215, 75, 13, 1, 2001, 21100, 21100, 1, 27, 295, 712, 96, 9, 95,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Split user name and password credentials === I have created the following `WebMethod` in the back end of my application where the users login through the front end. [WebMethod] public String Login(String userName, String password) { OleDbConnection connect = new OleDbConnection(connection); connect.Open(); OleDbCommand command = new OleDbCommand("Select * from login where userName='" + userName + "' and password ='" + password + "'", connect); command.CommandType = CommandType.Text; OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = command; DataSet NSNSet = new DataSet(); adapter.Fill(NSNSet); string username = NSNSet.Tables[0].Rows[0]["firstName"].ToString() + NSNSet.Tables[0].Rows[0]["lastName"].ToString(); int userID = System.Convert.ToInt16(NSNSet.Tables[0].Rows[0]["UID"].ToString()); return username + "," + userID; } Currently, I have error handling in place which states - catch(Exception ex) { string error = System.Convert.ToString(ex); if (error.Contains("There is no row at position 0")) { status.Text = "Incorrect Username/Password combination"; } } This works fine, however how could I aulter my code so that it brings back a more specific error, i.e. states if the `userName` or `password` specifically are incorrect?
0
[ 2, 2132, 4155, 204, 17, 20884, 5059, 43, 10107, 18, 800, 3726, 3726, 31, 57, 679, 14, 249, 13, 1, 14113, 5909, 1807, 43, 1, 19, 14, 97, 241, 16, 51, 3010, 113, 14, 3878, 6738, 108, 120, 14, 431, 241, 9, 636, 14113, 5909, 1807,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Logout implementation via CMIS standard === Could you tell me which method should I implement in order to logout. I want to do some staff on the server when user click button logout. I can't find such method.
0
[ 2, 6738, 1320, 6123, 1197, 2390, 403, 1236, 800, 3726, 3726, 110, 42, 494, 55, 56, 2109, 378, 31, 8713, 19, 389, 20, 6738, 1320, 9, 31, 259, 20, 107, 109, 1138, 27, 14, 8128, 76, 4155, 10840, 5167, 6738, 1320, 9, 31, 92, 22, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Jquery Checkbox All on changing values issue === I have a big issue. Here is the code: <div class="control_group" style="width: 320px"> <input type="checkbox" class="chkAll"> All <br/> <?php $namecat=$langid."_name"; $result = mysql_query ( "SELECT categories.id, categories.$namecat FROM categories LEFT JOIN ptype_new ON ( ptype_new.catid LIKE concat( '%::', categories.id, '::%' ) ) WHERE ptype_new.id =$ID" ) or die(mysql_error()); while($row1 = mysql_fetch_array($result)){ echo '<input type="checkbox" name="'.$row1[1].'" value="'.$row1[0].'">'.$row1[1].'<br/>'; } ?> </div> Here is the JS code: <script type="text/javascript"> $(document).ready(function() { $('.chkAll').click(function() { $(this).parents('.control-group').children(':checkbox').not('.chkAll').attr('checked', this.checked); }); $('.chkAll').parents('.control-group').children(':checkbox').not('.chkAll,:checked').click(function() { $(this).parents('.control-group').children('.chkAll').attr('checked', false); }); }); </script> The values of checkboxes are from SQL query. The check box "CHECK ALL" is working just on first view. the issue is that values of <div> is changing depending if the $_POST $id and .... and "CHECK ALL" don't work any more. How can I fix that ? Thank you
0
[ 2, 487, 8190, 93, 2631, 5309, 65, 27, 4226, 4070, 1513, 800, 3726, 3726, 31, 57, 21, 580, 1513, 9, 235, 25, 14, 1797, 45, 13, 1, 12916, 718, 3726, 7, 12898, 1, 8024, 7, 1034, 3726, 7, 3976, 43, 96, 45, 13, 12402, 306, 396, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I get monitors numbers from Screen Resolution dialog in win7 programmatically? === When you press Identify button in Screen Resolution dialog then Windows shows you big white monitor numbers on each monitor. It was easy to find them programmatically together with monitor coordinates in Windows XP (with EnumDisplayDevices) but on Windows 7 it's broken. How can I do that? 1. EnumDisplayDevices and GetMonitorInfo are [not reliable anymore](http://windows7forums.com/windows-7-programming-scripting/43596-multi-monitor-display-numbers-unreliable.html?language=ga) for that purpose in Windows 7. 2. I tried getMonitorInfo and then extracting monitor number from MONITORINFOEX.szDevice (I.E. \\.\Display2) with no success. Another guy [did that too](http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/668e3cf9-4e00-4b40-a6f8-c7d2fc1afd39?prof=required&lc=1033&ppud=4) two years ago and claimed that getMonitorInfo has a bug. [This bug](http://connect.microsoft.com/VisualStudio/feedback/details/545217/windows-7-getmonitorinfo-returns-wrong-information#) was marked as fixed by Microsoft without any comments but it still can be reproduced on a win7 machine having latest updates. (Btw, can anybody tell me - maybe this bug is absent on win8 ?) 3. I tried [QueryDisplayConfig](http://msdn.microsoft.com/en-us/library/windows/hardware/ff569216(v=vs.85).aspx) from new CCD API but didn't find needed info. Does anybody know the way?
0
[ 2, 184, 92, 31, 164, 18521, 2116, 37, 2324, 4302, 28223, 19, 628, 465, 625, 6732, 1326, 60, 800, 3726, 3726, 76, 42, 901, 5808, 5167, 19, 2324, 4302, 28223, 94, 1936, 1285, 42, 580, 359, 7626, 2116, 27, 206, 7626, 9, 32, 23, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Embedding SVG image in ireport === <pre> Hi Guys, I am using ireport 4.5.0. I want to embed a svg image to generate pdf. I am using ireport preview option to run the report. I do not see any exception log during execution and the pdf generated is empty at the location of the image. Please have a look at the image tag. Can anyone help if I am missing anything. Thanks </pre> <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="reportSVGTest" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <background> <band splitType="Stretch"/> </background> <title> <band height="50"> <staticText> <reportElement x="81" y="13" width="100" height="20"/> <textElement/> <text><![CDATA[Hello]]></text> </staticText> </band> </title> <detail> <band height="443" splitType="Stretch"> <image hAlign="Center" vAlign="Middle" isUsingCache="true" isLazy="true"> <reportElement x="12" y="17" width="512" height="403"/> <imageExpression class="net.sf.jasperreports.engine.JRRenderable"><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("C:\\Users\\akshayd\\Desktop\\polygons1.svg"))]]></imageExpression> </image> </band> </detail> </jasperReport>
0
[ 2, 184, 20, 11911, 69, 3258, 13, 18, 22955, 1961, 19, 31, 17437, 800, 3726, 3726, 13, 1, 3515, 1, 4148, 2776, 15, 31, 589, 568, 31, 17437, 268, 9, 264, 9, 387, 9, 31, 259, 20, 11911, 69, 21, 13, 18, 22955, 1961, 20, 7920, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why doesn't my console wait for an input in VS2010 and Windows7? === The main function goes like this: void main( int argc, char** argv ){ // validate that an input was specified if( argc != 2 ) { printUsage(); return; } if( !strcmp(argv[1], "train") ) learn(); else if( !strcmp(argv[1], "test") ) recognize(); else { printf("Unknown command: %s\n", argv[1]); printUsage(); } } When I execute the program the console disappears as soon as it appears. Thanks so much for your patience and help! :) Nil
0
[ 2, 483, 1437, 22, 38, 51, 8650, 1760, 26, 40, 6367, 19, 4611, 2751, 17, 1936, 465, 60, 800, 3726, 3726, 14, 407, 1990, 1852, 101, 48, 45, 11364, 407, 5, 19, 38, 13, 10663, 150, 15, 4892, 1409, 13, 10663, 710, 13, 6, 1, 12894, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
VSphere CLI: how do I take a new Snapshot and add description? === I'm working on a VSphere CLI script that will take 6 snapshots and allow me to make the description of each snapshot be the date it was created. At the moment here's the code that I'm trying: $server = "<ServerName>" connect-VIserver $server $snapshot = Get-vm | New-Snapshot -Name $"<serverName>" | Set-Snapshot -$snapshot -Description get-date
0
[ 2, 566, 14079, 19391, 45, 184, 107, 31, 247, 21, 78, 29946, 17, 3547, 5318, 60, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 566, 14079, 19391, 3884, 30, 129, 247, 400, 29946, 18, 17, 1655, 55, 20, 233, 14, 5318, 16, 206, 29946, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error running some JSPs on Websphere 7 === Some of the pages of my application are throwing this exception. As far as I know this was an issue with Websphere 6 but I am getting this in Websphere 7 com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /webpages/portal/TransferOfServiceTile.jsp: /webpages/portal/TransferOfServiceTile.jsp(440,6) --> JSPG0123E: Unable to locate tag attribute info for tag attribute readonly. Any help would be appreciated.
0
[ 2, 7019, 946, 109, 487, 18, 1919, 27, 2741, 14079, 453, 800, 3726, 3726, 109, 16, 14, 4434, 16, 51, 3010, 50, 6033, 48, 5391, 9, 28, 463, 28, 31, 143, 48, 23, 40, 1513, 29, 2741, 14079, 400, 47, 31, 589, 1017, 48, 19, 2741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TW Bootstrap: How to overflow columns === I want to have a row where columns are going to be horizontally scrollable: ![scrollable columns in a single row in twitter bootstrap][1] As you can see the row is the outer block (with padding). Inside of it, there are columns where each has some `span*` class such as `span3`. And since all of the columns do not fit in the row, the scrollbar is on the bottom. Here is what I tried doing (with inline css) and so far no luck. <div class="row"> <!-- the parent element which will have scrollbar --> <div class="span12" style="white-space: nowrap; overflow-x: auto;"> <div class="row"> <div class="span3" style="display: inline-block;">content here</div> <div class="span3" style="display: inline-block;">content here</div> <div class="span3" style="display: inline-block;">content here</div> ... <div> </div> </div> But then the columns just wrap once they can't fit into the row. How can I do this? Thank you. [1]: http://i.stack.imgur.com/UViwy.jpg
0
[ 2, 13, 38, 499, 5894, 16514, 45, 184, 20, 20285, 7498, 800, 3726, 3726, 31, 259, 20, 57, 21, 3131, 113, 7498, 50, 228, 20, 44, 25658, 12159, 579, 45, 13, 187, 2558, 3862, 8694, 579, 7498, 19, 21, 345, 3131, 19, 10623, 5894, 1651...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
"Warning: Cannot modify header information" error in wordpress === I am having this error in a developing plugin. Works fine in localhost but in the remote server fails with: > Warning: Cannot modify header information - headers already sent by > (output started at > /path_wordpress/public_html/wp-admin/includes/template.php:1657) in > /path_wordpress/public_html/wp-includes/pluggable.php on line 866 I have removed all spaces before and after <?php ?> at the beginning and end of files (the common reason for this error) and there are no sessions involved. What another reasons could be?
0
[ 2, 13, 7, 1885, 2981, 45, 1967, 17579, 157, 106, 676, 7, 7019, 19, 833, 5890, 800, 3726, 3726, 31, 589, 452, 48, 7019, 19, 21, 3561, 10922, 108, 9, 693, 1123, 19, 375, 11694, 47, 19, 14, 5388, 8128, 13614, 29, 45, 13, 1, 3590,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
select from multiple tables with different columns === Say I got this sql schema. Table Job: id,title, type, is_enabled Table JobFileCopy: job_id,from_path,to_path Table JobFileDelete: job_id, file_path Table JobStartProcess: job_id, file_path, arguments, working_directory There are many other tables with varying number of columns and they all got foreign key job_id which is linked to id in table Job. My questions: Is this the right approach? I don't have requirement to delete anything at anytime. I will require to select and insert mostly. Secondly, what is the best approach to get the list of jobs with relevant details from all the different tables in a single database hit? e.g I would like to select top 20 jobs with details, their details can be in any table (depends on column type in table Job) which I don't know until runtime. Thanks in advance. Regards,
0
[ 2, 5407, 37, 1886, 7484, 29, 421, 7498, 800, 3726, 3726, 395, 31, 330, 48, 4444, 255, 23874, 9, 859, 1205, 45, 4924, 15, 22235, 15, 1001, 15, 25, 1, 219, 579, 43, 859, 1205, 16877, 19625, 45, 1205, 1, 1340, 15, 2665, 1, 8353, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the difference between <html lang="en"> and <html lang="en-US">? === What is the difference between <html lang="en"> and <html lang="en-US">? What other values can follow the dash? According to [w3.org][1] "Any two-letter subcode is understood to be a [ISO3166] country code." so does that mean any [value listed under the alpha-2 code][2] is an accepted value? [1]: http://www.w3.org/TR/html4/struct/dirlang.html#langcodes [2]: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
0
[ 2, 98, 25, 14, 2841, 128, 13, 1, 15895, 4544, 3726, 7, 219, 7, 1, 17, 13, 1, 15895, 4544, 3726, 7, 219, 8, 267, 7, 1, 60, 800, 3726, 3726, 98, 25, 14, 2841, 128, 13, 1, 15895, 4544, 3726, 7, 219, 7, 1, 17, 13, 1, 15895, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Schema information for entityFramework not found === When I open the `web.config`-file in my ASP.NET-Webapplication, some messages are displayed in the error list: Meldung 1 Die Schemainformationen für das Element 'entityFramework' konnten nicht gefunden werden. Meldung 2 Die Schemainformationen für das Element 'defaultConnectionFactory' konnten nicht gefunden werden. Meldung 3 Die Schemainformationen für das Attribut 'type' konnten nicht gefunden werden. Meldung 4 Die Schemainformationen für das Element 'parameters' konnten nicht gefunden werden. Meldung 5 Die Schemainformationen für das Element 'parameter' konnten nicht gefunden werden. Meldung 6 Die Schemainformationen für das Attribut 'value' konnten nicht gefunden werden. So VisualStudio seems to be unable to find the schema information for the entityFramework, the other messages are caused by this issue. My `web.config`-file looks like this: <?xml version="1.0" encoding="utf-8"?> <configuration> [...] <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"> <parameters> <parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" /> </parameters> </defaultConnectionFactory> </entityFramework> </configuration> Where can I find the neccessary schema information file?
0
[ 2, 23874, 676, 26, 9252, 8361, 3783, 52, 216, 800, 3726, 3726, 76, 31, 368, 14, 13, 1, 14113, 9, 14093, 2816, 1, 8, 16877, 19, 51, 28, 306, 9, 2328, 8, 14113, 2552, 20669, 15, 109, 7561, 50, 6115, 19, 14, 7019, 968, 45, 4551, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ASM find offset with code === I would like to find the offsets of different methods in test cases I work with. I can find where methods start and end, I look for opcodes RETURN and ARETURN (Im doing so in a class that extends a methodVisitor in the method visitInsn()), but I have not been able to find the offset where those happen in the bytecode. Any ideas? *Just in case:* I am working with the core API of ASM, I am aware that the tree API could help me find what I need, but the tree API makes everything go slow and use memory and I can not afford any of those, so I work with the core API
0
[ 2, 28, 79, 477, 17493, 29, 1797, 800, 3726, 3726, 31, 83, 101, 20, 477, 14, 17493, 18, 16, 421, 3195, 19, 1289, 1871, 31, 170, 29, 9, 31, 92, 477, 113, 3195, 799, 17, 241, 15, 31, 361, 26, 3088, 9375, 18, 788, 17, 21, 24632,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
can I use YouTube Videos as main content on my Facebook Application? === I like to create an application which is same like Socialcam but in a different aspect, which is sports. I can get the user likes who are sports mens and create the video site according to them, in the process or creating the list of videos I would like to use Gdata api and use Youtube to pull youtube videos. Is that possible and is there any restrictions on that from the Youtube or where ever? Thanks all
0
[ 2, 92, 31, 275, 7330, 6610, 28, 407, 2331, 27, 51, 9090, 3010, 60, 800, 3726, 3726, 31, 101, 20, 1600, 40, 3010, 56, 25, 205, 101, 668, 8760, 47, 19, 21, 421, 7289, 15, 56, 25, 1059, 9, 31, 92, 164, 14, 4155, 101, 18, 72, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Stubbing a Mongoose model with Sinon === I want to create a stub for the Mongoose save method in a particular model, so that any instance of my model I create will call the stub instead of the normal Mongoose save method. My understanding is that the only way to do this is to stub the entire model like this: var stub = sinon.stub(myModel.prototype); Unfortunately, this line of code throws the following error: TypeError: Cannot read property 'states' of undefined Does anyone know what is going wrong here?
0
[ 2, 21354, 8136, 21, 3521, 839, 6641, 1061, 29, 3278, 218, 800, 3726, 3726, 31, 259, 20, 1600, 21, 21354, 26, 14, 3521, 839, 6641, 2079, 2109, 19, 21, 1498, 1061, 15, 86, 30, 186, 4851, 16, 51, 1061, 31, 1600, 129, 645, 14, 21354...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
void in C# generics? === I have a generic method that takes a request and provides a response. public Tres DoSomething<Tres, Treq>(Tres response, Treq request) {/*stuff*/} But I don't always want a response for my request, and I don't always want to feed request data to get a response. I also don't want to have to copy and paste methods in their entirety to make minor changes. What I want, is to be able to do this: public Tre DoSomething<Tres>(Tres response) { return DoSomething<Tres, void>(response, null); } Is this feasible in some manner? It seems that specifically using void doesn't work, but I'm hoping to find something analogous.
0
[ 2, 11364, 19, 272, 5910, 12733, 18, 60, 800, 3726, 3726, 31, 57, 21, 12733, 2109, 30, 1384, 21, 3772, 17, 1927, 21, 1627, 9, 317, 13, 8722, 107, 9099, 1, 8722, 15, 4607, 1251, 1, 5, 8722, 1627, 15, 4607, 1251, 3772, 6, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Render chart in ExtJS 4 Container/Panel === I have a predefined pie chart like this: Ext.create('Ext.chart.Chart', { width : 450, height : 300, animate : true, store : store, theme : 'Base:gradients', series : [{ type : 'pie', field : 'data1', showInLegend : true, tips : { trackMouse : true, width : 140, height : 28, renderer : function(storeItem, item) { // calculate and display percentage on hover var total = 0; store.each(function(rec) { total += rec.get('data1'); }); this.setTitle(storeItem.get('name') + ': ' + Math.round(storeItem.get('data1') / total * 100) + '%'); } }, highlight : { segment : { margin : 20 } }, label : { field : 'name', display : 'rotate', contrast : true, font : '18px Arial' } }] }); Then I created a Container/Panel, here I am using Container. I am looking for a way to put my pre-defined chart into the Container. I saw some examples they actually define the chart in the Container field, but that's not what I want. Is there any way that I can put my pre-specified chart in the `items` field below so that the chart can be rendered? Ext.create('Ext.container.Container', { layout: 'fit', width: 600, height: 600, renderTo: Ext.getBody(), border: 1, style: {boderColor: '#000000', borderStyle: 'solid', borderWidth: '1px'}, items: [{ }] }); Thanks
0
[ 2, 16535, 1795, 19, 1396, 38, 728, 18, 268, 12147, 118, 3206, 532, 800, 3726, 3726, 31, 57, 21, 782, 13439, 5470, 1795, 101, 48, 45, 1396, 38, 9, 6037, 1373, 5, 22, 1706, 38, 9, 5433, 38, 9, 5433, 38, 22, 15, 13, 1, 9456, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SlideShare presentation fails to load properly in IE8 and IE9 within a Bootstrap Modal window === I have a SlideShare presentation I'm trying to display within a modal window. When added to the page normally, the slideshare loads fine. However, when placed within a Bootstrap Modal window (v 2.0.4), the iFrame fails to render properly. <div id="modalWindow" class="modal hide fade"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h3>Title</h3> </div> <div class="modal-body" style="max-height: none;"> <div style="width:595px" id="__ss_9983242"><iframe src="http://www.slideshare.net/slideshow/embed_code/9983242" width="595" height="497" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0" allowfullscreen></iframe></div> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal" >Close</a> </div> </div> I can fix the IE9 one with CSS IE developer toolbar... but only if I change the CSS of code within the iFrame. Obviously I cannot do this programatically due to the inability to change the CSS of a page not on my domain within an iFrame. I can load up the slideshare normally within a lightbox_me modal, but since we're using Bootstrap I'd like to stick with the bootstrap built in stuff. Any help would be appreciated IE8: ![How it appears in IE8][1] IE9: ![How it appears in IE9][2] [1]: http://i.stack.imgur.com/2ntF6.jpg [2]: http://i.stack.imgur.com/jfmHI.jpg
0
[ 2, 6464, 16608, 6364, 13614, 20, 6305, 7428, 19, 13, 660, 457, 17, 13, 660, 518, 363, 21, 5894, 16514, 13, 20756, 1463, 800, 3726, 3726, 31, 57, 21, 6464, 16608, 6364, 31, 22, 79, 749, 20, 3042, 363, 21, 13, 20756, 1463, 9, 76, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Zipping unequal lists in python in to a list which does not drop any element from longer list being zipped === I have two lists a = [1,2,3] b = [9,10] I want to combine (zip) these two lists into one list c such that c = [(1,9), (2,10), (3, )] Is there any function in standard library in python to do this.
0
[ 2, 12133, 3181, 26961, 7227, 19, 20059, 19, 20, 21, 968, 56, 630, 52, 2804, 186, 4520, 37, 1045, 968, 142, 28693, 800, 3726, 3726, 31, 57, 81, 7227, 21, 800, 636, 15793, 15, 240, 500, 334, 800, 636, 518, 15, 1036, 500, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to get the data from one rich:picklist(selected items) to another rich:picklist as available items === I am using richface in seam frame work.I am applied the two rich:picklists in one rich:modelpanal. Those two are working fine.But here i have a problem.I have to displayed the data (which is in first picklist ) in second picklist. In first picklist,if i clicking the one item, then related data of this item(selected item) has to be displayed in second picklist as (available items) of same rich:modelpanal. Kindly any one help me. thanks in advanced. this is my code
0
[ 2, 184, 20, 164, 14, 1054, 37, 53, 2042, 45, 16855, 5739, 5, 18, 7138, 3755, 6, 20, 226, 2042, 45, 16855, 5739, 28, 904, 3755, 800, 3726, 3726, 31, 589, 568, 2042, 6413, 19, 13927, 3523, 170, 9, 49, 589, 2435, 14, 81, 2042, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL concurrent multi-row inserts - Insert ID Assumption === In my application, I have a lot of foreign key dependencies, and often insert large numbers of rows. What I have done up until now is run a single insert at a time, and record the insert ID. This tends to take a long time when inserting a large number of rows, even when apache and mysql are run on the same server. My question is, if I were to alter my application to add a number of rows with a single INSERT, would I be able to assume the ids of each row based strictly upon the last insert id returned by the mysql connection? The issue is that there is the occasional situation where more than one person will be putting large amounts of information into the database at a time. From what I have been able to determine, it seems safe to assume that when you insert 500 rows, your insert ids will range from (lastInsertID-499) to (lastInsertID), regardless of whether a query from another connection has begun or ended in the time it took to complete, but I want to be sure this is accepted as safe practice. I am primarily running InnoDB, but there is the occasional MyISAM in there as well. Thanks All! -Jer
0
[ 2, 51, 18, 22402, 19513, 1889, 8, 5417, 14692, 18, 13, 8, 14692, 4924, 12027, 800, 3726, 3726, 19, 51, 3010, 15, 31, 57, 21, 865, 16, 1228, 1246, 29411, 15, 17, 478, 14692, 370, 2116, 16, 11295, 9, 98, 31, 57, 677, 71, 163, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting an openGL image - runs in simulator, crashes on iPad === The purpose of this function is to return a UIImage from an openGL image. The reason it's being converted to a CG image is so openGL and UIKit elements can be rendered on top of each other, which is taken care of in another function. The strange thing is, when the app is run in the simulator, everything works fine. However, after testing the app on multiple different iPads, when the `drawGlToImage` method is called on `self`, the app crashes with a EXC_BAD_ACCESS code=1 error. Does anyone know what I'm doing here that would cause this? I've read that `UIGraphicsBeginImageContext()` used to have thread safety issues, but it seems like that was fixed in iOS 4. - (UIImage *)drawGlToImage { CGRect glFrame = [self.chart getGLFrame]; UIGraphicsBeginImageContext(glFrame.size); unsigned char buffer[1024 * 768 * 4]; CGContextRef currentContext = UIGraphicsGetCurrentContext(); glReadPixels(0, 0, 1024, 768, GL_RGBA, GL_UNSIGNED_BYTE, &buffer); //flips the image - note, I have tried commenting this section out, letting the image //render in the default, upside down position and it still crashes NSInteger dataSize = 1024 * 768 * 4; GLubyte *flippedBuffer = (GLubyte *) malloc(dataSize); for(int y = 0; y <768; y++) { for(int x = 0; x <1024 * 4; x++) { if(buffer[y* 4 * 1024 + x]==0) flippedBuffer[(767 - y) * 1024 * 4 + x]=1; else flippedBuffer[(767 - y) * 1024 * 4 + x] = buffer[y* 4 * 1024 + x]; } } CGDataProviderRef ref = CGDataProviderCreateWithData(NULL, flippedBuffer, 1024 * 768 * 4, NULL); CGImageRef iref = CGImageCreate(1024,768,8,32,1024*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaLast, ref, NULL, true, kCGRenderingIntentDefault); CGContextScaleCTM(currentContext, 1.0, -1.0); CGContextTranslateCTM(currentContext, 0, -glFrame.size.height); UIImage *glImage = [[UIImage alloc] initWithCGImage:iref]; UIGraphicsEndImageContext(); return glImage; } When a button is pressed, a method that is called makes this assignment, which causes the app to crash. UIImage *glImage = [self drawGlToImage];
0
[ 2, 1017, 40, 368, 8430, 1961, 13, 8, 1461, 19, 24565, 15, 21563, 27, 31, 8240, 800, 3726, 3726, 14, 2131, 16, 48, 1990, 25, 20, 788, 21, 13, 5661, 22039, 37, 40, 368, 8430, 1961, 9, 14, 1215, 32, 22, 18, 142, 3494, 20, 21, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...