unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Ant, execute-sql-script and errors with PostgreSQL === We use Ant to create a database in our testing environment with the following task <execute-sql-script driver=org.postgresql.Driver url=jdbc:postgresql://127.0.0.1:5432/lakshmi_testapp?searchpath=lakshmi_stdcmp user=lakshmi_stdcmp password=******** classpathid=execute-sql.classpath sqlfile=/var/lib/jenkins/jobs/Lakshmi-Testapp-PostgreSQL/workspace/target/lakshmi-std-cmp-opu.sql /> Example file: create table PersistentOrder ( dbId int8 not null, orderActionsBinary oid, orderActionsText text, orderIssuerId varchar(255), orderIssuerName varchar(255), orderType varchar(255), returnType int4, uuid varchar(255), primary key (dbId) ); create table REVINFO ( REV int4 not null, REVTSTMP int8, primary key (REV) ); If I try to execute the file with psql or pgAdmin I have no errors but when executed through Ant I get: [sql] Executing resource: /var/lib/jenkins/jobs/Lakshmi-Testapp-PostgreSQL/workspace/target/lakshmi-std-cmp-opu.sql [sql] Failed to execute: create table if not exists PersistentOrder ( dbId int8 not null, orderActionsBinary oid, orderActionsText text, orderIssuerId varchar(255), orderIssuerName varchar(255), orderType varchar(255), returnType int4, uuid varchar(255), primary key (dbId) ) [sql] org.postgresql.util.PSQLException: ERROR: syntax error at or near "not" [sql] Position: 19 [sql] Failed to execute: create table if not exists REVINFO ( REV int4 not null, REVTSTMP int8, primary key (REV) ) [sql] org.postgresql.util.PSQLException: ERROR: syntax error at or near "not" [sql] Position: 19 [sql] Failed to execute: drop sequence if exists hibernate_sequence [sql] org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block [sql] Failed to execute: create sequence hibernate_sequence; [sql] org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block [sql] 0 of 4 SQL statements executed successfully Any hint?
0
[ 2, 40, 38, 15, 15644, 8, 18, 22402, 8, 8741, 17, 11908, 29, 678, 6879, 18, 22402, 800, 3726, 3726, 95, 275, 40, 38, 20, 1600, 21, 6018, 19, 318, 4431, 2307, 29, 14, 249, 3005, 13, 1, 1706, 17194, 591, 8, 18, 22402, 8, 8741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 fill 100% of webpage with a colour === Can anyone please help? I have a page that has a header, main content box and footer. Here’s a link to the page that is in development [My Test Page][1]. The problem that I’m having is with what I have called “Background box” (the box in pink with a dark brown top border). I need it to auto-fill the whole screen, right past the footer, but at the moment it just fills the screen up to the fold of the screen, so if I scroll down it doesn’t actually fill the entire screen. I have tried height: auto; and height: 100%; but none of these give the desired effect. Does anyone have any suggestions as to what I can do to fix this issue? If anyone would like the code I can post it here, but you should be able to view the code through your browser. [1]: http://hansmoolman.com/
0
[ 2, 184, 20, 3509, 12849, 16, 2741, 6486, 29, 21, 4609, 800, 3726, 3726, 92, 1276, 2247, 448, 60, 31, 57, 21, 2478, 30, 63, 21, 157, 106, 15, 407, 2331, 1649, 17, 1749, 106, 9, 235, 1, 18, 21, 3508, 20, 14, 2478, 30, 25, 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 define the markers for Watershed in OpenCV? === I'm writing for Android with OpenCV. I'm segmenting an image similar to below using marker-controlled watershed, without the user manually marking the image. I'm planning to use the regional maxima as markers. minMaxLoc() would give me the value, but how can I restrict it to the blobs which is what I'm interested in? Can I utilize the results from findContours() or cvBlob blobs to restrict the ROI and apply maxima to each blob? ![enter image description here][1] [1]: http://i.stack.imgur.com/7EU8I.jpg
0
[ 2, 184, 20, 9267, 14, 19482, 26, 13060, 19, 368, 12732, 60, 800, 3726, 3726, 31, 22, 79, 1174, 26, 13005, 29, 368, 12732, 9, 31, 22, 79, 5631, 68, 40, 1961, 835, 20, 1021, 568, 13289, 8, 12742, 13060, 15, 366, 14, 4155, 23671, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Usb Flash protection === I develop application based on external usb disk driver, and I need only my application which can read and write to this disk driver, what i shall do to implement this task.
0
[ 2, 182, 220, 4433, 2057, 800, 3726, 3726, 31, 2803, 3010, 432, 27, 4886, 182, 220, 8582, 2425, 15, 17, 31, 376, 104, 51, 3010, 56, 92, 1302, 17, 2757, 20, 48, 8582, 2425, 15, 98, 31, 3004, 107, 20, 8713, 48, 3005, 9, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
ZEND_RADIO With ZEND_FILE === I have a problem with my zend_form_element_RADIO. i want to include in my ZEND_radio a ZEND_File like this : i have 5 radio button. The last button isn't a picture it's a zend_file. $imageUpload = new Zend_Form_Element_File('imageUpload'); $imageUpload->setDestination(APPLICATION_PATH .'/../images/tmp/'); $imageUpload->clearDecorators()->addDecorators($testDecorators); $imageDefault->addMultiOptions(array( '1' => $htmlImage1, '2' => $htmlImage2, '3' => $htmlImage3, '4' => $htmlImage4, '5' => $htmlImage5, '6' => $imageUpload)); how it's possible in my COntroller, to recover my file $form ... ->addElement($imageDefault) ->addElement($content) ...; return $form; } my controller: I want my file if I checked the radio button, else the id of the picture checked public function saveNews($form){ $request = $this->getRequest();//Récupération des données du formulaire if ($this->getRequest()->isPost()) { if ($form->isValid($request->getPost())) { //Sauvegarde du contenu de la News $new = new Application_Model_News($form->getValues()); $mapperNew = new Application_Model_NewsMapper(); $idNews=$mapperNew->save($new); $tabPosts = $request->getPost(); if (!$form->imageUpload->receive()) { print "Erreur de réception de fichier"; } $location = $form->imageUpload->getFileName(); $imageUpload = new Ibacko_Plugin_IbackoPhoto(); $imageUpload->uploadPhoto($idNews, $location);
0
[ 2, 10526, 43, 1, 11129, 29, 10526, 43, 1, 16877, 800, 3726, 3726, 31, 57, 21, 1448, 29, 51, 10526, 43, 1, 4190, 1, 27567, 1, 11129, 9, 31, 259, 20, 468, 19, 51, 10526, 43, 1, 11129, 21, 10526, 43, 1, 16877, 101, 48, 13, 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...
Get last item from input iterator === Is this correct behaviour for an input iterator, with regard to accessing the last item: for(i=being();i!=end();i++){} std::string s = i->toString(); return s; Or should it throw an exception if I try to do this? My iterator makes use of two c function calls: getFirst(...) and getNext(...)
0
[ 2, 164, 236, 9101, 37, 6367, 32, 106, 3457, 800, 3726, 3726, 25, 48, 4456, 7727, 26, 40, 6367, 32, 106, 3457, 15, 29, 6731, 20, 1381, 68, 14, 236, 9101, 45, 26, 5, 49, 3726, 10554, 5, 6, 73, 49, 187, 3726, 2451, 5, 6, 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...
Show folder/files structure on mobile phone === I'm trying to find a way to format a tree structure corresponding to a folder/files structure in a way similar with the "listview" included in jQuery Mobile. The problem is that for a folder a user may decide to see the included folders and files (this can be done very nice and easy with the listview), but also it can decide to see the folder properties. Any idea about a possible structure (existent or which I could implement) that I could use to show the folder/files data on a mobile phone?
0
[ 2, 298, 19294, 118, 16877, 18, 1411, 27, 3241, 1132, 800, 3726, 3726, 31, 22, 79, 749, 20, 477, 21, 161, 20, 2595, 21, 1541, 1411, 7265, 20, 21, 19294, 118, 16877, 18, 1411, 19, 21, 161, 835, 29, 14, 13, 7, 5739, 4725, 7, 506,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 listen for ACTION_SCREEN_OFF in android === I'm trying to start a service that runs in the background that is listening for ACTION_SCREEN_OFF and when it finds ACTION_SCREEN_OFF starts my activity. I read somewhere you need to create the broadcast receiver because putting it in the manifest xml doesn't work. But i have no idea where to get started after much searching.
0
[ 2, 184, 20, 3834, 26, 1028, 1, 7187, 1, 1299, 19, 13005, 800, 3726, 3726, 31, 22, 79, 749, 20, 799, 21, 365, 30, 1461, 19, 14, 2395, 30, 25, 4948, 26, 1028, 1, 7187, 1, 1299, 17, 76, 32, 3797, 1028, 1, 7187, 1, 1299, 3244, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
2 forms in the same page in drupal === I need to know if there is a way to display 2 form in a same page, the reason is that I want have a search field in a form that when this make submit, the form2 display the list of data, in the form2 there is a textfield when you can select items for the list and set a comment on for the selected items so when form2 make submit save information about every selected item. So there is way? Thanks.
0
[ 2, 172, 1997, 19, 14, 205, 2478, 19, 15708, 6720, 800, 3726, 3726, 31, 376, 20, 143, 100, 80, 25, 21, 161, 20, 3042, 172, 505, 19, 21, 205, 2478, 15, 14, 1215, 25, 30, 31, 259, 57, 21, 2122, 575, 19, 21, 505, 30, 76, 48, 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...
Storyboard editor layout confusion === I am having layout problems with the storyboard editor with a fairly simple screen. I have a UIViewController to which I have added a 320x440 UIScrollView at 0,0 followed by a 320x20 UIProgressBar at 0,440. It looks fine in Storyboard editor. I'm not entirely sure how the 20 pixel status bar at the top of the screen is accommodated given the CGRect frame coordinates that Storyboard calculates. On loading ( in `-(void)viewDidLoad` ), the UIScrollView frame seems to be set to **320x460** pixels at 0,0 but the UIProgressBar is still 320x20 at 0,440. When I add subviews to the UIScrollView, (UIImageViews in particular), they get stretched and get clipped on the screen because although the UIScrollView thinks it is 460 pixels high, it only has 440 pixels of screen to display in. Can anyone point me to a solution? Thanks
0
[ 2, 609, 2806, 1835, 9106, 5677, 800, 3726, 3726, 31, 589, 452, 9106, 1716, 29, 14, 609, 2806, 1835, 29, 21, 6647, 1935, 2324, 9, 31, 57, 21, 13, 5661, 4725, 12898, 1252, 20, 56, 31, 57, 905, 21, 13, 12402, 396, 16403, 13, 5661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Catching Oracle Errors in Django === My Django app runs on an Oracle database. A few times a year, the database is unavailable because of a scheduled process or unplanned downtime. However, I can't see how to catch the error a give a useful message back to the requester. Instead, a 500 error is triggered, and I get an email (or hundreds) showing the exception. One example is: File "/opt/UDO/env/events/lib/python2.6/site-packages/django/db/backends/oracle/base.py", line 447, in _cursor self.connection = Database.connect(conn_string, **conn_params) DatabaseError: ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege I see a similar error with a different ORA number when the DB is down. Because the exception is thrown deep within the Django libraries, and can be triggered by any of my views or the built in admin views, I don't know where any exception trapping code would go. Any suggestions?
0
[ 2, 9436, 15759, 11908, 19, 3857, 14541, 800, 3726, 3726, 51, 3857, 14541, 4865, 1461, 27, 40, 15759, 6018, 9, 21, 310, 436, 21, 159, 15, 14, 6018, 25, 22563, 185, 16, 21, 3758, 953, 54, 367, 27056, 125, 891, 9, 207, 15, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 extract a postcode from one column in SSIS using regular expression === I'm trying to use a custom regex clean transformation (information found [here][1] ) to extract a post code from a mixed address column (Address3) and move it to a new column (Post Code) Example of incoming data: Address3: "London W12 9LZ" Incoming data could be any combination of place names with a post code at the start, middle or end (or not at all). Desired outcome: Address3: "London" Post Code: "W12 9LZ" Essentially, in plain english, "move (not copy) any post code found from address3 into Post Code". My regex skills aren't brilliant but I've managed to get as far as extracting the post code and getting it into its own column using the following regex, matching from Address3 and replacing into Post Code: Match Expression: (?<stringOUT>([A-PR-UWYZa-pr-uwyz]([0-9]{1,2}|([A-HK-Ya-hk-y][0-9]|[A-HK-Ya-hk-y][0-9] ([0-9]|[ABEHMNPRV-Yabehmnprv-y]))|[0-9][A-HJKS-UWa-hjks-uw])\ {0,1}[0-9][ABD-HJLNP-UW-Zabd-hjlnp-uw-z]{2}|([Gg][Ii][Rr]\ 0[Aa][Aa])|([Ss][Aa][Nn]\ {0,1}[Tt][Aa]1)|([Bb][Ff][Pp][Oo]\ {0,1}([Cc]\/[Oo]\ )?[0-9]{1,4})|(([Aa][Ss][Cc][Nn]|[Bb][Bb][Nn][Dd]|[BFSbfs][Ii][Qq][Qq]|[Pp][Cc][Rr][Nn]|[Ss][Tt][Hh][Ll]|[Tt][Dd][Cc][Uu]|[Tt][Kk][Cc][Aa])\ {0,1}1[Zz][Zz]))) Replace Expression: ${stringOUT} So this leaves me with: Address3: "London W12 9LZ" Post Code: "W12 9LZ" My next thought is to keep the above match/replace, then add another to match anything that doesn't match the above regex. I think it might be a negative lookahead but I can't seem to make it work. I'm using SSIS 2008 R2 and I think the regex clean transformation uses .net regex implementation. Thanks. [1]: http://www.sqlis.com/post/RegexClean-Transformation.aspx
0
[ 2, 184, 107, 31, 10962, 21, 678, 9375, 37, 53, 4698, 19, 13, 18, 4557, 568, 1290, 1803, 800, 3726, 3726, 31, 22, 79, 749, 20, 275, 21, 5816, 7953, 1706, 2745, 6978, 13, 5, 22793, 216, 636, 6836, 500, 2558, 165, 500, 13, 6, 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...
HTML no break when expected === I've got a strange splitting bug in a website I am making. Everywhere on the website the text is split in the correct way. But in one block it isn't. http://www.spanjevakantiewinkel.nl/ At the bottom: "aankomende evenementen". Bunol, the last words are under the words of the next block! But all CSS of these blocks is the same... I have nu idea how to solve this...
0
[ 2, 13, 15895, 90, 1442, 76, 1727, 800, 3726, 3726, 31, 22, 195, 330, 21, 2578, 17282, 6256, 19, 21, 2271, 31, 589, 544, 9, 6417, 27, 14, 2271, 14, 1854, 25, 2132, 19, 14, 4456, 161, 9, 47, 19, 53, 1921, 32, 2532, 22, 38, 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...
Testing AppServer/Database Availability Remotely in Progress 4GL === We have Progress appservers (OE 10.05B) running on AIX UNIX and I want write some code to check if they are up and running. The code to check the appserver would be run from a WIN2008 server. I can pull up Progress Explorer on the WIN2008 server to check the status of the appservers, but I need to write some code that can check their status programatically. Is there any way to programatically check whether my AIX UNIX Progress appserver is up and running from a remote WIN2008 server?
0
[ 2, 4431, 4865, 10321, 106, 118, 18768, 8436, 11886, 23288, 19, 3455, 268, 8430, 800, 3726, 3726, 95, 57, 3455, 4865, 10321, 445, 13, 5, 8018, 332, 9, 4071, 220, 6, 946, 27, 21, 4028, 22540, 17, 31, 259, 2757, 109, 1797, 20, 2631, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
TAR'ing files in different directories === Never coded in Shell before, need to TAR 7 files, 5 are located in one directory, two are located in another. Sounds simple, right? Should be. I'm guessing that we assign variables to each file, then TAR them up. How does this syntax work?
0
[ 2, 2475, 22, 68, 6488, 19, 421, 559, 1596, 800, 3726, 3726, 243, 13, 22254, 19, 3593, 115, 15, 376, 20, 2475, 453, 6488, 15, 331, 50, 335, 19, 53, 16755, 15, 81, 50, 335, 19, 226, 9, 2795, 1935, 15, 193, 60, 378, 44, 9, 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...
Refresh Breaks Jquery === In rails I have the following: <div id="holders"> <% @holders.each do |holder| %> <b><%= holder.name %></b> <li class="dropdown" id="<%= holder.id%>" class="editmenu"> <a class="dropdown-toggle" data-toggle="dropdown" href="<%= holder.id%>"> <small>Edit</small> </a> <ul class="dropdown-menu"> <li> <%= form_for(holder) do |f| %> <%= render 'shared/error_messages', object: f.object %> <%= f.text_field :name %> <br /> <%= f.text_field :description %> <br /> <%= f.submit "Save Edit", class: "btn-danger", remote: true%> <% end %> </li> </ul> </li> <li class="dropdown">| <%= link_to "View", holder_path(holder) %></li> <li class="dropdown">| <%= link_to "Delete", holder_path(holder), method: "delete"%></li> <p><%= holder.description %></p> <hr> <% end %> and in index.js.erb I have: $('#holders').html("<%=j render holder %>"); Now, I have two questions: 1. I can have the line `"<%=j render holder %>"` or `"<%=j render @holder %>"` and they both work the same. Why is that and is there a correct one to use? 2. The page works fine and updates the holder. But, if I refresh the page or leave the page and come back it breaks and it does a whole page refresh. The only way I have found to fix it is to clear my cache and that seems to make it work until I leave the page and come back or refresh the page. What would cause that?
0
[ 2, 24905, 7947, 487, 8190, 93, 800, 3726, 3726, 19, 2240, 18, 31, 57, 14, 249, 45, 13, 1, 12916, 4924, 3726, 7, 11119, 7, 1, 13, 1, 11881, 13, 1, 11119, 9, 14322, 107, 13, 1, 12427, 1, 13, 11881, 1, 13, 1, 220, 1, 11881, 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...
Jquery clickevent to check url === I am trying to implement a method that check if the link use click on is same on the current page nothing will happen. Otherwise go to the location of link user click on. I know that var pathname = window.location.pathname; to get the current link. but not sure how to get the links when user click on ... Thank you very much ...
0
[ 2, 487, 8190, 93, 10840, 4943, 38, 20, 2631, 287, 6362, 800, 3726, 3726, 31, 589, 749, 20, 8713, 21, 2109, 30, 2631, 100, 14, 3508, 275, 10840, 27, 25, 205, 27, 14, 866, 2478, 626, 129, 2384, 9, 3190, 162, 20, 14, 1474, 16, 35...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Get CPU Multi-Core Usage in Visual C# === been searching around for this for a while, and hoping someone here can answer my question. So I am trying to find the best way to get the **average** CPU usage of 2 or 4 cores. Currently I am using a Performance Counter which so far as I can tell, only returns the usage of a single core. Ideally I would like it to match or at least resemble the Usage bar in Task Manager, and I have looked into WMI queries but was hoping to get some clarification on the best approach. I am currently using an i7, which has hyperthreading, i.e has "8" cores. Not sure if this makes much difference, but though it might. Thanks for any pointers
0
[ 2, 164, 17578, 1889, 8, 10375, 7514, 19, 3458, 272, 5910, 800, 3726, 3726, 74, 5792, 140, 26, 48, 26, 21, 133, 15, 17, 3935, 737, 235, 92, 1623, 51, 1301, 9, 86, 31, 589, 749, 20, 477, 14, 246, 161, 20, 164, 14, 13, 1409, 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...
What in nginx determines what goes to rails and what is served directly? === I have a nginx + thin + Rails 3.2 setup. Currently I am trying to setup nginx so it can serve cached pages directly. However nginx still pass *.html request to Rails in the following nginx configuration files. The html files exists in public folder, and nginx does find them, just that they are still passed to Rails. upstream site { server unix:/home/site/deploy/site/shared/pids/thin.0.sock; } server { listen 80; server_name www.example.com; rewrite ^(/.*) http://example.com$1 permanent; } # asset server server { listen 80; server_name assets.example.com; expires max; add_header Cache-Control public; charset utf-8; root /home/site/deploy/site/current/public/; } # frontend server { listen 80; server_name .example.com; charset utf-8; root /home/site/deploy/site/current/public/; index index.html; location ~* ^.+.(jpg|jpeg|gif|png|swf|zip|rar|doc|xls|exe|pdf|ppt|txt|tar)$ { root /home/site/deploy/site/current/public/; expires max; break; } # serve static files if (-f $request_filename) { break; } gzip on; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (-f $request_filename) { break; } if (-f $document_root/cache/$host/$uri/index.html) { rewrite (.*) /cache/$host/$1/index.html break; } if (-f $document_root/cache/$host/$uri.html) { rewrite (.*) /cache/$host/$1.html break; } if (-f $document_root/cache/$host/$uri) { rewrite (.*) /cache/$host/$1 break; } proxy_pass http://site; break; } } I am new to nginx, and this configuration file is copied from previous projects I have not worked on, so this is probably a very newbie question.
0
[ 2, 98, 19, 13, 2723, 108, 396, 3746, 18, 98, 1852, 20, 2240, 18, 17, 98, 25, 423, 1703, 60, 800, 3726, 3726, 31, 57, 21, 13, 2723, 108, 396, 2754, 2951, 2754, 2240, 18, 203, 9, 135, 18161, 9, 871, 31, 589, 749, 20, 18161, 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...
Compiling with -fPIC and Swig error === I'm trying to add a Swig interface ontop of some already existing c++ code and I'm coming up with some errors with the -fPIC flag. If I compile the already existing code without -fPIC and then create my Swig module using: swig -python -c++ pyinterface.i gcc -fPIC $(CFLAGS)-I $(PYTHON_INCLUDE_DIR) -c pyinterface_wrap.cxx g++ -shared -o _pyinterface.so pyinterface_wrap.o -I $(PYTHON_INCLUDE_DIR) -L $(PYTHON_LIB_DIR) $(LPATH) $(LFLAGS) $(IPATH) $(LIBS) Then I get a "warning: creating a DT_TEXTREL in object" warning. However the module does seem to load and work in Python. If I compile the already existing code with -fPIC and then do the same to create my module, when I try and import it into python: import pyinterface Then I get the error ImportError: ./_pyinterface.so: undefined symbol: _Z7InitErfPA20_d I can't tell why this would be. However, in the compliation of the base c++ files that I am trying to wrap, they do link to some standard libraries such as -llapack. Could it be that I need to recompile these base libraries, like lapack, with -fPIC. That seems insane..
0
[ 2, 24378, 29, 13, 8, 410, 7763, 17, 13, 18, 12445, 7019, 800, 3726, 3726, 31, 22, 79, 749, 20, 3547, 21, 13, 18, 12445, 6573, 27, 3880, 16, 109, 614, 3149, 272, 20512, 1797, 17, 31, 22, 79, 880, 71, 29, 109, 11908, 29, 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...
Basic Authentication at Grizzly Server === I am using Jersey Grizzly and want to implement Basic Authentication to Grizzly. I create my grizzly server as follows: ResourceConfig rc = new PackagesResourceConfig("com.abc.de"); GrizzlyServerFactory.createHttpServer(BASE_URI, rc); at another class I have something like: @GET @Produces("text/plain") @Path("/description") public String getDescription() { String description = "probeDescription"; return description; } I don't know the difference and main concepts of jersey and grizzly. What jersey can't do that grizzly can. However I want that if a user wants to get description it should pass the basic authentication. Any ideas about how can I implement it?
0
[ 2, 2125, 27963, 35, 29328, 8128, 800, 3726, 3726, 31, 589, 568, 2134, 29328, 17, 259, 20, 8713, 2125, 27963, 20, 29328, 9, 31, 1600, 51, 29328, 8128, 28, 2415, 45, 6577, 14093, 2816, 16462, 800, 78, 16875, 99, 12097, 14093, 2816, 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...
Validating array of inputs using javascript === I hav a rather large form it has 8 fields for entering books . Now for user to add more books there is a button add more books ,on click of which a javascript function is called and 7 out of 8 fields are duplicated. User can add maximum 6 books , and all the input fields created dynamically have their names as arrays . I am able to post them and store in a table , Now i want to validate them using javascript. I have been tryng to do this since a week and am a new to Javascript . Please help me. MY JAVASCRIPT CODE enter function addInput(divName){ var bname1 = new Array(); var abname1 = new Array(); var cost1 = new Array(); var num1 = new Array(); if (counter == limit) { alert("You have reached the limit of adding " + counter + " inputs"); } else { var newdiv = document.createElement('div'); newdiv.innerHTML ="<table>"+ "<tr align='right'>" + "<td>"+ " Name of book" +(counter + 1) + " " +" : <input type='text' name='bname1[]' > "+"</td>" + "</tr>"+"<tr align='right'>"+ "<td>"+" Name of Authour"+(counter + 1)+" "+": <input type='text' name='aname1[]'>"+"</td>"+"</tr>"+"<tr align='right'>"+"<td>"+"Publisher"+(counter+1)+" "+": <input tyme='text' name='pub1[]'>"+"</td>"+"</tr>"+ "<tr align='right'>" +"<td>"+ "ISDN Number " + (counter + 1) +" "+ ": <input type='text' name='isdn1[]'> "+"</td>" + "</tr>"+"<tr align='right'>" +"<td>"+ " Edition " + (counter + 1) + " "+": <input type='text' name='edi1[]'> "+"</td>" + "</tr>"+"<tr align='right'>" + "<td>"+ "Price"+(counter + 1) +" "+ " :<input type='number' name='cost1[]'>"+"</td>"+"</tr>"+"<tr align='right'>" + "<td>"+ "Number of copies"+(counter + 1) +" "+ ": <input type='number' name ='num1[]'> "+"</td>" + "</tr>"+ "</table>"; // alert("counter +1 is "+counter+1); document.getElementById(divName).appendChild(newdiv); counter=counter+1; } } there is divsion in the html form to which all this is added. Please help ! thanx in advance ..
0
[ 2, 7394, 1880, 7718, 16, 6367, 18, 568, 8247, 8741, 800, 3726, 3726, 31, 13, 14462, 21, 864, 370, 505, 32, 63, 469, 2861, 26, 4604, 964, 13, 9, 130, 26, 4155, 20, 3547, 91, 964, 80, 25, 21, 5167, 3547, 91, 964, 13, 15, 218, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
about service accounts and unregistered users === i have a web app in php mysql, i want to use one google drive account for my app. can i use my app's accounts instead of google users for privilages. i read in SDK i can use service account to login without promting user, but i dont know how to share or give permissions files for custom users, in api reference writes this: (page)Managing permissions; at type,value,roles String identifier of this specific user. The user is not necessarily yet a Google user (e.g. if a file or folder is shared with an email address that does not yet have an associated Google account). Example: 1111459233037698895607 how a custom user in my app should get a token for own privilages thanks for answer
0
[ 2, 88, 365, 5310, 17, 367, 24911, 3878, 800, 3726, 3726, 31, 57, 21, 2741, 4865, 19, 13, 26120, 51, 18, 22402, 15, 31, 259, 20, 275, 53, 8144, 1493, 2176, 26, 51, 4865, 9, 92, 31, 275, 51, 4865, 22, 18, 5310, 700, 16, 8144, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 avoid "chain" in this situation in Struts2? === I have an Action, called `ShowData` that recovers data from the database and put it in the jsp. **struts.xml** ... <action name="ShowData" class="foo"> <result>foo.jsp</result> </action> ... In the foo.jsp page I have a form and the data that I have obtained with the `ShowData` action. **foo.jsp** ... <s:form action="DoSomething"> <s:input key="email" /> <s:submit/> </s:form> <s:iterator value="data_recovered_in_ShowData"> ... </s:iterator> ... Now I want to add some validation to data. If the return type of `DoSomething` is something like this: `<result name="input">foo.jsp</result>` I will lose the data that I recover in `ShowData` action, but the validation works perfectly and the previous input of the user and the error will be showed in the jsp page. On the other hand, I know that I can use `chain`, to do something like `<result name="input" type="chain">ShowData</result>` and then use MessageStoreInterceptor to recover the data (but I still don't know how to recover the previous data that the user had introduced in the input). But this is a solution that I'm trying to avoid since I read that it is not a good solution. So then, how do I add some validation in this case without losing any data and without using chain?
0
[ 2, 184, 107, 31, 2658, 13, 7, 17317, 7, 19, 48, 1858, 19, 18316, 18, 135, 60, 800, 3726, 3726, 31, 57, 40, 1028, 15, 227, 13, 1, 9303, 18768, 1, 30, 7635, 18, 1054, 37, 14, 6018, 17, 442, 32, 19, 14, 487, 3401, 9, 13, 1409...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Multiple List Accordion Issue === I have two lists that I would like to function similar to an accordian, when the specified element is clicked, the specified list is hidden, and on click again it would toggle to shown. The HTML: <ul class="acc" id="acc"> <li> <h3 class="slide">CATEGORIES</h3> <div class="acc-section"> <div class="acc-content view"> <ul> <li><a href="#">Item</a></li> <li><a href="#">Item</a></li> <li><a href="#">Item</a></li> </ul> </div> </div> </li> <li> <h3 class="slide2">CATEGORIES</h3> <div class="acc-section"> <div class="acc-content view2"> <ul> <li><a href="#">Item</a></li> <li><a href="#">Item</a></li> </ul> </div> </div> </li> </ul> </div> I have accomplished this for both lists using the following code: $(document).ready(function() { $('h3.slide').toggle(function() { $('div.view').fadeOut('slow'); return false; }, function() { $('div.view').fadeIn('slow'); return false; }); $('h3.slide2').toggle(function() { $('div.view2').fadeOut('slow'); return false; }, function() { $('div.view2').fadeIn('slow'); return false; }); }); My issue with this is that it is not 'dynamic' and if I were to add another list in the future then I would also have to the above code. I would prefer to be able to just use the one small piece of code and reuse the same two class names for the click able element and the show/hide element. I have attempt to accomplish this with the following code but am unable to get it to work properly: $(document).ready(function() { $('h3.slide').toggle(function() { $(this).siblings('div.view').fadeOut('slow'); return false; }, function() { $(this).siblings('div.view').fadeIn('slow'); return false; }); }); Any tips?
0
[ 2, 487, 8190, 93, 1886, 968, 20753, 1513, 800, 3726, 3726, 31, 57, 81, 7227, 30, 31, 83, 101, 20, 1990, 835, 20, 40, 12270, 806, 15, 76, 14, 9931, 4520, 25, 15802, 15, 14, 9931, 968, 25, 3689, 15, 17, 27, 10840, 188, 32, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ADFS Authentication Delegation Desktop / Mobile Applications === I was wondering if somebody could point me in the right direction. We're currently looking at hosting a web application for a client which will authenticate against the client's ADFS IIS server in order to take advantage of SSO etc. this is all fine and no problems here. The issue comes in when we consider our existing desktop and mobile applications (.NET, iOS, Android etc.). We need to authenticate these applications against the same user store as our web application. Is it possible to authenticate a Windows Desktop Application (written in .NET) against an external ADFS server? If so, please could you point me at an example? Is it possible to authenticate native mobile applications against ADFS? I guess we'll need to manually create HTTP requests etc. in order to handle this. Could somebody point me at any relevant documentation / examples? Alternatively, for mobile applications, would it be better to host our own internal webservice which acts as a 'middle-man'. Again, any examples of this would be greatly appreciated. Thanks David
0
[ 2, 21, 8736, 18, 27963, 9651, 17404, 13, 118, 3241, 3767, 800, 3726, 3726, 31, 23, 5712, 100, 8861, 110, 454, 55, 19, 14, 193, 1400, 9, 95, 22, 99, 871, 699, 35, 10637, 21, 2741, 3010, 26, 21, 6819, 56, 129, 14351, 1373, 149, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Rails data/datum inflection issue === In my Rails 3.2.6 app, I have a model representing a collection of data about a widget. To my mind, the correct name for this class is `WidgetData`, plural, because I have more than one item of data per widget. If I ask Rails to generate a form for this class: = form_for @widget_data do |f| ... I get an error `ActionView::Template::Error (undefined method 'widget_datum_path' ...`. Presumably this is because of the Rails data/datum inflection rule. I'm unsure how best to resolve this: I could let Rails dictate that my model should in fact be `WidgetDatum`. Or I could somehow disable the use of the inflection rule in this particular case, but I'm unsure how best to do that. Advice welcome. To anticipate one possible answer: the reason that the model is not just called `Widget` is that I have a façade class named that already, which presents a richer view of a widget incorporating both the `WidgetData` and other information as well.
0
[ 2, 2240, 18, 1054, 118, 43, 21896, 19, 4372, 20842, 1513, 800, 3726, 3726, 19, 51, 2240, 18, 203, 9, 135, 9, 379, 4865, 15, 31, 57, 21, 1061, 3793, 21, 1206, 16, 1054, 88, 21, 4807, 43, 3060, 9, 20, 51, 594, 15, 14, 4456, 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...
Listen for both TCP and UDP packets on the same port === I there a way in Netty (old and new api) to listen to incoming TCP connection and receive UDP packets on the same port? I am running a single instance of netty server that is listening on port 80. Depending on either a TCP or UDP message the server needs to switch to appropriate handlers.
0
[ 2, 3834, 26, 156, 13, 38, 7439, 17, 287, 7431, 12795, 18, 27, 14, 205, 1295, 800, 3726, 3726, 31, 80, 21, 161, 19, 4275, 1084, 13, 5, 1218, 17, 78, 21, 2159, 6, 20, 3834, 20, 17126, 13, 38, 7439, 2760, 17, 2588, 287, 7431, 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...
Ports for Dial up connection === How to open a port or how to check whether the port is opened or not for the dial up connection. Does RASPHONE checks whether the port is openend or not and starts the dial up connection??
0
[ 2, 9551, 26, 11601, 71, 2760, 800, 3726, 3726, 184, 20, 368, 21, 1295, 54, 184, 20, 2631, 1472, 14, 1295, 25, 520, 54, 52, 26, 14, 11601, 71, 2760, 9, 630, 7172, 7709, 16602, 1472, 14, 1295, 25, 368, 2451, 54, 52, 17, 3244, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
C# alternative to setpixel === I have read through several articles which are alternatives to using setpixel/getpixel but I am not seeing how they relate to my issue. I have a multicoloured image which (depending on dynamic values taken from DB) changes the colour of each pixel colour group to a new colour. Lets say I want all pixels with Argb value of -989556 changed to -16 & all pixels with Argb value of -1331 changed to -5383962. I am currently looking at every pixel in the Bitmap and checking their value, if they match then they are changed using setpixel. I am sure there must be a better way but I am being too dim to see it! Many thanks for your time.
0
[ 2, 272, 5910, 2676, 20, 309, 18321, 532, 800, 3726, 3726, 31, 57, 1302, 120, 238, 3376, 56, 50, 2676, 18, 20, 568, 309, 18321, 532, 118, 3060, 18321, 532, 47, 31, 589, 52, 2078, 184, 59, 16464, 20, 51, 1513, 9, 31, 57, 21, 188...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Yield on recursive data structure === I'm trying to use a generator with a Python class that works somewhat similarly to a linked list. Here is a really simple example of what I mean: class GeneratorTest(): def __init__(self, list): if list: self.elem = list[0] if list[1:]: self.n = GeneratorTest(list[1:]) else: self.n = None def __iter__(self): return self def next(self): my_next = self while my_next is not None: yield my_next my_next = my_next.n Of course this is just an example, but it's enough to illustrate the point. Now, I was expecting to be able to invoke something like: g = GeneratorTest([1,2,3,4,5]) for x in g: print x And have the cycle stop when it reached the last value, but the for loop just continues endlessly. I'm quite new to generators, so I'm sure it's a basic premise I'm missing here. Is the problem related to the fact that I yield the same object that creates the generator? I'm sure that if I had an object with a list of GeneratorTest objects, I could return each of these objects quite simply, but I feel as there should be a way to make this work without a "wrapper" object. What am I missing here?
0
[ 2, 11537, 27, 302, 24244, 1054, 1411, 800, 3726, 3726, 31, 22, 79, 749, 20, 275, 21, 15286, 29, 21, 20059, 718, 30, 693, 4131, 5843, 20, 21, 4727, 968, 9, 235, 25, 21, 510, 1935, 823, 16, 98, 31, 884, 45, 718, 15286, 10543, 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...
Can I use System resources for Graphics instead of a graphics card? === I'm not sure if this is the right place to post this question but I'm sure I will be told if it is wrong quick enough :-) I have a amd fx-6100 with 16GB ram and a ati HD5450 2GB graphics card running windows7. I am finding that I can't play some of the newer PC games such as battlefield3 on my PC so the question is can I dedicate a core or two with a few GB of ram from the system resources to Graphics for playing games. any help would be greatly appreciated or even a point in the right direction if this is the wrong place to ask this.
0
[ 2, 92, 31, 275, 329, 2566, 26, 8351, 700, 16, 21, 8351, 2056, 60, 800, 3726, 3726, 31, 22, 79, 52, 562, 100, 48, 25, 14, 193, 209, 20, 678, 48, 1301, 47, 31, 22, 79, 562, 31, 129, 44, 470, 100, 32, 25, 1389, 2231, 511, 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...
Symfony2: User Login from Database - Error in security.yml === I need to log in a user with credentials from the database. However, an error is generated when defining the provider in security.yml. Here is the error: InvalidConfigurationException: Unrecognized options "class, property" under "security.providers.myapp_entity_admin.users.entity" In the providers section in security.yml I have the following: providers: myapp_entity_admin: users: entity: { class: MyApp\MainBundle\Entity\User, property: username } The question is why Symfony would throw the above error. Official documentation seems to indicate that this is correct. Thanks, JB
0
[ 2, 13, 7261, 10229, 93, 135, 45, 4155, 6738, 108, 37, 6018, 13, 8, 7019, 19, 1221, 9, 93, 8184, 800, 3726, 3726, 31, 376, 20, 6738, 19, 21, 4155, 29, 5059, 43, 10107, 18, 37, 14, 6018, 9, 207, 15, 40, 7019, 25, 6756, 76, 146...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
LD_PRELOAD not preloading all symbols === I am trying to LD_PRELOAD functions such as `mmap`, `read`, `open`, `clone` etc..., but while some function do get LD_PRELOADed successfully, others don't. For example `mmap`, `read` and `open` are perfectly being preloaded but `clone` is not, while I know for sure `clone` is being called from my program as reported by `strace`, since I'm using pthreads. What is the reason for `clone` not being LD_PRELOADed here?
0
[ 2, 13, 6252, 1, 3515, 8294, 52, 782, 16866, 65, 9794, 800, 3726, 3726, 31, 589, 749, 20, 13, 6252, 1, 3515, 8294, 3719, 145, 28, 13, 1, 79, 15022, 1, 15, 13, 1, 10647, 1, 15, 13, 1, 10157, 1, 15, 13, 1, 150, 16285, 1, 2722...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Get value selected from drop down list in where clause using php code === My code is like this: $zone = $_POST['zone']; $state = $_POST['state']; $sql = "Select zone_id from tbl_zone where zone_name = $zone"; $query = mysql_query($sql); I am selecting zone name which is fetched from database and listed in drop down list. Now i want to get id of zone name to store in other table. In where clause zone_name is blank. What changes should be done in above code? Thanks in advance..
0
[ 2, 164, 1923, 1704, 37, 2804, 125, 968, 19, 113, 9040, 568, 13, 26120, 1797, 800, 3726, 3726, 51, 1797, 25, 101, 48, 45, 5579, 11661, 800, 5579, 1, 6962, 2558, 22, 11661, 22, 12660, 5579, 3859, 800, 5579, 1, 6962, 2558, 22, 3859, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 implement a serializableBufferedWriter in Java? === I am trying to extend java.io.BufferedWriter so make it serialisable. I tried simply extending BufferedWriter and implementing serializable. It has two constructor so the code looks like this. class SerializableBufferedWriter extends BufferedWriter implements Serializable{ /** * */ private static final long serialVersionUID = 1625952307886764541L; public SerializableBufferedWriter(OutputStreamWriter osw, int size){ super(osw, size); } public SerializableBufferedWriter(OutputStreamWriter osw){ super(osw); } } But I get an no valid construct exception at run time. After reading around I here that for a class to implement Serializable, it's first non-serializable super class needs to have a no-arg constructor. So how do I add a class in between with a no-arg constructo that extends BufferedWriter and is extended by Serializable BufferWriter? Any help is greatly appreciated :-)
0
[ 2, 184, 107, 31, 8713, 21, 5956, 3186, 579, 2345, 6866, 69, 9657, 19, 8247, 60, 800, 3726, 3726, 31, 589, 749, 20, 7206, 8247, 9, 1963, 9, 2345, 6866, 69, 9657, 86, 233, 32, 5956, 403, 579, 9, 31, 794, 1659, 8176, 17497, 69, 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...
.s file cant executed directly? === I would like others to explain why .s file cant directly used?? I am trying to learn Assembly language on X86_64. gcc -S sample.c Gives me assembly code(???). Why i can't run directly using nasm. I tried to do <br/> nasm -f elf -l sample.lst sample.asm **Note:** renamed sample.s to sample.asm. Im getting error(Will post if needed). I thought that the intermediate file is an assembly code. Please clarify me. Thanks in advance.
0
[ 2, 13, 9, 18, 3893, 2973, 5557, 1703, 60, 800, 3726, 3726, 31, 83, 101, 654, 20, 3271, 483, 13, 9, 18, 3893, 2973, 1703, 147, 60, 60, 31, 589, 749, 20, 2484, 1475, 816, 27, 993, 3274, 1, 3470, 9, 489, 3384, 13, 8, 18, 5717, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Spotify Apps. Scroll Position and the Scroll Event === I'm developing a Spotify app and am tying some animation in with scrolling. Annoyingly the scroll event seems to fire only a handful of times every second (around 5 by my count) resulting in some very jerky animations. I've also tried setting a regular interval and animating every time the scroll position updates with `document.getElementById('element-id').scrollLeft`. But this seems to update as regularly as the scroll event fires. I'm assuming this is a limitation of the Spotify browser, but I wondered if anyone knew of any workarounds. Thanks!
0
[ 2, 1999, 8612, 4865, 18, 9, 12159, 649, 17, 14, 12159, 807, 800, 3726, 3726, 31, 22, 79, 3561, 21, 1999, 8612, 4865, 17, 589, 19160, 109, 6236, 19, 29, 13, 28166, 9, 17610, 102, 14, 12159, 807, 2206, 20, 535, 104, 21, 8893, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 through a generator === How can one loop through a generator? I thought about this way: gen = function_that_returns_a_generator(param1, param2) if gen: # in case the generator is null while True: try: print gen.next() except StopIteration: continue Is there a more pythonic way?
0
[ 2, 184, 20, 5293, 120, 21, 15286, 800, 3726, 3726, 184, 92, 53, 5293, 120, 21, 15286, 60, 31, 289, 88, 48, 161, 45, 4380, 800, 1990, 1, 887, 1, 24632, 18, 1, 58, 1, 17083, 3457, 5, 6351, 79, 165, 15, 2258, 79, 135, 6, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 in spring annotation based validation === I am getting the following error while running my spring application. error: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc] Offending resource: ServletContext resource [/WEB-INF/dispatcher-servlet.xml] can anybody help me out to resolve it? my dispatcher-servlet is: $<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> <!-- Enable annotation driven controllers, validation etc... --> <mvc:annotation-driven /> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" p:basename="messages" /> <context:component-scan base-package="com.bsmart.web" /> <bean id="userService" class="com.bsmart.service.UserServiceImpl" /> <bean id="userValidator" class="com.bsmart.validator.UserValidator" /></beans> $
0
[ 2, 7019, 19, 1573, 40, 1270, 857, 432, 27999, 800, 3726, 3726, 31, 589, 1017, 14, 249, 7019, 133, 946, 51, 1573, 3010, 9, 7019, 45, 13, 5583, 9, 15827, 8361, 3783, 9, 863, 5950, 9, 17455, 93, 9, 3574, 18, 68, 9, 863, 210, 2864...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 what is the best way to submit meta data of dynamically created elements? === Basically I am creating a number of rectangles using jQuery and adding these to the DOM e.g. var divElement = jQuery('<div/>').attr({ 'class': 'ui-widget-content resizable' }); I am then allowing the user to fill out input fields for the selected rectangle e.g. name, width, height. This data is currently being added to each element via .data method. Once the user has created all their elements along with their associated meta data, I would like them to submit the page so I can do some server side scripting in PHP. Just wondering what the best way is to submit this data - as I understand it, I could dynamically create form elements or use the jQuery.post method. Please can anyone advise on the best method (perhaps a different one altogether) and any tips on how to set this up e.g. using [] brackets in the name of each element to create arrays etc..
0
[ 2, 487, 8190, 93, 98, 25, 14, 246, 161, 20, 12298, 7618, 1054, 16, 7782, 1326, 679, 2065, 60, 800, 3726, 3726, 11374, 31, 589, 2936, 21, 234, 16, 27181, 18, 568, 487, 8190, 93, 17, 4721, 158, 20, 14, 11859, 13, 62, 9, 263, 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...
Hook input Messages and Error Alerts === How to hook? For example I have a multi lang script and I want to translate all messages to their language.. * I know that all messages/errors in input are in language of the browser, but I need to use my own text.. e.g of my input; <?php echo $lang['REGISTER_NAME']; ?> <span class="required"><font color="#CC0000">*</font></span> <input name="full_name" type="text" id="full_name" maxlength="30" required placeholder="eg. Bill Gates" minlength="4" class="required" required pattern="^[a-zA-Z0-9]+[^0-9.]$"> The "required pattern" - if you write any number or symbol, you will get an alert, that alert and all others I want to hook..
0
[ 2, 5559, 6367, 7561, 17, 7019, 7863, 18, 800, 3726, 3726, 184, 20, 5559, 60, 26, 823, 31, 57, 21, 1889, 4544, 3884, 17, 31, 259, 20, 20628, 65, 7561, 20, 66, 816, 9, 9, 1637, 31, 143, 30, 65, 7561, 118, 29992, 18, 19, 6367, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
game center functionality without using game center === I was just wondering if there was a way to use the functionality of finding others using an app without setting up a separate service. I know there is game center, but I have heard that if what your doing is not "game" related or does not keep data on what the user does apple will reject you. I basically want to allow users to view other users of the app so if the so desire they can interact. I know I could set up my own service and communicate through it, but figured they may be an api I dont know about that already exists. I already have it working via local wifi, I am talking over the cellular network. Thanks, b
0
[ 2, 250, 459, 18548, 366, 568, 250, 459, 800, 3726, 3726, 31, 23, 114, 5712, 100, 80, 23, 21, 161, 20, 275, 14, 18548, 16, 3007, 654, 568, 40, 4865, 366, 2697, 71, 21, 1725, 365, 9, 31, 143, 80, 25, 250, 459, 15, 47, 31, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
clicking on listview item inside dialogfragment doesn't call my context menu === I am showing a listview inside a dialogfragment , which is being called by a activity . So I've created a context menu to delete the listview item . Also I've created another dialog , which is just a confirmation whether to delete the item . SO when a long press is made on the listview item , delete option appears , which should then call my another dialog fragment , which will confirm the deletion . But my problem is , when a long press is made , the delete option appears , but after that , my other dialog fragment ( which confirms deletion ) doesn't appear . I've included log statement inside it , and i found out that the code is not entering the "ocontextmenuitemselected" Here's my code related to context menu : public class DetailsDialog extends DialogFragment{ //.... public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); MenuInflater inflater = getActivity().getMenuInflater(); inflater.inflate(R.menu.context_menu_details, menu); } public boolean onContextItemSelected(MenuItem item) { final AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); Log.w("show","delete"); switch (item.getItemId()) { case R.id.delete: Log.w("show","delete"); //logcat doesn't show this showDeleteDialog(info.position); break; default: return super.onContextItemSelected(item); } return true; } private void showDeleteDialog(int a) { FragmentTransaction ft = getFragmentManager().beginTransaction(); Fragment prev = getFragmentManager().findFragmentByTag("dialog"); DialogFragment newFragment = DeleteItemDialog.newInstance(act, dat, a); newFragment.show(getFragmentManager(), "dialog"); } } when i check logcat , it shows the following statement , which i have no idea what is : Window already focused : ignoring focus gain of ......
0
[ 2, 25590, 27, 968, 4725, 9101, 572, 28223, 22133, 1130, 1437, 22, 38, 645, 51, 4141, 11379, 800, 3726, 3726, 31, 589, 3187, 21, 968, 4725, 572, 21, 28223, 22133, 1130, 13, 15, 56, 25, 142, 227, 34, 21, 2358, 13, 9, 86, 31, 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...
Onclick event shows a redline under it === I am inserting an image in the html document using `HtmlAgilityPack`. But code shows a red line in c# : HtmlNode usern = HtmlNode.CreateNode("<img src='/images/Home.png' alt='home' title='home' onclick='javascript:document.location.href="/Home/Index;"' <==== style='position:absolute;cursor:pointer;top:10px;left:20px;' />"); It shows a red line under `onclick event part`. Can anybody please explain me why ?
0
[ 2, 27, 150, 10129, 807, 1285, 21, 402, 1143, 131, 32, 800, 3726, 3726, 31, 589, 14692, 68, 40, 1961, 19, 14, 13, 15895, 4492, 568, 13, 1, 15895, 3302, 20901, 8573, 1, 9, 47, 1797, 1285, 21, 402, 293, 19, 272, 5910, 13, 45, 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...
Making Images Viewed By UIWebView Smaller === i have a list of entries from a database and I'm feeding them in to HTML to a UIWebView that is making a list of the database entries on the page. (Much Easyer/Better then extending UITableView Cells) My Problem is with UITableView i was able to grab an image on a server as NSData and with UIImageJpegRepresentation set the quality for the image a bit lower to be better on the iPhone's cellular downloads. Now i can go and grab an image from the server as NSData Compress the image then convert it to base 64string and spit it into the WebView but is there any other way to do this? TLDR: How can i decrease the size of images seen in a HTML Page?
0
[ 2, 544, 3502, 6084, 34, 13, 5661, 14113, 4725, 2012, 800, 3726, 3726, 31, 57, 21, 968, 16, 11399, 37, 21, 6018, 17, 31, 22, 79, 8524, 105, 19, 20, 13, 15895, 20, 21, 13, 5661, 14113, 4725, 30, 25, 544, 21, 968, 16, 14, 6018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Exception from ODBC driver when using in IIS === I am using ODBC driver to connect excel file present on server. I have used following code snippet for connecting: string excelConnection = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + filepath + "; HDR=YES"; string provider="System.Data.Odbc"; string query = "select * from [Sheet1$]"; OdbcConnection con = new OleDbConnection(connection); con.Open(); OdbcCommand cmd = new OleDbCommand(query, con); cmd.CommandType = CommandType.Text; OdbcDataReader dr = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(dr); testGrid.DataSource = dt; testGrid.DataBind(); Every things works fine when I run it on Visual Studio 2010. But when I try to eun it on IIS it is giving exception. Below is the exception log: System.Data.Odbc.OdbcException: ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x1310 Thread 0x1540 DBC 0xfea77ec Excel'. ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x1310 Thread 0x1540 DBC 0xfea77ec Excel'. ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [HY000] [Microsoft][ODBC Excel Driver] Your network access was interrupted. To continue, close the database, and then open it again. ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x1310 Thread 0x1540 DBC 0xfea77ec Excel'. ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x1310 Thread 0x1540 DBC 0xfea77ec Excel'. ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute HDR ERROR [HY000] [Microsoft][ODBC Excel Driver] Your network access was interrupted. To continue, close the database, and then open it again. Please help me in solving this issue.
0
[ 2, 5391, 37, 12340, 7229, 2425, 76, 568, 19, 595, 18, 800, 3726, 3726, 31, 589, 568, 12340, 7229, 2425, 20, 6379, 20700, 3893, 734, 27, 8128, 9, 31, 57, 147, 249, 1797, 13, 29061, 26, 6440, 45, 3724, 20700, 25996, 872, 800, 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...
Wrap asynchronous calls with synchronous method === I have a 3rd party DLL with an asynchronous method that I want to wrap with another method that waits for its result. I started writing a class to hide the functionality, but now I can't work out how to wait for `Doc.Completed` to be called by the DLL after `this.version.DownloadFile(this)` in `Doc.Download`. The DLL calls `InitTransfer`, then `OnProgressNotify` a number of times, then `Completed`. `OnError` may be called at any stage, but `Completed` is always called last. I don't care about `InitTransfer`, `OnProgressNotify` or `OnError`. I have read http://stackoverflow.com/questions/7842180/asynchronous-call-in-synchronous-method and http://stackoverflow.com/questions/10124524/turn-asynchronous-calls-into-synchronous but I don't understand how to apply the answers to this case. I'm using C# 4. public class Doc : SomeInterfaceFromTheDll { private readonly IVersion version; // An interface from the DLL. private bool downloadSuccessful; public Doc(IVersion version) { this.version = version; } public bool Download() { this.version.DownloadFile(this); return ??? // I want to return this.downloadSuccessful after Completed() runs. } public void Completed(short reason) { Trace.WriteLine(string.Format("Notify.Completed({0})", reason)); this.downloadSuccessful = reason == 0 ? true : false; } public void InitTransfer(int totalSize) { Trace.WriteLine(string.Format("Notify.InitTransfer({0})", totalSize)); } public void OnError(string errorText) { Trace.WriteLine(string.Format("Notify.OnError({0})", errorText)); } public void OnProgressNotify(int bytesRead) { Trace.WriteLine(string.Format("Notify.OnProgressNotify({0})", bytesRead)); } }
0
[ 2, 8118, 21, 16023, 1291, 3029, 29, 13, 16023, 1291, 2109, 800, 3726, 3726, 31, 57, 21, 203, 897, 346, 13, 43, 211, 29, 40, 21, 16023, 1291, 2109, 30, 31, 259, 20, 8118, 29, 226, 2109, 30, 1760, 18, 26, 82, 829, 9, 31, 373, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Replace &nbsp; with a blank or empty string PHP === Well, I have tried these and it seems that none of them are working, my example string is $text_description="&<pre>nbsp;&<pre>nbsp;&<pre>nbsp;&<pre>nbsp; &<pre>nbsp;Hello world! lorel ipsum"; $text_description= str_replace("&<pre>nbsp;"," ",$text_description); $text_description = preg_replace("/&#?[a-z0-9]+;/i"," ",$text_description); $text_description=html_entity_decode($text_description);
0
[ 2, 3934, 279, 13502, 3401, 73, 29, 21, 6463, 54, 2424, 3724, 13, 26120, 800, 3726, 3726, 134, 15, 31, 57, 794, 158, 17, 32, 2206, 30, 2369, 16, 105, 50, 638, 15, 51, 823, 3724, 25, 5579, 11969, 1, 546, 8741, 872, 3726, 7, 1569...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 resolve the error W/ExpatReader(239): DTD handlers aren't supported. === I am developing a application in android in which it can show the route directions with the given source and destination latitude and longitude , the application was working fine and it was showing the route correctly but suddenly now I am facing problem now its not parsing the KML file and giving the I have used the code given on the http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations So any one help to where Iam worng errors 07-31 04:41:40.164: W/ExpatReader(239): DTD handlers aren't supported. 07-31 04:41:40.185: W/System.err(239): org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 803: not well-formed (invalid token) 07-31 04:41:40.209: W/System.err(239): at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:508) 07-31 04:41:40.218: W/System.err(239): at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:467) 07-31 04:41:40.218: W/System.err(239): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:329) 07-31 04:41:40.224: W/System.err(239): at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:286) 07-31 04:41:40.224: W/System.err(239): at javax.xml.parsers.SAXParser.parse(SAXParser.java:361) 07-31 04:41:40.234: W/System.err(239): at javax.xml.parsers.SAXParser.parse(SAXParser.java:240)
0
[ 2, 184, 20, 9854, 14, 7019, 619, 118, 6899, 721, 10647, 106, 5, 22790, 6, 45, 13, 43, 38, 43, 24641, 18, 4847, 22, 38, 1827, 9, 800, 3726, 3726, 31, 589, 3561, 21, 3010, 19, 13005, 19, 56, 32, 92, 298, 14, 858, 7876, 29, 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...
RemoveChild() error in javascript === I'm using a function in a php file to create some "li" and some "span" elements like so: while($row_quotes=mysql_fetch_array($result_quotes) and $x<10){ $x++; echo "<li class='citazione'>".$row_quotes['citazione']."</li><span class='citazione_info'>".$row_quotes['personaggio']." - ".$row_quotes['libro']."</span>"; } These are contained inside "ul id='quotes_holder'". Then I have a javascript function that on a certain call should remove all the created "li" and "span" elements so I thought it would have worked to removing them with the removeChild() method applied on the containing "ul". Here's the javascript function: function ritorna_filtri(obj, autore){ var index=obj.selectedIndex; var selected=obj.childNodes[index]; var value= selected.value; var div=document.getElementById('quotes_holder'); for(l=0;l<div.childNodes.length;l++){ div.removeChild(div.childNodes[l]); } var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { response=xmlhttp.responseText; jsonObj=eval("("+response+")"); for(i=0;i<jsonObj.libri.length;i++){ var li=document.createElement('li'); var text=document.createTextNode(jsonObj.libri[i].titolo); li.appendChild(text); li.setAttribute('class', 'filtro'); div.appendChild(li); } } } xmlhttp.open("GET","ritorna_filtri.php?filtro="+value+"&autore="+autore,true); xmlhttp.send(); } Problem is when the function is executed only the "li" elements are removed, the "span"s are still there.
0
[ 2, 4681, 11287, 5, 6, 7019, 19, 8247, 8741, 800, 3726, 3726, 31, 22, 79, 568, 21, 1990, 19, 21, 13, 26120, 3893, 20, 1600, 109, 13, 7, 1210, 7, 17, 109, 13, 7, 18, 3206, 7, 2065, 101, 86, 45, 133, 5, 4403, 5417, 1, 8970, 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...
Accessing class level member without an instance of the class === Is it possible to access a class member without an instance of the class? For example: class MyClass(object): MyMember = 1 class MyOtherClass(object): def __init__(self): print MyClass.MyMember #MyClass().MyMember works out but not MyClass.MyMember I'm looking for something synonymous with static class members in C++.
1
[ 2, 1381, 68, 718, 662, 322, 366, 40, 4851, 16, 14, 718, 800, 3726, 3726, 25, 32, 938, 20, 1381, 21, 718, 322, 366, 40, 4851, 16, 14, 718, 60, 26, 823, 45, 718, 51, 1898, 5, 23793, 6, 45, 51, 6990, 800, 137, 718, 51, 9539, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
wxpython using time.sleep() without blocking complete GUI === I want to change the text displayed in my GUI at specific time intervals. After a lot of approaches, I find that, specifically to my requirements, I must use `time.sleep()` instead of `wx.Timer`, but `time.sleep()` freeze the complete GUI. Here's an example of my code: import wx import time DWELL_TIMES = [1, 2, 1, 3] SCREEN_STRINGS = ['nudge nudge', 'wink wink', 'I bet she does', 'say no more!'] class DM1(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) panel = wx.Panel(self) text_display = wx.StaticText(panel, pos = (400, 150)) for dwell_time in DWELL_TIMES: text_display.SetLabel(SCREEN_STRINGS[dwell_time]) time.sleep(float(DWELL_TIMES[dwell_time])) app = wx.App() DM1Frame = DM1(None, size = (800, 600)) DM1Frame.Center() DM1Frame.Show() app.MainLoop() Does somebody know why this happen, and how to make the GUI doesn't block? I guess that `Threading` could help me, but I can't get how to put threads inside this code. Thanks a lot!
0
[ 2, 619, 396, 6448, 11570, 568, 85, 9, 21092, 5, 6, 366, 11828, 1279, 9457, 800, 3726, 3726, 31, 259, 20, 753, 14, 1854, 6115, 19, 51, 9457, 35, 1903, 85, 15899, 9, 75, 21, 865, 16, 7501, 15, 31, 477, 30, 15, 3524, 20, 51, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 sqlite query === This must be a stupid problem but i cant get my query to work. Its as if my database is empty (I double checked, its not). Its a simple `SELECT * FROM table` query. This is how i try it: +(MyDatabase *)database{ if (database == nil) { database = [[MyDatabase alloc] init]; } return database; } - (id)init { self = [super init]; if (self) { NSString *sqliteDb = [[NSBundle mainBundle] pathForResource:@"personsDB" ofType:@"sqlite3"]; if (sqlite3_open([sqliteDb UTF8String], &database) != SQLITE_OK) { NSLog(@"Fail to open Database."); } } return self; } and -(NSArray *)getAllRows{ NSMutableArray *retArray = [[NSMutableArray alloc] init]; NSString *query = @"SELECT * FROM persons"; sqlite3_stmt *statement; NSLog(@"checking SQLITE_OK?"); if (sqlite3_prepare_v2(database, [query UTF8String], -1, &statement, nil) == SQLITE_OK) { NSLog(@"SQLITE_OK"); while (sqlite3_step(statement) == SQLITE_ROW) { int personID = sqlite3_column_int(statement, 0); char *personChars = (char *) sqlite3_column_text(statement, 1); int gender = sqlite3_column_int(statement, 2); int related = sqlite3_column_int(statement, 3); NSString *person = [[NSString alloc] initWithUTF8String:personChars]; MyDBInfo *info = [[MyDBInfo alloc] initWithpersonID:personID person:person gender:gender related:related ]; [retArray addObject:info]; } sqlite3_finalize(statement); } return retArray; } I think this is all the interesting stuff. In my Log I get `checking SQLITE_OK?`, but no `SQLITE_OK`. I'm not getting `Fail to open Database.` so I'm assuming that its all good there. My Database is full and there is a table called `persons`. I'm very new to `sqlite` in `iOS apps`. Thank you.
0
[ 2, 993, 9375, 4444, 10601, 25597, 800, 3726, 3726, 48, 491, 44, 21, 3553, 1448, 47, 31, 2973, 164, 51, 25597, 20, 170, 9, 82, 28, 100, 51, 6018, 25, 2424, 13, 5, 49, 1494, 6505, 15, 82, 52, 6, 9, 82, 21, 1935, 13, 1, 18, 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 restrict user action from email link without login? === As part of my app, users get to approve certain "requests" via email. Requests have their own model and therefore each has a unique id. Users get an email with a named route in a link: 'approve/:id' where :id is the id of the request. The approve method then handles the approval logic, etc. How can I prevent a user from approving requests made to other users without having the user login beforehand? Since the ids are freely displayed in the URL, I guess a GUID would be needed or?
0
[ 2, 184, 20, 15436, 4155, 1028, 37, 8517, 3508, 366, 6738, 108, 60, 800, 3726, 3726, 28, 141, 16, 51, 4865, 15, 3878, 164, 20, 14741, 1200, 13, 7, 99, 10351, 18, 7, 1197, 8517, 9, 12279, 57, 66, 258, 1061, 17, 1793, 206, 63, 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...
How to Get Youtube IDS from url's list PHP === Sorry may be very beginner question. i have a text area with post method where i'll list youtube URLS like this: http://www.youtube.com/watch?v=bT7kCbgEAqw http://www.youtube.com/watch?v=AwyucYgVKb0 http://www.youtube.com/watch?v=QP8PyUhx1AU http://www.youtube.com/watch?v=AvTg20fYZcE i want just video ids, what is good way to get video ids like this: bT7kCbgEAqw QP8PyUhx1AU AwyucYgVKb0 AvTg20fYZcE Thanks :)
0
[ 2, 184, 20, 164, 7330, 13, 9178, 37, 287, 6362, 22, 18, 968, 13, 26120, 800, 3726, 3726, 1875, 123, 44, 253, 26931, 1301, 9, 31, 57, 21, 1854, 217, 29, 678, 2109, 113, 31, 22, 211, 968, 7330, 13, 911, 7532, 101, 48, 45, 7775, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Email Open Tracking: Bypassing an email forwarder that strips the attributes in an image tag? === This may be impossible but I figured I'd give it a shot. If the service that I am using strips the attributes of an image tag <img src="http://blah.com/image1.png> => <img>, is there any way that I can get around it? I tried inserting random unicode characters to break the parser but that failed miserably... My ultimate goal is to be able to track the email opens and the only way I know how to do that is through an image in the html of the email... Thanks! Jonathan
0
[ 2, 8517, 368, 10353, 45, 8900, 68, 40, 8517, 917, 106, 30, 15383, 14, 13422, 19, 40, 1961, 3383, 60, 800, 3726, 3726, 48, 123, 44, 3992, 47, 31, 5700, 31, 22, 43, 590, 32, 21, 999, 9, 100, 14, 365, 30, 31, 589, 568, 15383, 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...
Javascript in ten minutes: What is going on in this example code illustrating lazy scoping? === I've been re-reading Spencer Tipping's excellent [Javascript in Ten Minutes](http://github.com/spencertipping/js-in-ten-minutes) and for the life of me can't figure out what is going on in this example of using lazy scoping to create syntactic macros: var f = function () {return $0 + $1}; var g = eval (f.toString ().replace (/\$(\d+)/g, function (_, digits) {return 'arguments[' + digits + ']'})); g(5,6); // => 11 (except on IE) In particular, 1. $0 and $1 are being replaced by a function definition -- how does _that_ function get evaluated? (Presumably by eval(), but I'm not seeing this). 2. What is the purpose of the single underscore argument in the function -- if I take it out, the code no longer works. Presumably it's just a place holder, but why is it needed?
0
[ 2, 8247, 8741, 19, 652, 902, 45, 98, 25, 228, 27, 19, 48, 823, 1797, 28123, 16792, 11530, 3181, 60, 800, 3726, 3726, 31, 22, 195, 74, 302, 8, 22883, 6212, 27631, 22, 18, 5977, 636, 1004, 1385, 8741, 19, 652, 902, 500, 5, 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...
Java - Read bytes from socket === I have a Socket in Java (java.net.ServerSocket). I read from it using InputStream. I would like to read 4 bytes from socket, when they are available. So I use InputStream.read(bytes, 0, 4) in infinite loop. It works well on my computer, but when I run it on school computer, it reads some nonsense, I haven't even sent data yet. Do you know where is the problem?
0
[ 2, 8247, 13, 8, 1302, 34, 3231, 37, 18482, 800, 3726, 3726, 31, 57, 21, 18482, 19, 8247, 13, 5, 1004, 1385, 9, 2328, 9, 10321, 445, 5668, 1198, 6, 9, 31, 1302, 37, 32, 568, 6367, 11260, 9, 31, 83, 101, 20, 1302, 268, 34, 323...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Uploading Media Via iOS5/6 === Is it possible (and if so, how) to allow a user within an iOS5/6 application to upload audio, video, text, and image based files from within the standard iOS application libraries (such as Music, Photos, Videos, etc.) and/or third-party applications libraries (such as Dropbox, Google Drive, iCloud, etc.)?
0
[ 2, 71, 16866, 941, 1197, 13, 7760, 10551, 379, 800, 3726, 3726, 25, 32, 938, 13, 5, 290, 100, 86, 15, 184, 6, 20, 1655, 21, 4155, 363, 40, 13, 7760, 10551, 379, 3010, 20, 71, 8294, 4023, 15, 763, 15, 1854, 15, 17, 1961, 432, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 won't this code cause infinite loop? === Xcode template code : MasterDetailApplication (use core data) in MasterViewController.m , the implementation of - (NSFetchedResultsController *)fetchedResultsController { if (__fetchedResultsController != nil) { return __fetchedResultsController; } NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; // Edit the entity name as appropriate. NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; // Set the batch size to a suitable number. [fetchRequest setFetchBatchSize:20]; // Edit the sort key as appropriate. NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"timeStamp" ascending:NO]; NSArray *sortDescriptors = [NSArray arrayWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; // Edit the section name key path and cache name if appropriate. // nil for section name key path means "no sections". NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Master"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; NSError *error = nil; if (![self.fetchedResultsController performFetch:&error]) { // Replace this implementation with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return __fetchedResultsController; } the question is : this code uses property inside a getter , why won't this cause a infinite loop ? i mean this line : self.fetchedResultsController = aFetchedResultsController;
0
[ 2, 483, 230, 22, 38, 48, 1797, 1679, 9698, 5293, 60, 800, 3726, 3726, 993, 9375, 22894, 1797, 13, 45, 1129, 546, 8682, 2552, 20669, 13, 5, 3699, 2884, 1054, 6, 19, 1129, 4725, 12898, 1252, 9, 79, 13, 15, 14, 6123, 16, 13, 8, 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...
Spring AOP advice - conditional in debug mode === I want to use the AOP advice/pointcuts, etc in debug mode only (as a master global config: e.g. when log4j is in DEBUG threshold). How can I do this in the application.xml config or elsewhere? I am using AOP annotations e.g. > @Around("PointCuts.anyCustomPublicMethod()") > public final Object logAdvice(final ProceedingJoinPoint pjp) throws Throwable { > ........... > ............ How to add to the advice something like, > debug.equals(TRUE) I was told by someone to use Spring Expression Language, but I've no idea how to do it.
1
[ 2, 1573, 21, 2594, 4978, 13, 8, 21206, 19, 121, 16254, 3740, 800, 3726, 3726, 31, 259, 20, 275, 14, 21, 2594, 4978, 118, 3132, 4118, 18, 15, 2722, 19, 121, 16254, 3740, 104, 13, 5, 472, 21, 1129, 2062, 13, 14093, 2816, 45, 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 is sizeof a 16? (sizeof int is 4 ) === #include <stdio.h> int main() { int *a[2]; /* an array of 2 int pointers */ int (*b)[2]; /* pointer to an array of 2 int (invalid untill assigned) */ int c[2] = {1,2}; /* like b, but statically allocated */ printf("size of int %ld\n",sizeof(int)); printf( "size of array of 2 (int *) a=%ld\n", sizeof(a) ); printf( "size of ptr to an array of 2 (int) b=%ld\n", sizeof(b) ); printf( "size of array of 2 (int) c=%ld\n", sizeof(c) ); return 0; } a is an array of 2 integer pointers, so shouldn't the size be 2*4 = 8? Tested on gcc.
0
[ 2, 483, 25, 1072, 1041, 21, 347, 60, 13, 5, 10454, 1041, 19, 38, 25, 268, 13, 6, 800, 3726, 3726, 6926, 22640, 13, 1, 384, 6921, 9, 252, 1, 19, 38, 407, 5, 6, 13, 1, 19, 38, 1637, 58, 2558, 135, 12660, 13, 118, 2483, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Complex SQL query into Zend === I am trying to build a social network using Zend Framework. However, recently I have difficulty in making some complex SQL queries into Zend language. For example: "SELECT t.plural_name, p.name as users_name, u.ID FROM users u, profile p, relationships r, relationship_types t WHERE t.ID=r.type AND r.accepted=1 AND (r.usera={$user} OR r.userb={$user}) AND IF( r.usera={$user},u.ID=r.userb,u.ID=r.usera) AND p.user_id=u.ID" How could I execute this query using Zend's select() object? Thank you very much!
0
[ 2, 1502, 4444, 255, 25597, 77, 10526, 43, 800, 3726, 3726, 31, 589, 749, 20, 1895, 21, 668, 982, 568, 10526, 43, 6596, 9, 207, 15, 1989, 31, 57, 6967, 19, 544, 109, 1502, 4444, 255, 9386, 2829, 77, 10526, 43, 816, 9, 26, 823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Get Section´s Title === My question is this. I set all my titles´s section in my TableView. Sometime later, i need to get the values of the title in any section´s tableview, how can i ask that values directly to the UITableView? Without the delegate protocol: [self tableView:tableView titleForHeaderInSection:i] Thanks
0
[ 2, 164, 1050, 13, 18, 581, 800, 3726, 3726, 51, 1301, 25, 48, 9, 31, 309, 65, 51, 3037, 13, 18, 1050, 19, 51, 859, 4725, 9, 8530, 138, 15, 31, 376, 20, 164, 14, 4070, 16, 14, 581, 19, 186, 1050, 13, 18, 859, 4725, 15, 184,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 large integers in Rails 3 and postgres === Im using rails 3.2.3, ruby 1.9.3, and postgres 8.4.12 (on RHEL 6.3). I was hoping to store IP addresses as integers in a database, but get the following error when trying to save the record from the controller: def create @network = Network.new(params[:network]) @network.address_int = IPAddr.new(@network.address_str).to_i @network.netmask_int = IPAddr.new(@network.netmask_str).to_i respond_to do |format| if @network.save format.html { redirect_to @network, notice: 'Network was successfully created.' } format.json { render json: @network, status: :created, location: @network } else format.html { render action: "new" } format.json { render json: @network.errors, status: :unprocessable_entity } end end end I get the following error PG::Error: ERROR: value "4294967040" is out of range for type integer My migration defines this column as a 8 byte integer: class CreateNetworks < ActiveRecord::Migration def change create_table :networks do |t| t.integer :vlan t.integer :address_int, :limit => 8 t.integer :netmask_int, :limit => 8 t.string :address_str t.string :netmask_str t.string :desc t.timestamps end end end But I have been able to store this large integer at the rails console: 1.9.3p125 :001 > n=Network.new => #<Network id: nil, vlan: nil, address_int: nil, address_str: nil, netmask_int: nil, netmask_str: nil, desc: nil, created_at: nil, updated_at: nil> 1.9.3p125 :002 > n.address_int=4294967040 => 4294967040 1.9.3p125 :003 > n => #<Network id: nil, vlan: nil, address_int: 4294967040, address_str: nil, netmask_int: nil, netmask_str: nil, desc: nil, created_at: nil, updated_at: nil> 1.9.3p125 :004 > n.save (0.2ms) BEGIN SQL (5.0ms) INSERT INTO "networks" ("address_int", "address_str", "created_at", "desc", "netmask_int", "netmask_str", "updated_at", "vlan") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["address_int", 4294967040], ["address_str", nil], ["created_at", Tue, 10 Jul 2012 15:09:37 UTC +00:00], ["desc", nil], ["netmask_int", nil], ["netmask_str", nil], ["updated_at", Tue, 10 Jul 2012 15:09:37 UTC +00:00], ["vlan", nil]] (0.9ms) COMMIT => true So, should this bigint data type be defined somewhere else too? Thanks in advance.
0
[ 2, 184, 20, 3053, 370, 13820, 18, 19, 2240, 18, 203, 17, 678, 6879, 18, 800, 3726, 3726, 797, 568, 2240, 18, 203, 9, 135, 9, 240, 15, 10811, 137, 9, 518, 9, 240, 15, 17, 678, 6879, 18, 469, 9, 300, 9, 918, 13, 5, 218, 9940...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 pause all the other threads in Python? === I'm making a "python debug mapper" that shows a 'snapshot' of current python execution Currently, I need to know a way to pause every other threads so that the 'capture' won't happen while other threads are running. Are there any way to do: PauseOtherThreads() and ResumeOtherThreads() ? Thanks :D p.s: should I make any modifications to get the code working with Celery and Django?
0
[ 2, 184, 92, 31, 6911, 65, 14, 89, 20396, 19, 20059, 60, 800, 3726, 3726, 31, 22, 79, 544, 21, 13, 7, 6448, 11570, 121, 16254, 2942, 1432, 7, 30, 1285, 21, 13, 22, 18, 325, 306, 7868, 22, 16, 866, 20059, 5769, 871, 15, 31, 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...
How to pass checkbox values into an array using jQuery? === I am have the below checkboxes and I want to pass the checked values to an array so that I can do an ajax post. However, I am hitting an error and I am not sure where I went wrong... How do I pass the values into the array and how do I retrieve them? HTML <input type="checkbox" name="newCheckboxes" value="1" /> <input type="checkbox" name="newCheckboxes" value="2" /> <input type="checkbox" name="newCheckboxes" value="3" /> Script (not working) var allFields = $( [] ); $("#newCheckboxes:checked").each(function() { allFields.add( $(this).val() ); }); $.ajax( { type:"POST", url: "PostedHere", data:{ checkedValues: allFields } });
0
[ 2, 184, 20, 1477, 2631, 5309, 4070, 77, 40, 7718, 568, 487, 8190, 93, 60, 800, 3726, 3726, 31, 589, 57, 14, 1021, 2631, 5309, 160, 17, 31, 259, 20, 1477, 14, 6505, 4070, 20, 40, 7718, 86, 30, 31, 92, 107, 40, 20624, 678, 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...
MVC Testing in VS 2010 vs VS 11 === Over the last 2 months, I've been trying to learn the new MVC framework. After getting my head around all the object oriented concepts, I created a test site using MVC3, EF4 w/ DbContext, and ASP.Net Membership provider. All was going pretty well. Then, I decided to dive in and learn testing, starting with Unit Testing. After 2 weeks of banging my head against my keyboard, I now feel as frustrated as can be. I've gone through tons of video tutorials (TekPub, Plural-sight), online tutorials (ASP.Net, Microsoft, etc..etc..) and plenty of StackOverflow questions/answers. I now *sort-of* (ha!) understand Loose Coupling, Dependency Injection, Respositories, Interfaces, Stubs, Mocks (yes, I read the Fowler article many times), Shims, lambdas, refactoring...the list goes on and on (...and on.). I've looked at Ninject, Structuremap, Moq, TypeMock, JustMock, nUnit, xUnit, etc... So I know there are a bunch of ways to skin this cat. Now I see that VS11/MVC4 is coming out and they have this thing called Fakes which seem to be a good option for static methods like the Membership stuff. My question: I want to test my MVC EF4/DbContext/Membership application. Most of my pages require an authenticated user [Authorize] and thats before I even get to the actual method to be tested. If you were just starting out (like me), what is the simplest and easiest route to testing my CRUD application? I don't necessarily like having a DI framework running on the production side (just another thing that might go wrong) and I find the fracking things are confusing as all get out. I could upgrade to VS11/MVC4 and try the Fakes approach. Appears to be slightly simpler but still seems like I need all the Respository/Interfaces for EF stuff. Or would you just chuck it and use an Integration Test tool like Selenium (which is what I had to use before with Forms based development)? Any suggestions are greatly appreciated. Sorry if this is a lousy question but I'm hoping for a ray of light here...
0
[ 2, 307, 8990, 4431, 19, 4611, 498, 4611, 4611, 547, 800, 3726, 3726, 84, 14, 236, 172, 818, 15, 31, 22, 195, 74, 749, 20, 2484, 14, 78, 307, 8990, 6596, 9, 75, 1017, 51, 157, 140, 65, 14, 3095, 13, 6800, 8700, 15, 31, 679, 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...
Sql Query not working? === Why this query is not returning data of 2011 and 2012. Can anyone help me out.Thanks in advance. SELECT country_code,SUM(`attendance`) as k6_attendance,count(*) as total_events , IF(MONTH(`session_date`)<5,YEAR(`session_date`),YEAR(`session_date`)+1) as YR2 FROM `v_knowledge_session` v WHERE session_date >0 Group by YR2,country_code HAVING YR2>(YEAR(NOW())-2) AND country_code='IN' ORDER BY country_code,YR2;
0
[ 2, 4444, 255, 25597, 52, 638, 60, 800, 3726, 3726, 483, 48, 25597, 25, 52, 2485, 1054, 16, 542, 17, 563, 9, 92, 1276, 448, 55, 70, 9, 9107, 19, 3612, 9, 5407, 475, 1, 9375, 15, 18, 723, 5, 1, 721, 1316, 11855, 1, 6, 28, 68...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 value from expandable list view child value === I want to create custome expandable list view in android but when i click on child , no value found and my click event is given below...... mExpandableListView.setOnChildClickListener(new OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { Toast.makeText(getBaseContext(), "Child clicked", Toast.LENGTH_SHORT).show(); return true; } }); Any One know...please help Thanks In Advance
0
[ 2, 184, 20, 164, 1923, 37, 6073, 579, 968, 1418, 850, 1923, 800, 3726, 3726, 31, 259, 20, 1600, 5816, 62, 6073, 579, 968, 1418, 19, 13005, 47, 76, 31, 10840, 27, 850, 13, 15, 90, 1923, 216, 17, 51, 10840, 807, 25, 504, 1021, 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...
VB.NET 2008: invalid object name 'dbo.tablename' === I put my database to hosting provider. My desktop application works fine with local connection while quering with the tables and updating them. Application queries well without any issue with the database residing at hosting provider as well. Problem starts when I try to call the Update method of a table adoptor it says "invalid object name 'dbo.tablename'". I've searched the replaced the entire solution for the text "dbo.tablename" with "tablename". But still having same error only by calling this Update method of the adoptor. Any ides?
0
[ 2, 13, 20468, 9, 2328, 15573, 16671, 3095, 204, 13, 22, 43, 1192, 9, 5924, 7259, 22, 800, 3726, 3726, 31, 442, 51, 6018, 20, 10637, 11747, 9, 51, 17404, 3010, 693, 1123, 29, 375, 2760, 133, 13, 8190, 68, 29, 14, 7484, 17, 71, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 enumeration across tiers in a Java application === I have an application with 3 layers: GWT-RPC, Business and DAO In every layer I have different beans. For example for a User I'd have UserRPC (for the UI), User (business) and UserDTO (to persist). At every layer change I reconvert the objects. The main problem are the enumerations. The enumerations are exactly the same across the layers but I need to replicate them in order to keep the layer independence. Any suggestion?
0
[ 2, 1477, 26940, 872, 464, 7197, 18, 19, 21, 8247, 3010, 800, 3726, 3726, 31, 57, 40, 3010, 29, 203, 9124, 45, 14094, 38, 8, 139, 5779, 15, 508, 17, 13, 17104, 19, 352, 5385, 31, 57, 421, 14685, 9, 26, 823, 26, 21, 4155, 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...
Issues Rendering Highcharts - Populating through PHP/MySQL === I'm hoping someone can help me here, I've been looking at highcharts as a way of graphing my dynamic data from my sql db....What I've come up with so far is below, it's strange, it seems correct, the data is correct, however, I can't get my chart to render, now I've tried viewing the chart through both Chrome and IE but with no results, can anyone see where I might've gone wrong, or where there is an error...my data is passing into the JS arrays, so there's an issue with the rendering end... Any help would be much appreciated. I have closed off my html tag, but for some reason it isn't displaying in this post...if anyone has any suggestions I would be happy to hear them! <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src='highcharts.js' type='text/javascript'> </script> <script src='exporting.js' type='text/javascript'> </script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"type="text/javascript"></script> </head> <body> <?php include "connect_db.php"; $SQL1 = "SELECT review.reviewForum AS reviewForum, COUNT(CASE WHEN mom.result = 'Approved' THEN 'yes' ELSE NULL END) AS Approved, COUNT(CASE WHEN mom.result = 'NOT Approved' THEN 'yes' ELSE NULL END) AS Not_Approved, COUNT(CASE WHEN mom.result = 'Cancelled' THEN 'yes' ELSE NULL END) AS Cancelled FROM review INNER JOIN mom ON mom.reviewId = review.reviewId GROUP BY review.reviewForum"; $result1 = mysql_query($SQL1); $data1 = array(); while ($row = mysql_fetch_array($result1)) { $data1[] = $row['reviewForum']; } $result2 = mysql_query($SQL1); $data2 = array(); while ($row = mysql_fetch_array($result2)) { $data2[] = $row['Approved']; } $result3 = mysql_query($SQL1); $data3 = array(); while ($row = mysql_fetch_array($result3)) { $data3[] = $row['Not_Approved']; } $result4= mysql_query($SQL1); $data4 = array(); while ($row = mysql_fetch_array($result4)) { $data4[] = $row['Cancelled']; } ?> <script type="text/javascript"> $(document).ready(function() { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column' }, title: { text: 'TC REVIEW RESULT STATS' }, xAxis: { categories: [<?php echo join($data1, ',') ?>], }, yAxis: { min:0 }, legend: { layout: 'vertical', backgroundColor: '#FFFFFF', align: 'left', verticalAlign: 'top', x: 50, y: 35, floating: true, shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [ { name: 'Approved', data: [<?php echo join($data2, ',') ?>], pointStart: 0 //pointInterval }, { name: 'Unapproved', data: [<?php echo join($data3, ',') ?>], pointStart: 0 //pointInterval }, { name: 'Cancelled', data: [<?php echo join($data4, ',') ?>], pointStart: 0 //pointInterval }, ] }); }); </script> <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div> </body> </html>
0
[ 2, 1549, 15307, 183, 5433, 38, 18, 13, 8, 1675, 10038, 120, 13, 26120, 118, 915, 18, 22402, 800, 3726, 3726, 31, 22, 79, 3935, 737, 92, 448, 55, 235, 15, 31, 22, 195, 74, 699, 35, 183, 5433, 38, 18, 28, 21, 161, 16, 7210, 68...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Ignore invalid SSL certificate with XmlTextReader https request === I am trying to create an XML document from an https web request, but I am having trouble getting it to work when the site has an invalid certificate. I want my application to not care about the certificate, I want it to live it's life on the edge without fear! Here is the initial code I had, which I have used before may times to get what I want from a standard http (non SSL) request: XmlDocument xml = new XmlDocument(); XmlTextReader reader = new XmlTextReader("https://www.example.com"); xml.Load(reader); With the site having an invalid SSL certificate I am now getting the following error: > The request was aborted: Could not create SSL/TLS secure channel. Now I have done my Google-ing and tried a number of promising solutions but it seems to be of no help. One I tried [here on SO][1] looked good but didn't seem to work, I added the 'accepted answer' line of code directly before my code above as it wasn't too clear as where it should go. In case it makes any difference, my code is in a class library and I am testing via a console app. I am also using .Net 4 [1]: http://stackoverflow.com/questions/10036161/c-sharp-get-xml-site-over-ssl-tls-https
0
[ 2, 7174, 16671, 13, 18, 18, 255, 6259, 29, 23504, 11969, 10647, 106, 7775, 18, 3772, 800, 3726, 3726, 31, 589, 749, 20, 1600, 40, 23504, 4492, 37, 40, 7775, 18, 2741, 3772, 15, 47, 31, 589, 452, 2572, 1017, 32, 20, 170, 76, 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...
Decimals to one decimal place in as3? === I randomly generate a decimal using: private function randomNumber(min:Number, max:Number):Number { return Math.random() * (max - min) + min; } It comes out with something like 1.34235346435. How can I convert it so that its 1.3.
0
[ 2, 26380, 18, 20, 53, 26380, 209, 19, 28, 240, 60, 800, 3726, 3726, 31, 21324, 7920, 21, 26380, 568, 45, 932, 1990, 5477, 16299, 5, 2160, 45, 16299, 15, 2049, 45, 16299, 6, 45, 16299, 13, 1, 788, 5057, 9, 2195, 5555, 5, 6, 163...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Batch file to start a test === I have a coded ui test that I want to start by using batch, its a .dll file. The reason I'm calling it from a batch file is that the server has to be restarted before this test can be carried out. Is it just a simple `call test.dll` or do I have to do other stuff?
0
[ 2, 13064, 3893, 20, 799, 21, 1289, 800, 3726, 3726, 31, 57, 21, 13, 22254, 13, 5661, 1289, 30, 31, 259, 20, 799, 34, 568, 13064, 15, 82, 21, 13, 9, 43, 211, 3893, 9, 14, 1215, 31, 22, 79, 2555, 32, 37, 21, 13064, 3893, 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...
traversing directories with php? === I have a path to a folder (e.g. `/var/www/tester/assets/themes/default/css/`). a user can provide a relative path to the folder, so for example. `layout/ie7.css` would give the path of `/var/www/tester/assets/themes/default/css/layout/ie7.css`. This works fine, however I want the users to be able to navigate up the directory tree as well. so with the path to the css folder again if a user provides `../../cache/css/ie7.css` I want the path to end up as `/var/www/tester/assets/themes/default/cache/css/ie7.css`. I thought I could just pass them together to [realpath()](http://php.net/manual/en/function.realpath.php) e.g: $base = '/var/www/tester/assets/themes/default/css/'; $user_path = '../../cache/css/ie7.css'; $final_path = realpath($base.$user_path); But that just returns false. How can I do this?
0
[ 2, 19501, 68, 559, 1596, 29, 13, 26120, 60, 800, 3726, 3726, 31, 57, 21, 2013, 20, 21, 19294, 13, 5, 62, 9, 263, 9, 13, 1, 118, 3311, 118, 6483, 118, 38, 6930, 118, 9790, 38, 18, 118, 124, 3845, 118, 13862, 9708, 118, 6824, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
search database in ror === i am new in RoR. According to the book (ruby on rails 4th edition) i have finish it. but i am trying to make a search option for the customers to find the product more easer. I am trying with this example http://railscasts.com/episodes/37-simple-search-form i have put in views>products>index this: <% form_tag products_path, :method => 'get' do %> //when i remove this is shows me the searchbox etc i thing the path cause this problem <p> <%= text_field_tag :search, params[:search] %> <%= submit_tag "Search", :name => nil %> </p> <% end %> in the models>products i have put this: def self.search(search) if search find(:all, :conditions => ['name LIKE ?', "%#{search}%"]) else find(:all) end end and in controllers>products_controller this: @products = Product.search(params[:search]) the problem is that is not showing me the search box that i have created in views>products>index except if i remove the line <% form_tag products_path, :method => 'get' do %> (with the <%end%>) any ideas plz?
0
[ 2, 2122, 6018, 19, 761, 248, 800, 3726, 3726, 31, 589, 78, 19, 761, 248, 9, 496, 20, 14, 360, 13, 5, 1820, 779, 27, 2240, 18, 268, 96, 1322, 6, 31, 57, 2106, 32, 9, 47, 31, 589, 749, 20, 233, 21, 2122, 4255, 26, 14, 5279, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Bootstrapping issues with zend_test/phpunit === I am working with Zend_Test. Below is my tests/bootstrap.php file: // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'testing'); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), ))); require_once 'Zend/Loader/Autoloader.php'; $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('Ca_'); Zend_Controller_Action_HelperBroker::addPrefix('Ca_Controller_Action_Helper'); $resourceLoader = new Zend_Loader_Autoloader_Resource(array( 'namespace' => "Social", 'basePath' => APPLICATION_PATH . "/../library", )); $resourceLoader->addResourceType('facebook', 'Facebook/', 'Facebook'); This is my setUp() method in my test class (which is extending Zend_Test_PHPUnit_DatabaseTestCase): public function setUp() { $this->bootstrap = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini'); $this->entityUser = new Ca_Model_Entity_User_Registered(); $a = $this->getAdapter(); $a->setFetchMode(Zend_Db::FETCH_OBJ); $a->query("SET FOREIGN_KEY_CHECKS=0;"); parent::setUp(); } Now, when running a unit test I get the following error for this particular line of code: $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap'); $options = $bootstrap->getOptions(); > Fatal error: Call to a member function getOptions() on a non-object Does anyone know what is causing the issue and how I can resolve it ? Thanks.
0
[ 2, 5894, 1939, 5574, 1549, 29, 10526, 43, 1, 10543, 118, 26120, 15464, 800, 3726, 3726, 31, 589, 638, 29, 10526, 43, 1, 10543, 9, 1021, 25, 51, 4894, 118, 10858, 38, 18, 16514, 9, 26120, 3893, 45, 12894, 9267, 2013, 20, 3010, 1675...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
difference pylab and pyplot === What is the difference between matplotlib.pyplot and matplotlib.pylab? Which is preferred for what usage? I am a little confused, because it seems like independent from which I import, I can do the same things. What am I missing?
0
[ 2, 2841, 7103, 9086, 17, 7103, 13221, 38, 800, 3726, 3726, 98, 25, 14, 2841, 128, 4277, 13221, 38, 8326, 9, 6448, 13221, 38, 17, 4277, 13221, 38, 8326, 9, 6448, 9086, 60, 56, 25, 5981, 26, 98, 7514, 60, 31, 589, 21, 265, 4230, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
display sub categories using SQL === OK this is getting confusing so I decided to write a new question. I need to check if a row in my category table is a child category. I then need to check which parent category the child is part of? A parent category has a categoryID and a ParentCategoryID of 0 A child category has a categoryID and a ParentCategoryID eg 30. **Category Table:** ID PCID NAME 10 0 Computers 11 10 Software 12 10 Hardware **This is what Ive tried:** This will display the parent categories(because PCID 0 is the parent): SELECT CategoryID, ParentCategoryID, Name, Published, Deleted, PictureID FROM Nop_Category WHERE (Deleted = 0) AND (Published = 1) AND (ParentCategoryID = 0)
0
[ 2, 3042, 972, 6422, 568, 4444, 255, 800, 3726, 3726, 5854, 48, 25, 1017, 18084, 86, 31, 868, 20, 2757, 21, 78, 1301, 9, 31, 376, 20, 2631, 100, 21, 3131, 19, 51, 3230, 859, 25, 21, 850, 3230, 9, 31, 94, 376, 20, 2631, 56, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 reference not set to an instance of an object in Remember Me === I am writing code to store cookies for Remember Me next time in Login control. Which this will store the user's username on the textbox if the user had checked the "Remember Me" check box. And my login control was set inside LoginView. When i run the program and fill in the fields in the login control and hit submit(with or without checking the check box), it gave me this error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 65: Line 66: HttpCookie myCookie = new HttpCookie("myCookie"); Line 67: if (RememberMe.Checked == true) //here is the line giving error Line 68: { Line 69: myCookie.Values.Add("username", Login1.UserName); Line: 67 This is the code for login control: <asp:LoginView ID="LoginView1" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server" onloggingin="Login1_LoggingIn" onloginerror="Login1_LoginError" onauthenticate="Login1_Authenticate" RememberMeSet="True"> <LayoutTemplate> <table cellpadding="1" cellspacing="0" style="border-collapse:collapse;"> <tr> <td> <table cellpadding="0"> <tr> <td align="center" colspan="2"> Log In</td> </tr> <tr> <td align="right"> <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label> </td> <td> <asp:TextBox ID="UserName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td align="right"> <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label> </td> <td> <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td colspan="2"> <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." /> </td> </tr> <tr> <td align="center" colspan="2" style="color:Red;"> <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$Login1" /> </td> </tr> </table> </td> </tr> </table> </LayoutTemplate> </asp:Login> </AnonymousTemplate> <LoggedInTemplate> <asp:LoginStatus ID="LoginStatus1" runat="server" /> </LoggedInTemplate> </asp:LoginView> This is the code at the back: protected void Page_Load(object sender, EventArgs e) { System.Web.UI.WebControls.Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1"); TextBox UserName = (TextBox)Login1.FindControl("UserName"); if (Request.Cookies["myCookie"] != null) { HttpCookie cookie = Request.Cookies.Get("myCookie"); Login1.UserName = cookie.Values["username"]; //.Attributes.Add("value", cookie.Values["password"]); Response.Cookies["myCookie"].Expires = DateTime.Now.AddDays(-1); } } protected void Login1_LoggingIn(object sender, LoginCancelEventArgs e) { System.Web.UI.WebControls.Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1"); TextBox UserName = (TextBox)Login1.FindControl("UserName"); //Check to see if the current user exists if (Membership.GetUser(Login1.UserName) != null) { //Check to see if the user is currently locked out if (Membership.GetUser(Login1.UserName).IsLockedOut) { //Get the last lockout date from the user DateTime lastLockout = Membership.GetUser(Login1.UserName).LastLockoutDate; Response.Write(lastLockout.ToString()); //Calculate the time the user should be unlocked DateTime unlockDate = lastLockout.AddMinutes(Membership.PasswordAttemptWindow); //Check to see if it is time to unlock the user if (DateTime.Now > unlockDate) Membership.GetUser(Login1.UserName).UnlockUser(); } } } protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { System.Web.UI.WebControls.Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1"); TextBox UserName = (TextBox)Login1.FindControl("UserName"); Response.Cookies.Add(new HttpCookie("UserName", Login1.UserName)); CheckBox RememberMe = LoginView1.FindControl("RememberMe") as CheckBox; //CheckBox RememberMe = (CheckBox).Login1.FindControl("RememberMe"); HttpCookie myCookie = new HttpCookie("myCookie"); if (RememberMe.Checked == true) { myCookie.Values.Add("username", Login1.UserName); myCookie.Expires = DateTime.Now.AddDays(15); Response.Cookies.Add(myCookie); } } protected void Login1_LoginError(object sender, EventArgs e) { System.Web.UI.WebControls.Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1"); TextBox UserName = (TextBox)Login1.FindControl("UserName"); Literal FailureText = (Literal)Login1.FindControl("FailureText"); //There was a problem logging in the user //See if this user exists in the database MembershipUser userInfo = Membership.GetUser(Login1.UserName); if (userInfo == null) { //The user entered an invalid username... Login1.FailureText = "There is no user in the database with the username " + UserName.Text; } else { //See if the user is locked out or not approved if (!userInfo.IsApproved) Login1.FailureText = "When you created your account you were sent an email with steps to verify your account. You must follow these steps before you can log into the site."; else if (userInfo.IsLockedOut) Login1.FailureText = "Your account has been temporary locked due to a maximum number of incorrect login attempts."; else //The password was incorrect (don't show anything, the Login control already describes the problem) Login1.FailureText = string.Empty; } }
0
[ 2, 3095, 2801, 52, 309, 20, 40, 4851, 16, 40, 3095, 19, 1518, 55, 800, 3726, 3726, 31, 589, 1174, 1797, 20, 1718, 19396, 26, 1518, 55, 328, 85, 19, 6738, 108, 569, 9, 56, 48, 129, 1718, 14, 4155, 22, 18, 4155, 7259, 27, 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...
How do I get friends gender using facebook api and fql === I am new to PHP and FQL. I know how it needs to be done, but don't know the codes. Creating an application where user sees only the opposite gender in <select> box. I got up to getting the the user's name, gender and friends id. Now I need help running the FQL to and getting the gender of all the friends and insert the names of the opposite gender in <select></select>. <?php $fbuser = $facebook->api('/me');//getting users data $friends = $facebook->api('/me/friends'); //getting friends data (only gives id and name) $userName = $fbuser['name'];//getting users name $userGender = $fbuser['gender'];//getting users gender $friendsId = array();//empyt array to insert friends id foreach ($friends['data'] as $value);{ //loop array_push($friendsId, $value['id']); // not sure if this correct $friendsGender = friendsGender ;//run FQL to get the friends gender using the id //conditional Statement, if users and friends gender is not same insert the friends name in <select> ?>
0
[ 2, 184, 107, 31, 164, 954, 4552, 568, 9090, 21, 2159, 17, 398, 22402, 800, 3726, 3726, 31, 589, 78, 20, 13, 26120, 17, 398, 22402, 9, 31, 143, 184, 32, 2274, 20, 44, 677, 15, 47, 221, 22, 38, 143, 14, 11358, 9, 2936, 40, 301...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 parse a PDF with no /Root object using PDFMiner? === I'm trying to extract text from a large number of PDFs using PDFMiner python bindings. The module I wrote works for many PDFs, but I get this somewhat cryptic error for a subset of PDFs: ipython stack trace: /usr/lib/python2.7/dist-packages/pdfminer/pdfparser.pyc in set_parser(self, parser) 331 break 332 else: --> 333 raise PDFSyntaxError('No /Root object! - Is this really a PDF?') 334 if self.catalog.get('Type') is not LITERAL_CATALOG: 335 if STRICT: PDFSyntaxError: No /Root object! - Is this really a PDF? Of course, I immediately checked to see whether or not these PDFs were corrupted, but they can be read just fine. Is there any way to read these PDFs despite the absence of a root object? I'm not too sure where to go from here. Many thanks!
0
[ 2, 184, 92, 31, 2017, 870, 21, 13, 11124, 29, 90, 13, 118, 14032, 3095, 568, 13, 11124, 2160, 106, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 10962, 1854, 37, 21, 370, 234, 16, 13, 11124, 18, 568, 13, 11124, 2160, 106, 20059, 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...
Get currency rate in c# === What I want to do is, - to get conversion rate from this website (I have choosen xe.com because it supports needed currencies AZN <-> USD) - If it's possible for example to send "5 AZN" and get what it equals in USD. URL looks like this: http://www.xe.com/ucc/convert/?Amount=5&From=AZN&To=USD I grabbed this snippet from inernet. [Source blog][1] string xeString = String.Format("http://www.xe.com/ucc/convert.cgi?Amount=1&From={0}&To={1}", srcCurrency, dstCurrency); System.Net.WebRequest wreq = System.Net.WebRequest.Create(new Uri(xeString)); System.Net.WebResponse wresp = wreq.GetResponse(); Stream respstr = wresp.GetResponseStream(); int read = respstr.Read(buf, 0, BUFFER_SIZE); result = Encoding.ASCII.GetString(buf, 0, read); Now, this will return something like `XE.com: USD to EUR rate: 1.00 USD = 0.716372 EUR` The problems are: 1. I have no idea what are `buf` and BUFFER_SIZE variables. (Author of snippet doesn't explain). 2. How can I get, exact result like send `5 AZN` and get it in USDs (as double)?http://www.xe.com/ucc/convert/?Amount=5&From=AZN&To=USD [1]: http://dickchiang.blogspot.com/2010/02/getting-foreign-exchange-currency-with.html
0
[ 2, 164, 10507, 1684, 19, 272, 5910, 800, 3726, 3726, 98, 31, 259, 20, 107, 25, 15, 13, 8, 20, 164, 6263, 1684, 37, 48, 2271, 13, 5, 49, 57, 3538, 103, 13, 13012, 9, 960, 185, 32, 6747, 851, 5087, 139, 22851, 9426, 103, 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...
Why does JDialog 'jump' on setLocationRelativeTo()? === Have a class that extends JDialog. It's initialized entirely on EDT (just in case). Now, public PropsDialog (JFrame parentFrame) { super(parentFrame); // boring pack(); setLocationRelativeTo(getParent()); setVisible(true); results in dialog appearing in the leftmost corner and then jumping to it's intended position. Am I doing smth wrong?
0
[ 2, 483, 630, 487, 4286, 5567, 13, 22, 21925, 22, 27, 309, 19032, 7256, 3366, 262, 5, 6, 60, 800, 3726, 3726, 57, 21, 718, 30, 9073, 487, 4286, 5567, 9, 32, 22, 18, 2104, 1333, 2894, 27, 13, 69, 38, 13, 5, 2759, 19, 610, 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...
own design matrix in r === Here is my data: sub <- paste ("s", 1:6, sep = "") mark1a <- c("A", "A", "B", "d1", "A", 2) mark1b <- c("A", "B", "d1", 2, "d1", "A") myd <- data.frame (sub, mark1a, mark1b) myd sub mark1a mark1b 1 s1 A A 2 s2 A B 3 s3 B d1 4 s4 d1 2 5 s5 A d1 6 s6 2 A I want create a design matrix of the pair of variables (columns) - mark1a and mark1b. A design matrix will consists of length (unique (c(mark1a, mark1b))) for each unique (c(mark1a, mark1b). then 1 or 2 based on if the particular number is present once or twice in the columns and else 0. The following is expected output (not a figure): ![enter image description here][1] I could understand how this can be done: [1]: http://i.stack.imgur.com/1JjqQ.jpg
0
[ 2, 258, 704, 8187, 19, 761, 800, 3726, 3726, 235, 25, 51, 1054, 45, 972, 13, 1, 8, 640, 62, 13, 5, 7, 18, 7, 15, 6352, 379, 15, 10332, 800, 13, 7, 7, 6, 943, 165, 58, 13, 1, 8, 272, 5, 7, 58, 7, 15, 13, 7, 58, 7, 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...
Permission denied at hdfs === I am new to hadoop distributed file system, I have done complete installation of hadoop single node on my machine.but after that when i am going to upload data to hdfs it give an error message Permission Denied. Message from terminal with command: hduser@ubuntu:/usr/local/hadoop$ hadoop fs -put /usr/local/input-data/ /input put: /usr/local/input-data (Permission denied) hduser@ubuntu:/usr/local/hadoop$
0
[ 2, 5572, 5265, 35, 8590, 11754, 800, 3726, 3726, 31, 589, 78, 20, 41, 21709, 4387, 3893, 329, 15, 31, 57, 677, 1279, 7758, 16, 41, 21709, 345, 15421, 27, 51, 1940, 9, 811, 75, 30, 76, 31, 589, 228, 20, 71, 8294, 1054, 20, 8590...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 the table row with the greatest id value === I am trying to write mysql statement that selects the last added value from the table. Since the id column in my table is an auto increment value, I find that the easiest way to do this is selecting the row with the highest ID value. I was wondering if anyone can help me accomplish this? Something like this: mysql_query("SELECT * FROM table WHERE id=max(id)"
0
[ 2, 20764, 14, 859, 3131, 29, 14, 3023, 4924, 1923, 800, 3726, 3726, 31, 589, 749, 20, 2757, 51, 18, 22402, 3331, 30, 5407, 18, 14, 236, 905, 1923, 37, 14, 859, 9, 179, 14, 4924, 4698, 19, 51, 859, 25, 40, 3108, 13, 28461, 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...
MySQL: Producer/Consumer Model, need atomicity in commands accessing multiple tables === I have the following 2 tables, with sample values: producer_tbl: producer_id item_id item_added 5 3 20 products_available_tbl: item_id avail_cnt blocked_cnt 3 9 2 Here is the method how I access them: When a manufactured provides me with an item, I insert appropriate data in producer_tbl. I simultaneously increment the avail_cnt for the respective item in products_available_tbl. When a consumer wants that given item, I first use (avail_cnt - blocked_cnt) to check if the quantity asked for is available. If so, I increment the blocked_cnt with the quantity, but don't update avail_cnt. When the consumer commits to his request, I decrement the blocked_cnt and avail_cnt, both with the same quantity. Now, when there are multiple producers and consumers touching the same item simultaneously, I need atomicity for the above operations. I would like to know if can I solve this with triggers? (I don't want to use external mutexes) Anyone can point me to sample examples of how to do this?
0
[ 2, 51, 18, 22402, 45, 1421, 118, 12124, 723, 106, 1061, 15, 376, 9692, 856, 19, 14294, 1381, 68, 1886, 7484, 800, 3726, 3726, 31, 57, 14, 249, 172, 7484, 15, 29, 5717, 4070, 45, 1421, 1, 38, 6287, 45, 1421, 1, 1340, 9101, 1, 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...
Stop Tableview from crashing when array is empty? === At first my table view is empty, and then you can add your own cells to it. When you delete those cells, everything works fine. However, if you delete the last cell, then my NSMutableArray has no objects in it, and I get this error in my console (also, I'm using Core Data to save the cells): *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[_PFBatchFaultingArray objectAtIndex:]: index (123150308) beyond bounds (1)' I also tried putting in this line of code, but I still get the same results: //arr is my mutable array if ([arr count] == 0) { NSLog(@"No Cells"); } This is how I delete an object from the table view: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { [arr removeObjectAtIndex:0]; [context deleteObject:[arr objectAtIndex:0]]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } } How would I solve this problem? (Also, if anyone could help me in this other question, how could you incorporate a static table cell with dynamic cells?)
0
[ 2, 747, 859, 4725, 37, 14604, 76, 7718, 25, 2424, 60, 800, 3726, 3726, 35, 64, 51, 859, 1418, 25, 2424, 15, 17, 94, 42, 92, 3547, 154, 258, 2934, 20, 32, 9, 76, 42, 27448, 273, 2934, 15, 796, 693, 1123, 9, 207, 15, 100, 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...
Why timedeltas can't be multiplied/divided in numpy? === I'm new to numpy, and I'm trying to use it for some simple statistics like computing the median or the stddev(I know I should look into Pandas, but first I would like to familiarize myself with numpy). One of the "columns" I want to explore is a time difference(being its type the timedelta64 numpy type), but I can't apply those statistical ufuncs directly: ----> 1 age_request.std() TypeError: ufunc 'divide' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe' Why is so?
0
[ 2, 483, 85, 3436, 6922, 92, 22, 38, 44, 28535, 118, 11390, 7424, 19, 13, 6336, 6448, 60, 800, 3726, 3726, 31, 22, 79, 78, 20, 13, 6336, 6448, 15, 17, 31, 22, 79, 749, 20, 275, 32, 26, 109, 1935, 5818, 101, 10626, 14, 2245, 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...
The method 'OrderBy' must be called before the method 'Skip' Exception === I was trying to implement the `jQgrid` using `MvcjQgrid` and i got this exception. System.NotSupportedException was unhandled by user code Message=The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'. Though OrdeyBy is used before Skip method why it is generating the exception? How can it be solved? I encountered the exception in the controller: public ActionResult GridDataBasic(GridSettings gridSettings) { var jobdescription = sm.GetJobDescription(gridSettings); var totalJobDescription = sm.CountJobDescription(gridSettings); var jsonData = new { total = totalJobDescription / gridSettings.PageSize + 1, page = gridSettings.PageIndex, records = totalJobDescription, rows = ( from j in jobdescription select new { id = j.JobDescriptionID, cell = new[] { j.JobDescriptionID.ToString(), j.JobTitle, j.JobType.JobTypeName, j.JobPriority.JobPriorityName, j.JobType.Rate.ToString(), j.CreationDate.ToShortDateString(), j.JobDeadline.ToShortDateString(), } }).ToArray() }; return Json(jsonData, JsonRequestBehavior.AllowGet); } **GetJobDescription Method** and **CountJobDescription Method** public int CountJobDescription(GridSettings gridSettings) { var jobdescription = _dataContext.JobDescriptions.AsQueryable(); if (gridSettings.IsSearch) { jobdescription = gridSettings.Where.rules.Aggregate(jobdescription, FilterJobDescription); } return jobdescription.Count(); } public IQueryable<JobDescription> GetJobDescription(GridSettings gridSettings) { var jobdescription = orderJobDescription(_dataContext.JobDescriptions.AsQueryable(), gridSettings.SortColumn, gridSettings.SortOrder); if (gridSettings.IsSearch) { jobdescription = gridSettings.Where.rules.Aggregate(jobdescription, FilterJobDescription); } return jobdescription.Skip((gridSettings.PageIndex - 1) * gridSettings.PageSize).Take(gridSettings.PageSize); } And Finally **FilterJobDescription and OrderJobDescription** private static IQueryable<JobDescription> FilterJobDescription(IQueryable<JobDescription> jobdescriptions, Rule rule) { if (rule.field == "JobDescriptionID") { int result; if (!int.TryParse(rule.data, out result)) return jobdescriptions; return jobdescriptions.Where(j => j.JobDescriptionID == Convert.ToInt32(rule.data)); } // Similar Statements return jobdescriptions; } private IQueryable<JobDescription> orderJobDescription(IQueryable<JobDescription> jobdescriptions, string sortColumn, string sortOrder) { if (sortColumn == "JobDescriptionID") return (sortOrder == "desc") ? jobdescriptions.OrderByDescending(j => j.JobDescriptionID) : jobdescriptions.OrderBy(j => j.JobDescriptionID); return jobdescriptions; }
0
[ 2, 14, 2109, 13, 22, 7861, 779, 22, 491, 44, 227, 115, 14, 2109, 13, 22, 2413, 306, 22, 5391, 800, 3726, 3726, 31, 23, 749, 20, 8713, 14, 13, 1, 728, 1251, 16375, 1, 568, 13, 1, 79, 8990, 728, 1251, 16375, 1, 17, 31, 330, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
simple_html_dom get an input with a partial id value === Im trying to get td fields from a table with the id `sid-120390923` or `sid-38737122` ignoring any other id value in the table, however the problem is that I can not get these td fields because they all have a slightly different id but with the same start ('sid'). what I want is to be able to grab all the td fields with the starting id `sid-`, would there be a way to incorporate regex? here is an example **html** <table> <tr> <td id='9sd'></td> <td id='10sd'></td> <td id='sid-1239812983'></td> <td id='sid-1454345345'></td> <td id='sid-2342345234'></td> <td id='sid-5656433455'></td> <td id='sid-1231235664'></td> <td id='sid-8986757575'></td> <td id='sid-1232134551'></td> </tr> </table> **simple_html_dom** $table = $con->find('table'); foreach($table->find('td#sid-1232134551') as $field){ echo $field."<br>"; }
0
[ 2, 1935, 1, 15895, 1, 5555, 164, 40, 6367, 29, 21, 7284, 4924, 1923, 800, 3726, 3726, 797, 749, 20, 164, 15596, 2861, 37, 21, 859, 29, 14, 4924, 13, 1, 18, 1340, 8, 12054, 3412, 2545, 2001, 1, 54, 13, 1, 18, 1340, 8, 26463, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
dll used by CLR at runtime === I've a c# app which refers to a .Net dll. If this dll is present both in my application bin directory and GAC, then which one would be picked up by CLR at runtime?If GAC has the latest version, then it would it be used instead of the one present in bin? And how do I force CLR to use the one in my bin always instead of GAC? Thanks.
0
[ 2, 13, 43, 211, 147, 34, 10842, 139, 35, 485, 891, 800, 3726, 3726, 31, 22, 195, 21, 272, 5910, 4865, 56, 3806, 20, 21, 13, 9, 2328, 13, 43, 211, 9, 100, 48, 13, 43, 211, 25, 734, 156, 19, 51, 3010, 4511, 16755, 17, 4369, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Stop detect my application as a virus === I make an application that, when you run it, will put the .exe in Startup. I have this code for that: RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rkApp.SetValue("smartAppointment", Application.ExecutablePath.ToString()); Will creat a registery for the application to start with the Windows, but there is a problem, some antivirus will detect my application as a virus. How I can stop the antivirus to detect my application as a virus ?
0
[ 2, 747, 9092, 51, 3010, 28, 21, 6231, 800, 3726, 3726, 31, 233, 40, 3010, 30, 15, 76, 42, 485, 32, 15, 129, 442, 14, 13, 9, 1706, 62, 19, 20205, 9, 31, 57, 48, 1797, 26, 30, 45, 18269, 4237, 13, 7005, 7753, 800, 18269, 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 can i dinamicly add a div to my page after the body tag? === i wrote the fallowing code, only problem it places the div before the closing </body> tag and i want it to be at the beginning. <script type="text/javascript" language="javascript"> window.onload = function createDiv1() { var divTag1 = document.createElement("div"); divTag1.id = "mid section"; divTag1.setAttribute("align", "center"); divTag1.className = "dynamicDivmid"; divTag1.innerHTML = "pp"; document.body.appendChild(divTag1); }
0
[ 2, 184, 92, 31, 13, 10599, 5410, 102, 3547, 21, 13, 12916, 20, 51, 2478, 75, 14, 358, 3383, 60, 800, 3726, 3726, 31, 738, 14, 1080, 3581, 68, 1797, 15, 104, 1448, 32, 1489, 14, 13, 12916, 115, 14, 4239, 13, 1, 118, 9760, 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...
Removing letters from words within a file C - problematic sign === to be precise, I'm trying to copy from file A to file B, every word that DOES NOT have both letters 'e' and 't' in them (the, peter, etc), the program works fine, but at the end of the outfile I'm getting a weird sign. Input: What says Lucentio to this shame of ours? Output: What says to this shame of ours?˙ (Can u see the sign "˙"?) I dont want it, I have no idea whats that, but its not EOF, i tried to declude it from copying and it does not work. I require some help here. Code: char signHold[1]; int main(int *argc, char** argv) { FILE* infile; FILE* outfile; char* string = NULL; if(argc != 3) { printf(stderr,"Error: Improper number of arguments"); return EXIT_FAILURE; } remove(argv[2]); infile = fopen(argv[1],"r"); while(feof(infile) == 0) { string = getWord(infile); if(checkDenied(string)) addToFile(outfile, argv[2], string); addToFile(outfile, argv[2], signHold); } fclose(infile); free(string); return EXIT_SUCCESS; } char* getWord(FILE* ptr) { char* tempString; size_t memSize = 0; int c; tempString = expandRealloc(NULL,sizeof(char)); while(c = fgetc(ptr)) { if(isalpha(c) != 0) { tempString = expandRealloc(tempString, (memSize+1)*sizeof(char)+1); tempString[memSize] = c; memSize++; } else { signHold[0] = c; break; } } tempString[memSize] = '\0'; return tempString; } short int checkDenied(const char* str) { int i; i = strspn("e", str); if(i >= 1) { i = strspn("t", str); if(i >= 1) { return EXIT_SUCCESS; } } return EXIT_FAILURE; }
0
[ 2, 9096, 2516, 37, 715, 363, 21, 3893, 272, 13, 8, 21070, 1676, 800, 3726, 3726, 20, 44, 11114, 15, 31, 22, 79, 749, 20, 4344, 37, 3893, 21, 20, 3893, 334, 15, 352, 833, 30, 630, 52, 57, 156, 2516, 13, 22, 62, 22, 17, 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...
Windows api GetClientRect issue === I am using the following function and code to try to get the size of a client window in vb.net, I don't think I have any issues with my Rect structure. Why do I get this error: 'Arithmetic operation resulted in an overflow.' Can you get this to work for me please? Thanks in advance Private Declare Function GetClientRect Lib "user32" (ByVal _ hwnd As IntPtr, ByVal lpRect As Rect) As Boolean Dim lobbywindow As Long = windowhwnd Dim lobbyrect As New Rect GetClientRect(lobbywindow, lobbyrect)
0
[ 2, 1936, 21, 2159, 164, 150, 18513, 6384, 11557, 1513, 800, 3726, 3726, 31, 589, 568, 14, 249, 1990, 17, 1797, 20, 1131, 20, 164, 14, 1072, 16, 21, 6819, 1463, 19, 13, 20468, 9, 2328, 15, 31, 221, 22, 38, 277, 31, 57, 186, 154...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...