unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Wordpress displaying custom post types and their fields === I have set up a Custom Post Type called 'RELEASES' - think music cd release. This post type has fields named 'release_artist', 'release_title', 'release_date', 'release_artwork' and 'release_tracklisting' for entering all of the relevant music cd information. I am having real trouble actually displaying this information in my Wordpress template. I have really only had luck outputting a list of the titles and none of the other data. Any idea what I put in the LOOP to display all of the information? Preferably each in its own LIST item so I can style each separately? Any thoughts greatly appreciated.
0
[ 2, 833, 5890, 17418, 5816, 678, 2551, 17, 66, 2861, 800, 3726, 3726, 31, 57, 309, 71, 21, 5816, 678, 1001, 227, 13, 22, 15202, 18, 22, 13, 8, 277, 232, 1745, 830, 9, 48, 678, 1001, 63, 2861, 377, 13, 22, 15202, 1, 22175, 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...
Unable to Save Excel File using NPOI Library === I am having some difficulties exporting excel file using NPOI dll through ASP.NET page. Basically, I am able to populate the cells with no exception, however right at the few last steps where I need to export out the excel, it throws an exception when it tries to run Response.End. Dim ms As New MemoryStream xlWorkbook.Write(ms) Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment;filename=M4_Control_Chart.xls") Response.Clear() Response.BinaryWrite(ms.GetBuffer()) Response.[End]() I dont get a lot of information from the exception, it just says "Unable to evaluate expression" Does anyone have any idea how to fix this? Thanks.
0
[ 2, 2343, 20, 2079, 20700, 3893, 568, 13, 8157, 8222, 1248, 800, 3726, 3726, 31, 589, 452, 109, 8075, 7487, 68, 20700, 3893, 568, 13, 8157, 8222, 13, 43, 211, 120, 28, 306, 9, 2328, 2478, 9, 11374, 15, 31, 589, 777, 20, 1675, 123...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
combining mouseenter,mouseleave and click events in changing div background === This is my current code and I've been trying to work it out for over an hour already: $('#menu_list').bind('mouseenter mouseleave click', function(event){ if(event.type == 'click') { $('#list_img').css('background-image', 'url(<?=base_url()?>/assets/css/images/list_active.png)'); $('#add_img').css('background-image', 'url(<?=base_url()?>/assets/css/images/add_inactive.png)'); $('#search_img').css('background-image', 'url(<?=base_url()?>/assets/css/images/search_inactive.png)'); $('#list_text').css('color', 'black'); $('#add_text').css('color', '#C0C0C0'); $('#search_text').css('color', '#C0C0C0'); } else if(event.type == 'mouseenter') { $('#list_text').css('color', 'black'); $('#list_img').css('background-image', 'url(<?=base_url()?>/assets/css/images/list_active.png)'); } else if(event.type == 'mouseleave' && !list_clicked) { $('#list_img').css('background-image', 'url(<?=base_url()?>/assets/css/images/list_inactive.png)'); } }); What it should do is when I hover, the icon changes. But when I clicked, the icon stays on as active until I clicked on another item. There is no problem with the mouseenter/mouseleave. The problem starts with the click. Upon click, it does the job, but upon moving the mouse, the mouseleave function activates. Meaning the icon becomes inactive again.
0
[ 2, 12803, 7567, 13679, 15, 14002, 62, 14416, 17, 10840, 963, 19, 4226, 13, 12916, 2395, 800, 3726, 3726, 48, 25, 51, 866, 1797, 17, 31, 22, 195, 74, 749, 20, 170, 32, 70, 26, 84, 40, 1671, 614, 45, 5579, 5, 22, 5910, 755, 291,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
MediaWiki - What files render the html? === I'm trying to add a PHP function directly into the "homepage" and not via the edit. Windows Search is fubar so I'm asking what .php file i am to edit to be able to insert my own code into.
0
[ 2, 941, 17375, 13, 8, 98, 6488, 16535, 14, 13, 15895, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 3547, 21, 13, 26120, 1990, 1703, 77, 14, 13, 7, 8167, 6486, 7, 17, 52, 1197, 14, 9392, 9, 1936, 2122, 25, 2916, 1850, 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...
Exception when Interating through ListBox.Items === If no item is selected in the ListBox, then the code works fine. If at least one item is selected in the ListBox, the foreach iteration breaks after the first item is evaluated. The exception is an InvalidOperationException and the detail shows Items collection has been modified. foreach (object item in listBoxFiles.Items) //InvalidOperationException occurs { if (listBoxFiles.SelectedItems.Contains(item)) { //do nothing } }
0
[ 2, 5391, 76, 1480, 1880, 120, 968, 5309, 9, 2119, 79, 18, 800, 3726, 3726, 100, 90, 9101, 25, 1704, 19, 14, 968, 5309, 15, 94, 14, 1797, 693, 1123, 9, 100, 35, 639, 53, 9101, 25, 1704, 19, 14, 968, 5309, 15, 14, 26, 14322, 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...
Error when duplicating Joomla setup === I have a Joomla installation set up on my local server. I have duplicated with a new name the top-level Joomla folder so that all the information I have already put into the database can be edited slightly, whilst still keeping the original intact. I have copied the database files over to a new database and made the relevant changes in Joomla admin. I've opened up configuration.php and changed all the file paths to the new one. However, now I'm getting a server error when trying to access the web page and admin area. Are there any other files I need to edit with the new path to enable it to work under the new parent folder?
0
[ 2, 7019, 76, 1052, 25971, 1203, 2640, 2636, 531, 18161, 800, 3726, 3726, 31, 57, 21, 2640, 2636, 531, 7758, 309, 71, 27, 51, 375, 8128, 9, 31, 57, 19429, 43, 29, 21, 78, 204, 14, 371, 8, 3906, 2640, 2636, 531, 19294, 86, 30, 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...
Could not find compiled resource bundle 'components' for locale 'en_US' === I'm building my Flex 4.6 project using ant. The Ant script also compiles a css file to swf, but when I run the application, it gives an error: Could not find compiled resource bundle 'components' for locale 'en_US'. Here is the piece of my ant script that builds the style file: <mxmlc incremental="true" fork="true" optimize="true" debug="false" file="${app.dir}/src/main/resources/stylepacks/${stylepack}/styles.css" output="${output.dir}/stylepacks/${stylepack}/styles.swf"> <source-path path-element="${app.dir}/src/main/flex" /> </mxmlc> I've tried many possible solutions that I found, such as including the resource bundles: <include-resource-bundles>components</include-resource-bundles> or <include-resource-bundles bundle="components" /> and referncing the Flex resource bundles: <source-path path-element="${FLEX_HOME}/framework/locale/en_US" /> but it all doesn't seem to work. The application and the stylesheet uses both HALO and Spark elements, so I've tried with both themes, but then the build fails: <compiler.theme file="${theme}" /> Does anyone have any more suggestions??
0
[ 2, 110, 52, 477, 9316, 6577, 10194, 13, 22, 11103, 849, 14128, 22, 26, 375, 62, 13, 22, 219, 1, 267, 22, 800, 3726, 3726, 31, 22, 79, 353, 51, 14409, 268, 9, 379, 669, 568, 40, 38, 9, 14, 40, 38, 3884, 67, 26561, 18, 21, 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...
Not able to debug junit. On debug it runs the unit test without stoping at debug point. === I am not able to debug junit. On running the unit test in debug mode, runs the test without stopping at the debug point. Help is appreciated. Thanks
0
[ 2, 52, 777, 20, 121, 16254, 7446, 242, 9, 27, 121, 16254, 32, 1461, 14, 1237, 1289, 366, 747, 68, 35, 121, 16254, 454, 9, 800, 3726, 3726, 31, 589, 52, 777, 20, 121, 16254, 7446, 242, 9, 27, 946, 14, 1237, 1289, 19, 121, 16254...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 lifetime of global objectives === Suppose the learner takes course A. A global objective (g-obj-1) is created by this course. The learner triggers an Exit All or Suspend All navigation request and returns to LMS. The learner is deleted by the LMS's admin. Now, what should be happened to the global objective (g-obj-1)? Should it be deleted or should it be set to default?
0
[ 2, 14, 5277, 16, 2062, 12471, 800, 3726, 3726, 5787, 14, 2484, 106, 1384, 674, 21, 9, 21, 2062, 7038, 13, 5, 263, 8, 111, 11741, 8, 165, 6, 25, 679, 34, 48, 674, 9, 14, 2484, 106, 7286, 18, 40, 4350, 65, 54, 25082, 65, 8368,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Awk - use particular line again to match with patterns === Suppose I have file: 1Alorem 2ipsuml 3oremip 4sumZAl 5oremip 6sumlor 7emZips I want to split text from lines containing A to lines containing Z match with range: /A/,/Z/ { print > "rangeX.txt" } I want this particular input to give me 2 files: 1Alorem 2ipsuml 3oremip 4sumZAl and 4sumZAl 5oremip 6sumlor 7emZips problem is that line 4 is taken only once ad is matched as end of range, but 2nd range never starts because there is no A in other lines. Is there a way to try to match line 4 again against all patterns or tell awk that it has to start new range? Thanks
0
[ 2, 13, 3885, 197, 13, 8, 275, 1498, 293, 188, 20, 730, 29, 6282, 800, 3726, 3726, 5787, 31, 57, 3893, 45, 137, 9053, 99, 79, 172, 4307, 18, 723, 255, 203, 248, 7411, 306, 268, 18, 723, 10662, 331, 248, 7411, 306, 400, 18, 723,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 develop replica of zohowriter === I want to develop a web application with Ruby on Rails, that can edit word documents with options of mail merge etc (very similar to zohowriter's options). But I dont have any clue to do this. Can anyone give me some valuable suggestion and approach? Is there any gem/plugin exists using which it can be true? Thanks in advance
0
[ 2, 184, 20, 2803, 13426, 16, 9017, 1807, 9657, 800, 3726, 3726, 31, 259, 20, 2803, 21, 2741, 3010, 29, 10811, 27, 2240, 18, 15, 30, 92, 9392, 833, 4374, 29, 6368, 16, 4216, 12666, 2722, 13, 5, 7864, 835, 20, 9017, 1807, 9657, 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...
logging not happening? === I'm using struts1.3.8 and for logging, log4j using. It is writing logs in Windows but not on Unix.. After analyzed,I came to know there are commons-logging and log4j jars are in lib. I think clash happened.when i removed commons-logging and executed it throwed `ClassNotFoundException:org.apache.commons.logging.LogFactory` i'm using log4j.properties file for appenders and location of writing logs. I tried with commons-logging by removing log4j by this time how to configure the properties? Any idea is appreciatable. Laxman chowdary
0
[ 2, 13, 13919, 52, 4942, 60, 800, 3726, 3726, 31, 22, 79, 568, 18316, 18, 165, 9, 240, 9, 457, 17, 26, 13, 13919, 15, 6738, 300, 728, 568, 9, 32, 25, 1174, 18893, 19, 1936, 47, 52, 27, 22540, 9, 9, 75, 19214, 15, 49, 281, 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...
Tthree.js Auto rotate camera to focus on object === In three.js 3D space, I have some MESH objects which its positions are known and a camera object. What I would like to archive is: when I click on a button, the camera will auto-rotate and zoom (change its position) so that user's view will focus on selected object. The selected object's position is known. Please give me some suggestion on how to do that? Thanks in advance.
0
[ 2, 13, 38, 5642, 9, 728, 18, 3108, 21448, 3336, 20, 1776, 27, 3095, 800, 3726, 3726, 19, 132, 9, 728, 18, 203, 43, 726, 15, 31, 57, 109, 55, 1635, 3916, 56, 82, 3062, 50, 167, 17, 21, 3336, 3095, 9, 98, 31, 83, 101, 20, 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 to disable Camera Zoom on iPhone (xcode) === I'm currently building an app that uses the iPhone camera. This may be an odd question but any idea how to disable the ability to zoom? I've searched the internet high and low and so far I have come up with nothing. Any developers that may have some ideas, I'd love to hear from you!
0
[ 2, 184, 20, 1460, 579, 3336, 19469, 27, 21024, 13, 5, 396, 9375, 6, 800, 3726, 3726, 31, 22, 79, 871, 353, 40, 4865, 30, 2027, 14, 21024, 3336, 9, 48, 123, 44, 40, 4210, 1301, 47, 186, 882, 184, 20, 1460, 579, 14, 2165, 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...
Jquery: Enable/Disable based on value of dropdown is not working for dynamically generated inputs === I have a form where I can add new rows to increase the form elements using jquery. In that form I have two dropdown options `(Name:type and accounts)` and two text inputs `(Name:debit_amount and credit_amount)`. Problem: I have developed a jquery code to enable/disable text inputs based on the selected values from dropdown options. But the code works fine only if I don't add new rows. If I add a new row it only works for the very first row, I mean it disables/enables inputs of the first row only. For the sake of clarity I have not provided the code for adding new rows below, but to get a live picture of all my codes please check this link, [jsfiddle.net][1] Could you please tell me what change should I bring in my code to be able to make all the inputs (including inputs of generated rows ) disable/enable based on the selected values? My HTML <h2><a href="#" id="addScnt">Add Another Input Box</a></h2> <table class="dynatable"> <thead> <tr> <th>Type</th> <th>Account Name</th> <th>Debit</th> <th>Credit</th> </tr> </thead> <tbody id="p_scents"> <tr> <td> <select name="type" id="type"> <option value="Debit">Debit</option> <option value="Credit">Credit</option> </select> </td> <td> <select name="accounts" id="accounts"> <option value="">SELECT</option> <option value="One">One</option> <option value="Two">Two</option> </select> </td> <td> <input type="text" name="debit_amount" id="debit_amount" /> </td> <td> <input type="text" name="credit_amount" id="credit_amount"/> </td> </tr> </tbody> </table> <h3>Conditions for disabling/Enabling</h3> 1. If type selected == Debit and a value from accounts is selected then enable debit_amount input and disable credit_amount input 2. If type selected == Credit and a value from accounts is selected then enable credit_amount input and disable debit_amount input 3. If any of the values of type and accounts is not selected disable both <h3>My Jquery Code for disabling/enabling inputs based on dropdown value</h3> //ON the change of accounts(dropdown select) $("#accounts").change(function () { var type = $("select#type").val(); var accounts = $("select#accounts").val(); if (type=="Debit"){ $('#credit_amount').attr("disabled", true); $('#debit_amount').removeAttr("disabled",true); } if (type=="Credit") { $('#debit_amount').attr("disabled", true); $('#credit_amount').removeAttr("disabled",true); } if (accounts=="") { $('input[name=credit_amount]').val(''); $('input[name=debit_amount]').val(''); $('#debit_amount').attr("disabled", true); $('#credit_amount').attr("disabled", true); } })//function ends //ON the change of type(dropdown select) $("#type").change(function () { var accounts = $("select#accounts").val(); var type = $("select#type").val(); if (type=="Debit" && accounts !=''){ $('input[name=credit_amount]').val(''); $('#credit_amount').attr("disabled", true); $('#debit_amount').removeAttr("disabled",true); } if (type=="Credit" && accounts !='') { $('input[name=debit_amount]').val(''); $('#debit_amount').attr("disabled", true); $('#credit_amount').removeAttr("disabled",true); } }) //function ends [1]: http://jsfiddle.net/Jpb5Q/
0
[ 2, 487, 8190, 93, 45, 9240, 118, 2906, 579, 432, 27, 1923, 16, 2804, 2968, 25, 52, 638, 26, 7782, 1326, 6756, 6367, 18, 800, 3726, 3726, 31, 57, 21, 505, 113, 31, 92, 3547, 78, 11295, 20, 1839, 14, 505, 2065, 568, 487, 8190, 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...
Facelets: ui:param default value === How can one define a default valu for a facelet template parameter? Consider the following element using a template parameter: <h:outputText value="#{templParam}"></h:outputText> The above line will print the the template parameter `templParam` which is passed by a `ui:param` tag in a `ui:composition` using the template: <ui:param name="templParam" value="Hello world"></ui:param> But if `ui:param` tag is missing nothing will be printed. Although, how can one print e.g "Default value" in this case?
0
[ 2, 276, 11045, 45, 13, 5661, 45, 6351, 79, 12838, 1923, 800, 3726, 3726, 184, 92, 53, 9267, 21, 12838, 3347, 291, 26, 21, 276, 1336, 22894, 18906, 60, 3563, 14, 249, 4520, 568, 21, 22894, 18906, 45, 13, 1, 252, 45, 1320, 4881, 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...
'this' undeclared (first use in this function) - C newbie === I am newbie in C ,with Mingw32 compiler. Right now i am creating decompiler from IL to C (Native) The code generated (Without System.Object): //DecompileTestApplication_Program.c #include "DecompileTestApplication_Program.h" DecompileTestApplication_Program* DecompileTestApplication_Program__ctor( ) { if (array__DecompileTestApplication_Program == 0) { array__DecompileTestApplication_Program=(void**)malloc(sizeof(void*)*(capacity__DecompileTestApplication_Program=4)); } DecompileTestApplication_Program* this; //error: 'this' undeclared (first use in this function) if (count__DecompileTestApplication_Program==0) { this=(DecompileTestApplication_Program*)malloc(sizeof(DecompileTestApplication_Program)); goto RealConstructor; } this=(DecompileTestApplication_Program*)array__DecompileTestApplication_Program[--count__DecompileTestApplication_Program]; RealConstructor: this->ind = 0; this->a = 1; this->b = 3; //this._inherit_object_( ); //this is OOP tests ,still working on it return this; } void DecompileTestApplication_Program_Main( ) { int var_0_02; var_0_02 = 0; var_0_02 = ( var_0_02 + 1 ); int var_1_08; var_1_08 = 1; int var_2_0A; var_2_0A = 3; var_1_08 = ( var_1_08 + var_2_0A ); var_0_02 = ( var_0_02 + ( var_1_08 + var_2_0A ) ); DecompileTestApplication_Program_blat = ( DecompileTestApplication_Program_blat + ++DecompileTestApplication_Program_bpa ); } void DecompileTestApplication_Program__cctor( ) { DecompileTestApplication_Program_blat = 1; DecompileTestApplication_Program_bpa = 4; } //DecompileTestApplication_Program.h #ifndef DecompileTestApplication_Program #define DecompileTestApplication_Program /* Type's Name: DecompileTestApplication.Program Time to Parse: 40.0023ms */ #include <stdio.h> typedef struct { //Variables int ind; int a; int b; } DecompileTestApplication_Program; static int DecompileTestApplication_Program_blat; static int DecompileTestApplication_Program_bpa; //Methods void DecompileTestApplication_Program_Main( ); DecompileTestApplication_Program* DecompileTestApplication_Program__ctor( ); void DecompileTestApplication_Program__cctor( ); static int count__DecompileTestApplication_Program=0; static int capacity__DecompileTestApplication_Program=0; static DecompileTestApplication_Program** array__DecompileTestApplication_Program=0; #endif //@main.h void main(); //@main.cpp //bookmart for includes #include "DecompileTestApplication_Program.h" void main() { //bookmark for initialize DecompileTestApplication_Program__cctor(); DecompileTestApplication_Program_Main(); } The error found in the first file. I searched the resolve for this error for awhile , but didn't found any.
0
[ 2, 13, 22, 1565, 22, 13, 12239, 12078, 69, 13, 5, 3552, 275, 19, 48, 1990, 6, 13, 8, 272, 78, 5893, 800, 3726, 3726, 31, 589, 78, 5893, 19, 272, 13, 15, 1410, 12069, 499, 3125, 21486, 9, 193, 130, 31, 589, 2936, 121, 11103, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 should I name my base or root Java class in Swing application? === what should I name my base or root Java class in Swing application? Right now my Project is called FirstSwingProject followed by src folder and a package I have called base. But my main class is called PaneFactory.java because the idea is that I am creating a Swing app that will open new sticky notes. Can anyone suggest a better name for this class? Is there a Java naming convention out there for the first class?
0
[ 2, 98, 378, 31, 204, 51, 1000, 54, 5900, 8247, 718, 19, 5587, 3010, 60, 800, 3726, 3726, 98, 378, 31, 204, 51, 1000, 54, 5900, 8247, 718, 19, 5587, 3010, 60, 193, 130, 51, 669, 25, 227, 64, 18, 3546, 21011, 709, 34, 13, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
multiple inheritance and dynamic_cast === Some background first: I am working on some legacy code that implements UI interfaces. The code is structured in a way that it has a base class (actually it's a struct) WinBase which is then derived to all sort of graphical objects. WinBase: - Button - DialogWin - (etc...) - EditWin WinBase as a member **WinBase **children** that is used to keep tabs on all of the children of each object. These children are created and destroyed during runtime in the standard new[]/delete[] fashion. All methods/functions of these objects assume that they are receiving a pointer to **WinBase** and **<dynamic_cast>** is used to ensure/validate that the appropriate pointers are being used. A later change to the code added two more classes/structs (**ListBox** and **TextBox**), that are derived from **EditWin** which in turn is derived from **WinBase**. So... I have pointers to **WinBase** that being casted to **ListBox** and **TextBox**. As I said, dynamic_cast is used throughout the code but I am not sure how safe this is when a function like this constructor is called. TextBox(WinBase *pw,(...)); How safe is it to cast directly from **WinBase** to **ListBox** and vice versa (for instance)? Cheers
0
[ 2, 1886, 13852, 17, 7782, 1, 6146, 800, 3726, 3726, 109, 2395, 64, 45, 31, 589, 638, 27, 109, 7780, 1797, 30, 8713, 18, 13, 5661, 6573, 18, 9, 14, 1797, 25, 17784, 19, 21, 161, 30, 32, 63, 21, 1000, 718, 13, 5, 15661, 32, 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...
SELECT with condition on second table === I'm trying to select records from 3 tables using a JOIN which is working well but I now need to add some additional conditions to the SELECT which I can't figure out. My current select works like this: SELECT user.*, address.*, state.* FROM user LEFT JOIN address ON user.id = address.user_id LEFT JOIN state ON user.id = state.user_id Now, the address and state could have multiple records but both tables have a bit field to indicate that they are the primary record and that's the one I want to select. I have tried adding a `WHERE address.state = b'1'` to the statement but it only returns those records that have a primary record, what I would ideally like to do is select the top record from the address/state table sorted by the primary field so the primary will be selected if it exists but the next record will be selected if there is no primary. How can I achieve this with MySQL 5?
0
[ 2, 5407, 29, 2874, 27, 153, 859, 800, 3726, 3726, 31, 22, 79, 749, 20, 5407, 742, 37, 203, 7484, 568, 21, 1865, 56, 25, 638, 134, 47, 31, 130, 376, 20, 3547, 109, 1351, 2039, 20, 14, 5407, 56, 31, 92, 22, 38, 1465, 70, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create xml file from a list of objects in java? === I want to create one xml file from one list of objects. Objects are having some attributes, so the tags will be the attribute names and the respective data will be inside the tag. This is example: I have one List: myEquipmentList there are some 100 objects of the class Equipment. Now the attributes in the class of Equipment are id,name, size, measures,unit_of_measure etc. Now I want to create xml which will be something like this. <Equipment id=1>`` <name>Ruler</name> <size>1000</size> <measures>length</measures> <unit_of_measure>meter</unit_of_measure> </Equipment> Please help. Thanks in advance!!
0
[ 2, 184, 20, 1600, 23504, 3893, 37, 21, 968, 16, 3916, 19, 8247, 60, 800, 3726, 3726, 31, 259, 20, 1600, 53, 23504, 3893, 37, 53, 968, 16, 3916, 9, 3916, 50, 452, 109, 13422, 15, 86, 14, 3383, 18, 129, 44, 14, 35, 14755, 1817, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Pattern to handle exceptions on a child thread of differing severity === I've got a console app that loads a class designed to do long-running work (call it `JobManager`). JobManager is good at handling exceptions in the threads that it spawns and records/handles/cleans up as appropriate but exceptions in the Manager itself fall into 3 broad categories: Recoverable, recoverable with a restart and not recoverable. Some examples: * Recoverable (1): Connection Timeout, Job Failed, etc.. * Recoverable w/ restart (2): State in Db doesn't match internal state (a restart of the Manager forces it to refresh state from the Db and clean up as appropriate). * Not Recoverable (3): The worker pool is missing an expected worker (This recently happened due to an off-by-1 error). Hopefully these should be very rare. At present I do: * 1: Log, handle, move on * 2: Log, exit main Manager thread (the CLI will restart it) * 3: Log, ???? I'm not sure how to indicate to the parent process whether or not it should restart the Manager or accept that there's something far wrong and stop before potentially causing more problems. If I throw an exception in case 3, the exception bubbles to the CLR which feels incorrect. If I swallow the exception and exit the thread, the CLI assumes it's a case 2 and restarts. A very stripped down example of what I'm doing is below: **CLI** Private Property ShutdownRequested = False Private JobManager As IMyJobManager Sub Main() While Not ShutdownRequested Try JobManager = New MyJobManager() ''Actually resolved from an IoC container JobManager.StartWork ''Asynchronous JobManager.Join Catch Ex as Exception ''Log ''NB This will only be exceptions from the construction/starting of the Manager End Try End While End Sub Sub Shutdown() Shutdownrequested = True JobManager.Shutdown() ''Blocking call End Sub **JobManager** Private MainThread As Threading.Thread Public Sub StartWork() MainThread = New Threading.Thread(Sub() MainWorker()) MainThread.IsBackground = False MainThread.Start() End Sub Public Sub Join() MainThread.Join() End Sub Private Sub MainWorker() Try ''Check if we shutdown cleanly, if not, tidy up/recover ''Do Work until ShutdownRequested = True Catch Ex as RecoverableException ''Log error, exit. We''ll be restarted by Main Catch Ex as Exception '' ** Question relates to this Exception ** End Try End Sub Public Sub Shutdown() ShutdownRequested = True ... MainThread.Join End Sub I can, of course, add a wrapper around my JobManager but this just shifts the problem down a level. I could expose a `ShouldRestart` property on the Manager but this seems clunky. What's the best-practice way to achieve what I'm after?
0
[ 2, 3732, 20, 3053, 13392, 27, 21, 850, 9322, 16, 19304, 21671, 800, 3726, 3726, 31, 22, 195, 330, 21, 8650, 4865, 30, 19069, 21, 718, 1006, 20, 107, 175, 8, 11325, 170, 13, 5, 9200, 32, 13, 1, 1636, 220, 22256, 1, 6, 9, 1205, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
File uploading failed === I had a simplest, dumbest script for uploading files and returning success true or false after the operation. Not sure why, suddenly the script stopped working giving me a `failed to open stream: No such file or directory` error in `move_uploaded_file` line. It's strange since I haven't changed any paths, permissions, nothing basically. Any tips how to tackle this ? I'm a total newcomer to php. My script below : if(isset($_FILES)){ $file_tmp = $_FILES['mpp-file']['tmp_name']; $file_name = $_FILES['mpp-file']['name']; if(is_uploaded_file($file_tmp)) { if(move_uploaded_file($file_tmp, "tmp/$file_name")){ echo '{"success": true}'; unlink("tmp/$file_name"); } else { echo '{"success": false}'; } } else{ echo '{success: false}'; } } And the page from stacktrace : <html> <head></head> <body> <font size="1"><table class="xdebug-error" dir="ltr" border="1" cellspacing="0" cellpadding="1"> <tbody><tr><th align="left" bgcolor="#f57900" colspan="5"><span style="background-color: #cc0000; color: #fce94f; font-size: x-large;">( ! )</span> Warning: move_uploaded_file(tmp/MSP1.mpp) [<a href="function.move-uploaded-file">function.move-uploaded-file</a>]: failed to open stream: No such file or directory in K:\LAMP\www\project\msp-load.php on line <i>7</i></th></tr> <tr><th align="left" bgcolor="#e9b96e" colspan="5">Call Stack</th></tr> <tr><th align="center" bgcolor="#eeeeec">#</th><th align="left" bgcolor="#eeeeec">Time</th><th align="left" bgcolor="#eeeeec">Memory</th><th align="left" bgcolor="#eeeeec">Function</th><th align="left" bgcolor="#eeeeec">Location</th></tr> <tr><td bgcolor="#eeeeec" align="center">1</td><td bgcolor="#eeeeec" align="center">0.0034</td><td bgcolor="#eeeeec" align="right">677944</td><td bgcolor="#eeeeec">{main}( )</td><td title="K:\LAMP\www\gantt_latest\examples\MSProject_import\msp-load.php" bgcolor="#eeeeec">..\msp-load.php<b>:</b>0</td></tr> <tr><td bgcolor="#eeeeec" align="center">2</td><td bgcolor="#eeeeec" align="center">0.0034</td><td bgcolor="#eeeeec" align="right">678256</td><td bgcolor="#eeeeec"><a href="http://www.php.net/move_uploaded_file" target="_new">move_uploaded_file</a> ( )</td><td title="K:\LAMP\www\project\msp-load.php" bgcolor="#eeeeec">..\msp-load.php<b>:</b>7</td></tr> </tbody></table></font> <br> <font size="1"><table class="xdebug-error" dir="ltr" border="1" cellspacing="0" cellpadding="1"> <tbody><tr><th align="left" bgcolor="#f57900" colspan="5"><span style="background-color: #cc0000; color: #fce94f; font-size: x-large;">( ! )</span> Warning: move_uploaded_file() [<a href="function.move-uploaded-file">function.move-uploaded-file</a>]: Unable to move 'K:\LAMP\tmp\phpC7A5.tmp' to 'tmp/MSP1.mpp' in K:\LAMP\www\project\msp-load.php on line <i>7</i></th></tr> <tr><th align="left" bgcolor="#e9b96e" colspan="5">Call Stack</th></tr> <tr><th align="center" bgcolor="#eeeeec">#</th><th align="left" bgcolor="#eeeeec">Time</th><th align="left" bgcolor="#eeeeec">Memory</th><th align="left" bgcolor="#eeeeec">Function</th><th align="left" bgcolor="#eeeeec">Location</th></tr> <tr><td bgcolor="#eeeeec" align="center">1</td><td bgcolor="#eeeeec" align="center">0.0034</td><td bgcolor="#eeeeec" align="right">677944</td><td bgcolor="#eeeeec">{main}( )</td><td title="K:\LAMP\www\gantt_latest\examples\MSProject_import\msp-load.php" bgcolor="#eeeeec">..\msp-load.php<b>:</b>0</td></tr> <tr><td bgcolor="#eeeeec" align="center">2</td><td bgcolor="#eeeeec" align="center">0.0034</td><td bgcolor="#eeeeec" align="right">678256</td><td bgcolor="#eeeeec"><a href="http://www.php.net/move_uploaded_file" target="_new">move_uploaded_file</a> ( )</td><td title="K:\LAMP\www\project\msp-load.php" bgcolor="#eeeeec">..\msp-load.php<b>:</b>7</td></tr> </tbody></table></font> </body> </html> I'm using WAMP server on Win7.
0
[ 2, 3893, 71, 16866, 1702, 800, 3726, 3726, 31, 41, 21, 24384, 15, 9317, 1430, 3884, 26, 71, 16866, 6488, 17, 2485, 1280, 1151, 54, 4997, 75, 14, 1453, 9, 52, 562, 483, 15, 1605, 14, 3884, 1175, 638, 1438, 55, 21, 13, 1, 24910, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
System.TypeInitializationException was unhandled using multiple databases in Fluent Nhibernate === I was trying to implement [Multiple DB connected Fluent NHibernate sample Application][1]. My Fluent NHibernate [Repository][2] is as follows: namespace RepositoryExample.Repository.NHibernate { public class NHibernateRepository<T> : IRepository<T> where T : class { protected static Configuration config; private static readonly ISessionFactory _globalSessionFactory = new Configuration().Configure().BuildSessionFactory(); protected static IDictionary<string, ISessionFactory> _allFactories; public NHibernateRepository() { IDictionary<string, string> dataBases = new Dictionary<string, string>(); dataBases.Add("Monkey", @"Data Source=.\SQLEXPRESS;AttachDbFilename='MonkeyDB.mdf';Integrated Security=True;User Instance=True"); dataBases.Add("Banana", @"Data Source=.\SQLEXPRESS;AttachDbFilename='Banana.mdf';Integrated Security=True;User Instance=True"); --> Error at below line (See stack trace for deatils below) _allFactories = new Dictionary<string, ISessionFactory>(dataBases.Count); foreach (var dataBase in dataBases) { config = Fluently.Configure() .Database( MsSqlConfiguration.MsSql2008.ConnectionString(dataBases.Values.ToString())) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<NHibernateRepository<T>>()) .BuildConfiguration(); _allFactories.Add(dataBase.Key, config.BuildSessionFactory()); } } public ISession GetSession() { var currentIdentifier = GetCurrentIdentifier(); return _allFactories[currentIdentifier].OpenSession(); } private string GetCurrentIdentifier() { if (typeof(T).ToString().Contains("Banana")) { return "Banana"; } else { return "Monkey"; } } public void Save(T value) { var sessioned = GetSession(); using (var transaction = sessioned.BeginTransaction()) { sessioned.Save(value); transaction.Commit(); } } public void GenerateSchema(SanityCheck AreYouSure) { new SchemaExport(config).Create(true,true); } } } > And I'm calling as follows: public class NHibernateIntegrationTest { static void Main(string[] args) { var repo = new NHibernateRepository<NHibernateIntegrationTest>(); repo.GenerateSchema(SanityCheck.ThisWillDropMyDatabase); } } Error at: _allFactories = new Dictionary<string, ISessionFactory>(dataBases.Count); It is in NHibernateRepository<T> class's default constructor. StackTrace: System.TypeInitializationException was unhandled Message=The type initializer for 'RepositoryExample.Repository.NHibernate.NHibernateRepository`1' threw an exception. Source=RepositoryExample TypeName=RepositoryExample.Repository.NHibernate.NHibernateRepository`1 StackTrace: at RepositoryExample.Repository.NHibernate.NHibernateRepository`1..ctor() in C:\Documents and Settings\pavankumarn\My Documents\Downloads\nhibernate-repository-example\RepositoryExample\Repository\NHibernate\NHibernateRepository.cs:line 44 at Test.NHibernateIntegrationTest.Main(String[] args) in C:\Documents and Settings\pavankumarn\My Documents\Downloads\nhibernate-repository-example\Test\NHibernateIntegrationTest.cs:line 17 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: NHibernate.Cfg.HibernateConfigException Message=An exception occurred during configuration of persistence layer. Source=NHibernate StackTrace: at NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) at NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader) at NHibernate.Cfg.Configuration.Configure(XmlReader textReader) at NHibernate.Cfg.Configuration.Configure(String fileName, Boolean ignoreSessionFactoryConfig) at NHibernate.Cfg.Configuration.Configure(String fileName) at NHibernate.Cfg.Configuration.Configure() at RepositoryExample.Repository.NHibernate.NHibernateRepository`1..cctor() in C:\Documents and Settings\pavankumarn\My Documents\Downloads\nhibernate-repository-example\RepositoryExample\Repository\NHibernate\NHibernateRepository.cs:line 17 InnerException: System.IO.FileNotFoundException Message=Could not find file 'C:\Documents and Settings\pavankumarn\My Documents\Downloads\nhibernate-repository-example\Test\bin\Debug\hibernate.cfg.xml'. Source=mscorlib FileName=C:\Documents and Settings\pavankumarn\My Documents\Downloads\nhibernate-repository-example\Test\bin\Debug\hibernate.cfg.xml StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) at System.Threading.CompressedStack.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) at System.Xml.XmlTextReaderImpl.OpenUrl() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Xml.XmlCharCheckingReader.Read() at System.Xml.XsdValidatingReader.Read() at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space) at System.Xml.XPath.XPathDocument..ctor(XmlReader reader, XmlSpace space) at System.Xml.XPath.XPathDocument..ctor(XmlReader reader) at NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) InnerException: [1]: http://codebetter.com/karlseguin/2009/03/30/using-nhibernate-with-multiple-databases/ [2]: http://code.google.com/p/nhibernate-repository-example/
0
[ 2, 329, 9, 4474, 27313, 1829, 10066, 872, 23, 367, 3203, 1294, 568, 1886, 6018, 18, 19, 19252, 12109, 15191, 8820, 800, 3726, 3726, 31, 23, 749, 20, 8713, 636, 21531, 5106, 13, 9007, 2587, 19252, 12109, 15191, 8820, 5717, 3010, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Change screen resolution in Java === I have a program that uses visual scripting ([sikuli-script](http://sikuli.org/)) to allow the users to create their own visual scripts. The program needs to work across multiple systems that could have different screen resolutions. Sikuli matches highlighted images on a pixel-by-pixel basis, so on systems with different resolutions will fail to find images. Therefore is there a way that I can change the resolution settings in windows through java code? Going full-screen is not an option as images that need to be captured come from different software packages, i.e. my software package sits above where the images need to come from (and is minimized when a capture is taking place)
0
[ 2, 753, 2324, 4302, 19, 8247, 800, 3726, 3726, 31, 57, 21, 625, 30, 2027, 3458, 3884, 68, 13, 5, 2558, 16496, 6243, 8, 8741, 500, 5, 21127, 6903, 16496, 6243, 9, 5583, 118, 6, 6, 20, 1655, 14, 3878, 20, 1600, 66, 258, 3458, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
makefile error: undefined reference to main === I am trying to compile my piece of code with using makefile. Normally I compile my code like that: mipsisa32r2el-timesys-linux-gnu-g++ -o testing -I/usr/include/libxml2 -L/develop/xc4/rootfs/parsecpp/lib -L/develop/xc4/rootfs/parsecpp/sqlite-mips2/lib -I/develop/xc4/rootfs/parsecpp/sqlite-mips2/include db.cpp main.cpp networkinterfacemodule.cpp network.cpp multiplex.cpp program.cpp service.cpp -lsqlite3 -lxml2 To get rid of this long command I tried to write a makefile: CC= mipsisa32r2el-timesys-linux-gnu-g++ export LD_LIBRARY_PATH=:/parsecpp/sqlite-mips2/lib:/parsecpp/lib:/tmp/vixs_temp/DirectFB/single_core/lib CFLAGS=-I/usr/include/libxml2 -I/develop/xc4/rootfs/parsecpp/sqlite-mips2/include LDFLAGS=-L/develop/xc4/rootfs/parsecpp/lib -L/develop/xc4/rootfs/parsecpp/sqlite-mips2/lib LIBS = -lsqlite3 -lxml2 PROG=testing all: main.o db.o mod.o multiplex.o network.o networkinterfacemodule.o program.o service.o $(CC) -o $(PROG) $(CFLAGS) $(LDFLAGS) main.o db.o mod.o multiplex.o network.o networkinterfacemodule.o program.o service.o $(LIBS) main.o: main.cpp $(CC) $(CFLAGS) $(LDFLAGS) main.cpp db.cpp networkinterfacemodule.cpp mod.cpp multiplex.cpp network.cpp program.cpp service.cpp $(LIBS) db.o: db.cpp $(CC) $(CFLAGS) $(LDFLAGS) db.cpp $(LIBS) mod.o: mod.cpp $(CC) $(CFLAGS) $(LDFLAGS) mod.cpp $(LIBS) multiplex.o: multiplex.cpp $(CC) $(CFLAGS) $(LDFLAGS) multiplex.cpp $(LIBS) network.o: network.cpp $(CC) $(CFLAGS) $(LDFLAGS) network.cpp $(LIBS) networkmoduleinterface.o: networkinterfacemodule.cpp $(CC) $(CFLAGS) $(LDFLAGS) networkinterfacemodule.cpp $(LIBS) program.o: program.cpp $(CC) $(CFLAGS) $(LDFLAGS) program.cpp $(LIBS) service.o: service.cpp $(CC) $(CFLAGS) $(LDFLAGS) service.cpp $(LIBS) clean: rm -rf *o testing Then I get this error: /opt/timesys/linux-gnu/toolchain/bin/../../toolchain/lib/crt1.o: In function `__start': (.text+0xc): undefined reference to `main' /opt/timesys/linux-gnu/toolchain/bin/../../toolchain/lib/crt1.o: In function `__start': (.text+0x10): undefined reference to `main' collect2: ld returned 1 exit status make: *** [db.o] Error 1 I ve never used makefile before. That's why I am little bit confused. Can anybody help me? Regards
0
[ 2, 233, 16877, 7019, 45, 367, 13439, 2801, 20, 407, 800, 3726, 3726, 31, 589, 749, 20, 26561, 51, 1855, 16, 1797, 29, 568, 233, 16877, 9, 4147, 31, 26561, 51, 1797, 101, 30, 45, 534, 1919, 8164, 3125, 139, 135, 532, 8, 891, 4980...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
force NSDictionary to release memory === Somewhere in an ARC project, I have: //Class1.h @interface Class1 { NSDictionary * dict; } @end //Class1.m @implementation Class1 -(void)loadDict { NSDictionary * dict = [[NSDictionary alloc] init]; // Now load couple of (NSString *, NSString *) pairs into the dictionary ... } -(void)releaseAllMemoryUsedByDict { //TODO } @end How do I release all the memory occupied by dict, on demand? I guess if I had an NSMutableDictionary, I could call its removeAllObjects method. How would I do it for NSDictionary? Would setting dict = NULL work?
0
[ 2, 558, 13, 2172, 22595, 1857, 20, 830, 1912, 800, 3726, 3726, 3493, 19, 40, 4686, 669, 15, 31, 57, 45, 12894, 1898, 165, 9, 252, 13, 1, 6280, 6413, 718, 165, 13, 1, 13, 2172, 22595, 1857, 1637, 13, 16315, 73, 13, 1, 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...
How to use popover view as Collapsible view on click of tableview cell === I want that on a click of a tableview cell a popover view appears and rest all the cells should shift beneath popover.Just as the case for collapsible view. Thanks in advance
0
[ 2, 184, 20, 275, 1675, 2549, 1418, 28, 9470, 2552, 18, 3426, 1418, 27, 10840, 16, 859, 4725, 1667, 800, 3726, 3726, 31, 259, 30, 27, 21, 10840, 16, 21, 859, 4725, 1667, 21, 1675, 2549, 1418, 1780, 17, 760, 65, 14, 2934, 378, 447...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why doesn't C#'s overload resolution work between Func<T,T> and Action<T>? === So, a fairly common extension method for IEnumerable<T>, Run: public static IEnumerable<T> Run<T>(this IEnumerable<T> source, Action<T> action) { foreach (var item in source) { action(item); yield return item; } } When I try to use that with, for instance, DbSet<T>.Add: invoice.Items.Run(db.InvoiceItems.Add); ... the compiler complains that it has the wrong return type, because it is expecting a void method. So, add an overload for Run that takes a Func<T,T> instead of Action<T>: public static IEnumerable<T> Run<T>(this IEnumerable<T> source, Func<T, T> action) { return source.Select(action).ToList().AsEnumerable(); } And now the compiler complains that "The call is ambiguous between the following methods..." So my question is, how can the Action overload of the Run method cause ambiguity when it is not valid for the method group?
0
[ 2, 483, 1437, 22, 38, 272, 5910, 22, 18, 84, 8294, 4302, 170, 128, 2414, 150, 1, 38, 15, 38, 1, 17, 1028, 1, 38, 1, 60, 800, 3726, 3726, 86, 15, 21, 6647, 757, 3896, 2109, 26, 13, 660, 6336, 106, 579, 1, 38, 1, 15, 485, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
"No Value given for one or more parameters" with c# === when I want to retrieve date from access , I get an exception error "No Value given for one or more parameters" at **cmd1.ExecuteReader**. This is my code OleDbCommand cmd1 = new OleDbCommand("select [open date],[close date] from event", oc); OleDbDataReader ol1 = cmd1.ExecuteReader(); while (ol1.Read()) { if (ol1.GetValue(0).ToString() == dateTimePicker1.Value.ToString("MM/dd/yyyy") || ol.GetValue(1).ToString() == dateTimePicker2.Value.ToString("MM/dd/yyyy")) goto abc; } May anyone help? Thanks
0
[ 2, 13, 7, 251, 1923, 504, 26, 53, 54, 91, 12905, 7, 29, 272, 5910, 800, 3726, 3726, 76, 31, 259, 20, 11917, 1231, 37, 1381, 13, 15, 31, 164, 40, 5391, 7019, 13, 7, 251, 1923, 504, 26, 53, 54, 91, 12905, 7, 35, 13, 1409, 90...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Splash Screen using webservice === I have to display Splash Screen which resides at the server . So using web service, I have to get it displayed in my SplashScreenViewController. So Its obvious that when my app Launches, it'll display a blank screen (img is being downloaded) and after a few seconds, it'll show my splash screen. I know that splash screen image should have to be in mainbundle , and locally it should be get as an Splash image.But Client wants us to get it loaded from server So can I use Activity indicator in that duration until my splash screen gets loaded or is there any another way to implement this ??
0
[ 2, 13873, 2324, 568, 2741, 11449, 800, 3726, 3726, 31, 57, 20, 3042, 13873, 2324, 56, 12631, 35, 14, 8128, 13, 9, 86, 568, 2741, 365, 15, 31, 57, 20, 164, 32, 6115, 19, 51, 13873, 7187, 4725, 12898, 1252, 9, 86, 82, 4674, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Compound async calls - how? === Assume, I have the `IAsynchronous` interface that supports two methods for doing some operation ("begin/end" pattern): - `IAsyncResult BeginOperation(AsyncCallback callback, object state)` - `EndOperation(IAsyncResult ar)` Assume also, that I have the classes `A : IAsynchronous` and `B : IAsynchronous`. I have to implement the `Compound : IAsynchronous` class. The `Compound`'s operation is to invoke `A`'s operation, wait for its completion, then to invoke `B`'s operation and then to invoke the callback as usual. The issue is how to design the `Compound` class: - I should preserve the original `state` object and invoke the original callback when the `Compound`'s operation completes. Thus, I can not simply pass them to `A.BeginOperation` or `B.BeginOperation`. - Also, `Compound.EndOperation` should re-throw any exception that's thrown by `A.EndOperation` or `B.EndOperation`. If `A.EndOperation` has thrown an exception, then the `Compound`'s operation should not invoke `B.EndOperation` because the compound operation is already failed. - What if there will be not only 2 inner operations, but 3 or more? Is there a common way? To clarify, consider the following example. Assume, that we have the `Multiplier` class that supports the following methods: - `IAsyncResult BeginMultiply(LargeNumber x, LargeNumber y, AsyncCallback callback, object state)` - `LargeNumber EndMultiply(IAsyncResult ar)` And you want to write the `ThreeMultiplier` class that supports the following methods: - `IAsyncResult BeginMultiply(LargeNumber x, LargeNumber y, LargeNumber z, AsyncCallback callback, object state)` - `LargeNumber EndMultiply(IAsyncResult ar)` The `ThreeMultiplier` class should use the `Multiplier` class to compute `x * y * z`. In order to do this it first computes `x * y` (through `Multiplier.Begin/EndMultiply`) and then multiplies the result by `z`. Of course, `Multiplier.EndMultiply` can throw `SomeException` which fails computing of `x * y * z` at any step. What is the best (or good) way to implement this? Is there any pattern?
0
[ 2, 6089, 21, 9507, 150, 3029, 13, 8, 184, 60, 800, 3726, 3726, 7158, 15, 31, 57, 14, 13, 1, 549, 16023, 1291, 1, 6573, 30, 6747, 81, 3195, 26, 845, 109, 1453, 13, 5, 7, 17143, 108, 118, 2451, 7, 3732, 6, 45, 13, 8, 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...
is it possible to drag and drop nodes between two jqgrid treegrid using jqgrid and tableDND plugins? === I am trying the following code mentioned in jqgrid site for drag and drop between two jqgrids treegrids using local data. It is not working for me. I see the cursor is draggable but it is not dropping . If you have working code, will appreciate code example. http://www.assembla.com/code/kaf26/subversion/nodes/www/js/jqgrid/jquery.tablednd.js?rev=188 $(document).ready(function() { // Initialise the first table (as before) $("#table-1").tableDnD(); // Make a nice striped effect on the table $("#table-2 tr:even').addClass('alt')"); // Initialise the second table specifying a dragClass and an onDrop function that will display an alert $("#table-2").tableDnD({ onDragClass: "myDragClass", onDrop: function(table, row) { var rows = table.tBodies[0].rows; var debugStr = "Row dropped was "+row.id+". New order: "; for (var i=0; i<rows.length; i++) { debugStr += rows[i].id+" "; } $(#debugArea).html(debugStr); }, onDragStart: function(table, row) { $(#debugArea).html("Started dragging row "+row.id); } }); });
0
[ 2, 25, 32, 938, 20, 5501, 17, 2804, 16272, 128, 81, 487, 1251, 16375, 1541, 16375, 568, 487, 1251, 16375, 17, 859, 43, 706, 10922, 108, 18, 60, 800, 3726, 3726, 31, 589, 749, 14, 249, 1797, 2211, 19, 487, 1251, 16375, 689, 26, 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...
Saving editable data in Rails 3 on Heroku === My rails app allows users to edit a certain json file through the browser. This data file is saved in `app/assets/data/thefile.json` (the site is only used internally) I tested the front-end locally and it worked fine, the data gets updated and saved. Then I pushed the code to Heroku and tested it there as well. It worked. However after about 1 day when I go back to the site, I realized that the data has reverted to its original state before it was edited. This happened numerous times and I'm not so sure why it happened. Maybe because Heroku does not allow files in the `app` folder to be edited? Any advice would be greatly appreciated!
0
[ 2, 7599, 9392, 579, 1054, 19, 2240, 18, 203, 27, 36, 9266, 800, 3726, 3726, 51, 2240, 18, 4865, 2965, 3878, 20, 9392, 21, 1200, 487, 528, 3893, 120, 14, 16495, 9, 48, 1054, 3893, 25, 4377, 19, 13, 1, 7753, 118, 9790, 38, 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...
Java Singleton and Synchronization === Please clarify my queries regarding Singleton and Multithreading - What is the best way to implement Singleton in java in multithreaded environment? - What happens when multiple thread tries to access getInstance() method at the same time. - Can we make singleton's getInstance() in Synchronized? - Is Synchronization really needed when using Singleton classes?
0
[ 2, 8247, 345, 444, 17, 13, 16023, 1829, 800, 3726, 3726, 2247, 23116, 51, 9386, 2829, 3467, 345, 444, 17, 1889, 96, 22883, 13, 8, 98, 25, 14, 246, 161, 20, 8713, 345, 444, 19, 8247, 19, 1889, 96, 10647, 69, 2307, 60, 13, 8, 98...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Core Data fetch is extremely slow === I'm running a very basic NSFetchRequest to fetch an entity MessageObject. I only have 2000 message objects, and I want to retreive them all. However, for some strange reason, the fetch request is taking over 10 seconds! NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"MessageObject" inManagedObjectContext:appDelegate.managedObjectContext]; [fetchRequest setEntity:entity]; NSSortDescriptor *sort= [[NSSortDescriptor alloc] initWithKey:@"createDate" ascending:NO selector:@selector(compare:)]; [fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]]; [fetchRequest setFetchBatchSize:5]; And that's it, that's my fetch request. I'm not even using a predicate, and it takes over 10 seconds. I'm absolutely clueless as to what could be causing this. If anyone has any ideas or starting points, please share. I've also tried enabling SQLite debugging logging (`-com.apple.CoreData.SQLDebug 1`), but I just get thousands of lines of output from this simple fetch. Is that normal? 2012-06-22 19:39:59.171 myapp[81825:15e03] about to execute fetch 2012-06-22 19:39:59.172 myapp[81825:15e03] CoreData: sql: SELECT 0, t0.Z_PK FROM ZMBNOTEOBJECT t0 ORDER BY t0.ZCREATEDATE DESC 2012-06-22 19:39:59.178 myapp[81825:15e03] CoreData: annotation: sql connection fetch time: 0.0061s 2012-06-22 19:39:59.179 myapp[81825:15e03] CoreData: annotation: total fetch execution time: 0.0067s for 2052 rows. 2012-06-22 19:39:59.179 myapp[81825:15e03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZAUTHOREMAIL, t0.ZAUTHORNAME, t0.ZCREATEDATE, t0.ZISGLOBAL, t0.ZISLOCKED, t0.ZISNEW, t0.ZISPENDINGDELETE, t0.ZISPENDINGLIKE, t0.ZISPENDINGREAD, t0.ZISPENDINGSYNC, t0.ZLASTUPDATED, t0.ZLOCALLYMODIFIEDDATE, t0.ZMAINIDEA, t0.ZMETALASTUPDATED, t0.ZNOTEID, t0.ZNUMBEROFCHILDREN, t0.ZPARENTAUTHOREMAIL, t0.ZPARENTNOTEID, t0.ZROOTAUTHOREMAIL, t0.ZROOTNOTEID, t0.Z4PENDINGADDNOTES, t0.Z4PENDINGREMOVENOTES FROM ZMBNOTEOBJECT t0 WHERE t0.Z_PK IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY t0.ZCREATEDATE DESC LIMIT 15 2012-06-22 19:39:59.180 myapp[81825:15e03] CoreData: annotation: sql connection fetch time: 0.0008s 2012-06-22 19:39:59.181 myapp[81825:15e03] CoreData: annotation: total fetch execution time: 0.0018s for 15 rows. 2012-06-22 19:39:59.182 myapp[81825:15e03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZAUTHOREMAIL, t0.ZAUTHORNAME, t0.ZCREATEDATE, t0.ZISGLOBAL, t0.ZISLOCKED, t0.ZISNEW, t0.ZISPENDINGDELETE, t0.ZISPENDINGLIKE, t0.ZISPENDINGREAD, t0.ZISPENDINGSYNC, t0.ZLASTUPDATED, t0.ZLOCALLYMODIFIEDDATE, t0.ZMAINIDEA, t0.ZMETALASTUPDATED, t0.ZNOTEID, t0.ZNUMBEROFCHILDREN, t0.ZPARENTAUTHOREMAIL, t0.ZPARENTNOTEID, t0.ZROOTAUTHOREMAIL, t0.ZROOTNOTEID, t0.Z4PENDINGADDNOTES, t0.Z4PENDINGREMOVENOTES FROM ZMBNOTEOBJECT t0 WHERE t0.Z_PK IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY t0.ZCREATEDATE DESC LIMIT 15 2012-06-22 19:39:59.186 myapp[81825:15e03] CoreData: annotation: sql connection fetch time: 0.0042s 2012-06-22 19:39:59.187 myapp[81825:15e03] CoreData: annotation: total fetch execution time: 0.0049s for 15 rows. 2012-06-22 19:39:59.187 myapp[81825:15e03] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZAUTHOREMAIL, t0.ZAUTHORNAME, t0.ZCREATEDATE, t0.ZISGLOBAL, t0.ZISLOCKED, t0.ZISNEW, t0.ZISPENDINGDELETE, t0.ZISPENDINGLIKE, t0.ZISPENDINGREAD, t0.ZISPENDINGSYNC, t0.ZLASTUPDATED, t0.ZLOCALLYMODIFIEDDATE, t0.ZMAINIDEA, t0.ZMETALASTUPDATED, t0.ZNOTEID, t0.ZNUMBEROFCHILDREN, t0.ZPARENTAUTHOREMAIL, t0.ZPARENTNOTEID, t0.ZROOTAUTHOREMAIL, t0.ZROOTNOTEID, t0.Z4PENDINGADDNOTES, t0.Z4PENDINGREMOVENOTES FROM ZMBNOTEOBJECT t0 WHERE t0.Z_PK IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY t0.ZCREATEDATE DESC LIMIT 15 2012-06-22 19:39:59.188 myapp[81825:15e03] CoreData: annotation: sql connection fetch time: 0.0008s 2012-06-22 19:39:59.189 myapp[81825:15e03] CoreData: annotation: total fetch execution time: 0.0014s for 15 rows. ... (thousands of more lines similar to above) I'm not very familiar with reading this, but it appears that it fetches 2052 rows in .0067 seconds. So why does it keep doing more stuff after that? Shouldn't the request finish if it finished fetching the rows? Is it faulting the data or something?
0
[ 2, 2884, 1054, 18312, 25, 3898, 2276, 800, 3726, 3726, 31, 22, 79, 946, 21, 253, 2125, 13, 2172, 410, 19913, 99, 10351, 20, 18312, 40, 9252, 2802, 23793, 9, 31, 104, 57, 824, 2802, 3916, 15, 17, 31, 259, 20, 13, 6239, 99, 1284, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Avoiding duplicates in mysql query that uses UNION and ORDER BY === I have two tables, lets say table1 and table2 with common columns, id and update_date. I am looking to get the id's and update_date based on latest update_date in descending order. I have used 'union' and 'order by' together which gave the results in descending order of update_date but there are duplicate id's which I am not sure how to get rid of. My query is like, (select id,update_date from table1 where [condition]) UNION (select id,update_date from table2 where [condition]) order by update_date desc; I can just get rid of the duplicate id's by adding select distinct id from (above query) as temp; but the problem is that I need the update_date too. Can anyone suggest how to get rid of duplicates and still get both id and update_date information.
0
[ 2, 10298, 19429, 18, 19, 51, 18, 22402, 25597, 30, 2027, 667, 17, 389, 34, 800, 3726, 3726, 31, 57, 81, 7484, 15, 6884, 395, 859, 165, 17, 859, 135, 29, 757, 7498, 15, 4924, 17, 11100, 1, 8209, 9, 31, 589, 699, 20, 164, 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...
MySQL Table name start with an underscore. Special meaning? === I have a table name that starts with an underscore does that give any special status to the table? I am asking because the table does not seem to be taken by the replication in some instances. In the MySQL Query Browser it is also impossible to use the "Edit" feature on that table but it is on all the other tables. We are using MySQL 5.0.37 Cheers,
0
[ 2, 51, 18, 22402, 859, 204, 799, 29, 40, 131, 15077, 9, 621, 1813, 60, 800, 3726, 3726, 31, 57, 21, 859, 204, 30, 3244, 29, 40, 131, 15077, 630, 30, 590, 186, 621, 1782, 20, 14, 859, 60, 31, 589, 3379, 185, 14, 859, 630, 52,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Hive query is empty === I have a csv log file. After loading it into Hive using this sentence: CREATE EXTERNAL TABLE iprange(id STRING, ip STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\,' STORED AS TEXTFILE LOCATION '/user/hadoop/expandediprange/'; I want to perfom a simple query like: select * from iprange where ip="0.0.0.2"; But I get an empty result. My conclusion is that it's got something to do with the table size. Log file is 160 MB, and the generated table in Hive has 8 million rows. If I try to create myself a smaller file and load it to Hive it will work.
0
[ 2, 1935, 25535, 25597, 25, 2424, 800, 3726, 3726, 31, 57, 21, 272, 18, 710, 6738, 3893, 9, 75, 12797, 32, 77, 25535, 568, 48, 5123, 45, 1600, 4886, 859, 15735, 8366, 5, 1340, 3724, 15, 15735, 3724, 6, 3131, 2595, 121, 23012, 2861,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 image roundabout only to link front image === I have been working on an image roundabout plugin provided in the following link http://fredhq.com/projects/roundabout/ and all is working fine apart from the fact that whichever link I click on; be it the front or the back, the roundabout does slide round to the front, but then takes you to the link for the image that you have just clicked... therefore rendering the roundabout pretty much useless. I have only just start learning jQuery not too long ago and am quite inexperienced and feel I may be missing something simple here. I only want the image at the front of the roundabout to link to its necessary page. When i click on any other images behind the front one, I only want the roundabout to swing that image to the front, but then enable the link on click when that image is at the front Below is what I have so far **HTML** <section id="carousel"> <ol class="next"> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-1.png"></a></li> <li><a href="http://google.com"><img src="assets/images/carousel-item-2.png"></a></li> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-3.png"></a></li> <li><a href="http://google.com"><img src="assets/images/carousel-item-4.png"></a></li> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-5.png"></a></li> <li><a href="http://google.com"><img src="assets/images/carousel-item-6.png"></a></li> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-7.png"></a></li> <li><a href="http://google.com"><img src="assets/images/carousel-item-8.png"></a></li> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-9.png"></a></li> <li><a href="http://google.com"><img src="assets/images/carousel-item-10.png"></a></li> <li><a href="http://bandonthewall.org/"><img src="assets/images/carousel-item-11.png"></a></li> </ol> </section> **JQUERY** $(document).ready(function() { $('ol').roundabout({ btnNext: ".next", enableDrag: true, }); $('a').click(function(e){ link = $(this).attr("href"); location.href=link; }); }); I would really appreciate help with this Thanks
0
[ 2, 487, 8190, 93, 1961, 23818, 104, 20, 3508, 431, 1961, 800, 3726, 3726, 31, 57, 74, 638, 27, 40, 1961, 23818, 10922, 108, 1173, 19, 14, 249, 3508, 7775, 6903, 16724, 13405, 9, 960, 118, 21011, 18, 118, 5000, 6901, 118, 17, 65, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/how do I recover data from crashed MobileNotes app? === My MobileNotes app (the built in Notes app for iPhone) has entered some sort of inconsistent state and is now crashing on startup. I would like to recover my notes from it (and also get the app working again, but that's secondary). Has anyone seen this, and/or succeeded at recovering their data? Starting the app gives the following stack trace/crash data: Jul 5 11:15:08 unknown MobileNotes[777] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x14e620 <x-coredata://77E0D73C-42FB-4F50-A269-6459285C2296/Note/p180>'' *** First throw call stack: (0x357dc88f 0x37b83259 0x361264f3 0x36125d5b 0x36125c0b 0x20dc3 0x33270efb 0x3326ffd9 0x3326f763 0x34723 0x1a103 0x33213f37 0x3573b1fb 0x3260baa5 0x3260b6bd 0x3260f843 0x3260f57f 0x32637911 0x326378e3 0x3325510f 0x33242b33 0x33210ac3 0x33210567 0x3320ff3b 0x373cf22b 0x357b0523 0x357b04c5 0x357af313 0x357324a5 0x3573236d 0x3324186b 0x3323ecd5 0x15e67 0x1564c) Jul 5 11:15:08 unknown UIKitApplication:com.apple.mobilenotes[0xf629][777] <Notice>: terminate called throwing an exception Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Formulating crash report for process MobileNotes[777] Jul 5 11:15:09 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.apple.mobilenotes[0xf629]) Job appears to have crashed: Abort trap: 6 > Jul 5 11:15:09 unknown SpringBoard[15] <Warning>: Application 'Notes' exited abnormally with signal 6: Abort trap: 6 Jul 5 11:15:09 unknown ReportCrash[778] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MobileNotes_2012-07-05-111508_braglearbgle.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 For a full crash log, see [here][1] [1]: http://snipplr.com/view/65979/iphone-crash-log/
2
[ 2, 92, 31, 118, 1544, 107, 31, 7635, 1054, 37, 7579, 3241, 10280, 18, 4865, 60, 800, 3726, 3726, 51, 3241, 10280, 18, 4865, 13, 5, 124, 392, 19, 2434, 4865, 26, 21024, 6, 63, 1297, 109, 2058, 16, 22380, 146, 17, 25, 130, 14604, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Cannot implement a JavaScript Code (noob) === I've found this code $(window).scroll(function(){ $('#header').css({ 'left': $(this).scrollLeft() + 15 //Why this 15, because in the CSS, we have set left 15, so as we scroll, we would want this to remain at 15px left }); }); And it does exactly what I need, but I have no idea how to implement it in my HTML or CSS. Can anyone help a noob out? I'd truly appreciate it.
0
[ 2, 1967, 8713, 21, 8247, 8741, 1797, 13, 5, 251, 4995, 6, 800, 3726, 3726, 31, 22, 195, 216, 48, 1797, 5579, 5, 27508, 6, 9, 3862, 8694, 5, 22359, 5, 6, 1, 5579, 5, 22, 5910, 1743, 106, 22, 6, 9, 6824, 18, 5, 1, 13, 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...
How to avoid networkonmainthread exception WITHOUT using asynctask === I am having issues with networking being very slow.. For testing purposes, I tried to cut out asynctask completely with Android 4.0.4 and of course I need to avoid my network calls on the main thread or I get the networkNotOnMainThread exception.. So I wrapped my call in a thread and I am STILL getting this error. What the heck is wrong here?? public class DrupalTestActivity extends Activity { private Context mCtx; final static String URL = "http://www.mytestsite.com/"; final static String ENDPOINT = "rest/"; String mResponse = null; TextView textView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); textView = (TextView) findViewById(R.id.textView); //retrieves the user account JSON object. JSONObject mUserAccount = UserAccount.getJSONUserAccount(this); //login using the JSON userLogin(mUserAccount); } public void userLogin(final JSONObject mUserAccount) { Thread t = new Thread() { public void run() { String uri = URL + ENDPOINT + "user/login"; HttpPost httppost = new HttpPost(uri); httppost.setHeader("Content-type", "application/json"); StringEntity se; try { HttpClient mHttpClient = new DefaultHttpClient(); HttpParams mHttpParams = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(mHttpParams, 10000); HttpConnectionParams.setSoTimeout(mHttpParams, 10000); se = new StringEntity(mUserAccount.toString()); se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); httppost.setEntity(se); Log.d("STATUS", "CALLING DRUPAL"); ResponseHandler<String> handler = new BasicResponseHandler(); mResponse = mHttpClient.execute(httppost, handler); mHttpClient.getConnectionManager().shutdown(); Log.d("STATUS", "LOGIN COMPLETE"); Log.d("RESPONSE", mResponse); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; t.run(); } } I am baffled and this must be something new in ICS because this all worked in earlier versions of android. Am I really forced to used AsyncTask? I just can't believe that.
0
[ 2, 184, 20, 2658, 982, 218, 6232, 96, 10647, 5391, 366, 568, 21, 9507, 20255, 3656, 800, 3726, 3726, 31, 589, 452, 1549, 29, 16230, 142, 253, 2276, 9, 9, 26, 4431, 4612, 15, 31, 794, 20, 1077, 70, 21, 9507, 20255, 3656, 1524, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Refactor C# automatic properties to fields and getter/setter property? === I have a bunch of business class with autoproperties : public class A { public int Id { get; set; } public string Title { get; set;} } Because the application evolves, there is a new requirement to enable tracking the changes of the properties, in order to send to the backing store only changed data. In order to reach this goal, I have to convert ALL properties to field + property like this : public class A { private int m_Id; public int Id { get { return m_Id; } set { if(m_Id != value){ SetChanged("Id"); m_Id = value; } } } private string m_Title; public string Title { get { return m_Title; } set { if(m_Title != value){ SetChanged("Title"); m_Title = value; } } } protecte void SetChanged(string propertyName) { // Not important here } } Is there a way to quickly refactor my code to avoid having to manually change the properties ?
0
[ 2, 302, 17455, 272, 5910, 6715, 3704, 20, 2861, 17, 164, 815, 118, 18, 22323, 1354, 60, 800, 3726, 3726, 31, 57, 21, 7653, 16, 508, 718, 29, 3108, 10890, 106, 3915, 13, 45, 317, 718, 21, 13, 1, 317, 19, 38, 4924, 13, 1, 164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
bootclasspathref in Android SDK r20 === I have just upgraded from the Andriod SDK r19 to r20. When I attempt to build my project with r20 I get the error: Reference android.target.classpath not found. The build.xml fragment is: `<javac source="${java.source}" target="${java.target}" debug="true" extdirs="" destdir="${native.classes.dir}" bootclasspathref="android.target.classpath" verbose="${verbose}"> <src path="${src.dir}" /> <include name="DifferentTouchInput.java"/> <include name="NativeView.java"/> <include name="EventBridge.java"/> <include name="Timer.java"/> <include name="InternalGPS.java"/> <include name="NonGPSSensors.java"/> <include name="KalmanFilter.java"/> <include name="Settings.java"/> <include name="SafeDestruct.java"/> <include name="InputListener.java"/> <include name="NativeInputListener.java"/> <include name="DownloadUtil.java"/> </javac>` What does bootclasspathref and should android.target.classpath be defined else where? I'm new to Adndroid and ant so this may be a problem caused by my lack of knowledge. Thanks.
0
[ 2, 6801, 1898, 8353, 14057, 19, 13005, 13, 18, 43, 197, 761, 1323, 800, 3726, 3726, 31, 57, 114, 9958, 37, 14, 17, 5741, 43, 13, 18, 43, 197, 761, 1433, 20, 761, 1323, 9, 76, 31, 1735, 20, 1895, 51, 669, 29, 761, 1323, 31, 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...
Executing a function in new process with Python === Is there a way to do this? I was thinking maybe use subprocess or multiprocessing but I am not sure how to do this? I don't have any code for an example because it is just a general question.
0
[ 2, 25836, 21, 1990, 19, 78, 953, 29, 20059, 800, 3726, 3726, 25, 80, 21, 161, 20, 107, 48, 60, 31, 23, 1440, 913, 275, 972, 16835, 54, 1889, 16835, 68, 47, 31, 589, 52, 562, 184, 20, 107, 48, 60, 31, 221, 22, 38, 57, 186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0...
How do i use FQL with php api? and access token === Grr... I cant seem to get fql working. One thing, I think the docs are old because i dont think api() likes just an array. Anyway: $user_id = $facebook->getUser();//works $access_token = $facebook->getAccessToken();//works $fql = 'SELECT name from user where uid = ' . $user_id; $ret_obj = $facebook->api(array( 'method' => 'fql.query', 'access_token' => $access_token, 'query' => $fql, )); print_r($ret_obj);// dont work. actually I get exceptions I've tried all kinds of combinations of params for api(), to no avail. $user = curl('https://graph.facebook.com/'.$user_id.'?access_token='.$access_token); does work, though.
0
[ 2, 184, 107, 31, 275, 398, 22402, 29, 13, 26120, 21, 2159, 60, 17, 1381, 20, 2853, 800, 3726, 3726, 7711, 139, 9, 9, 9, 31, 2973, 2260, 20, 164, 398, 22402, 638, 9, 53, 584, 15, 31, 277, 14, 9765, 18, 50, 315, 185, 31, 1049,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
jtable update data not visible === I am running into a problem similar to what I have read here about inserted data and added data not showing up on jtable. I have tried repaint() and revalidate(), but to no avail. Basically, I have two classes say A and B. A calls a function in class B to add a row of data to the table. Here is the code.(By the way I am using Netbeans 7.1.2 to add a table and then add some code to handle the update.) public void callUpdateTable(){ DefaultTableModel myModel = (DefaultTableModel)jTable1.getModel(); DateFormat dateFormate = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); Object[] str = new Object[3]; Date date = new Date(); str[0] = dateFormate.format(date); str[1] = "Robot"; str[2] = "hello"; // myModel.addRow(str); myModel.insertRow(1, str); myModel.setValueAt("Hello", 1, 2); System.out.println("count = " + myModel.getValueAt(1, 2)); jTable1.repaint(); } The funny thing is on system print it prints out the value at the cell(1,2) I set the value, but doesn't show up on the table. Thank you for your help.
0
[ 2, 487, 5924, 11100, 1054, 52, 4560, 800, 3726, 3726, 31, 589, 946, 77, 21, 1448, 835, 20, 98, 31, 57, 1302, 235, 88, 14215, 1054, 17, 905, 1054, 52, 3187, 71, 27, 487, 5924, 9, 31, 57, 794, 302, 20578, 5, 6, 17, 302, 18506, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
server not sending custom header values === I'm using PHP 5.2.17 to get a remote page, the HTTP requests contains some cookie values but cookies are not delivered to the destination page. $url = 'http://somesite.com/'; $opts = array( 'http' => array ( 'header' => array("Cookie: field1=value1; field2=value2\r\n") ) ); $context = stream_context_create($opts); echo file_get_contents($url, false, $context); Can you help me find the problem? Note: I can't use curl. Thanks.
0
[ 2, 8128, 52, 4907, 5816, 157, 106, 4070, 800, 3726, 3726, 31, 22, 79, 568, 13, 26120, 331, 9, 135, 9, 1053, 20, 164, 21, 5388, 2478, 15, 14, 7775, 12279, 1588, 109, 19980, 4070, 47, 19396, 50, 52, 4002, 20, 14, 6970, 2478, 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...
SharePoint 2010: Set Author (CreatedBy) and Editor (ModifiedBy) in SPFile === I am writing a job to migrate documents to SharePoint 2010 and need to set Author and Editor to the original user for the Source System. The way I have done it was dim ImportFile as SPFile dim ImportFolder as SPFolder dim InternalOperatorUser as SPUser ... ImportFile = ImportFolder.Files.Add(ImportFileName, contents, CreatedBy, ModifiedBy, TimeCreated, TimeModified) ... ImportFile.Item("Author") = InternalOperatorUser ImportFile.Item("Editor") = InternalOperatorUser ImportFile.Item.UpdateOverwriteVersion() ImportFile.Item.SystemUpdate(False) ... That is working fine and it is setting Author and Editor on the ListItem level correctly - SPFile.Item("Author") - SPFile.Item("Editor") BUT (!!!) SharePoint also stores the Editor on the Attachment level which some tools use as display value instead. This value is set to the system user who is running that script - SPFile.Versions.Item(1).CreatedBy This field is readonly. Is there a way to modifiy it so I can set InternalOperatorUser to be the Creator for the Attachment as well. SharePoint 2010 Web only uses the values on the ListItem Attribites which are fine but there are thrid party tools that use the ones on the Attahcment level. Using SharePoint Explorer I could confirm that CreatedBy is set to be the system user. Does anyone here know how to change this value as well? Thanks, Wolfgang
0
[ 2, 1891, 3132, 15742, 309, 1314, 13, 5, 18475, 779, 6, 17, 1835, 13, 5, 13670, 4462, 779, 6, 19, 3782, 16877, 800, 3726, 3726, 31, 589, 1174, 21, 1205, 20, 22985, 4374, 20, 1891, 3132, 498, 17, 376, 20, 309, 1314, 17, 1835, 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...
How to determine position (x,y) relative to the page of every character inside spans through javascript? === This is as simple as I can get. I will have several spans randomly positioned on the screen through something like: $(".hidden:first").css('-webkit-transform','rotate('+((0.5-Math.random())*40)+'deg)'); $(".hidden:first").animate({ left: '+=' + (((screen.width-800-224)/2) + Math.random()*800), top: '+=' + (50+Math.random()*600) } [...] and later on I would like to iterate through every char of every of those elements (that are randomly position and have random rotation), and I would need to discover the (x,y) position of every character on the screen so I can colorize it, forming certain draws according to certain functions. Is this easily achievable? Remembering that I want the (x,y) position of each -character- of a span, not (x,y) of the span itself. I am really inexperienced at javascript. Thanks. Fernando.
0
[ 2, 184, 20, 3746, 649, 13, 5, 396, 15, 93, 6, 4543, 20, 14, 2478, 16, 352, 925, 572, 16967, 120, 8247, 8741, 60, 800, 3726, 3726, 48, 25, 28, 1935, 28, 31, 92, 164, 9, 31, 129, 57, 238, 16967, 21324, 12125, 27, 14, 2324, 120...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Modbus giving a exception PortInUseException === i use IE view a application what use java and modbus protrol ,then throw a exception PortInUseException,But it is ok when I close the IE and open it agian. why?
0
[ 2, 7226, 3822, 1438, 21, 5391, 1295, 108, 3699, 10066, 872, 800, 3726, 3726, 31, 275, 13, 660, 1418, 21, 3010, 98, 275, 8247, 17, 7226, 3822, 895, 38, 7133, 13, 15, 2504, 3814, 21, 5391, 1295, 108, 3699, 10066, 872, 15, 811, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0...
Converting undefined to object in Javascript error === Here are 3 functions: MakeNPC, CreateNPC and NPCAI. CreateNPC runs once at start up and sends data to MakeNPC so they show up in game. NPCAI runs every second and makes the NPC move in game. When CreateNPC calls MakeNPC everything is OK. Problem is that when the MakeNPC function gets a call from NPCAI an error occurs: can't convert undefined to object. Line in which the error is reported by Firebug to come up is in first line of MakeNPC: Previous_bead_NPC[NPCid][0] = x; Here is the whole code of these 3 functions. I wasted whole day trying to solve this and I'm about to cry myself to sleep any minute:( var MakeNPC = function (x, y, c, g, NPCid, dx, dy, s) { "use strict"; Previous_bead_NPC[NPCid][0] = x; Previous_bead_NPC[NPCid][1] = y; Previous_bead_NPC[NPCid][2] = PS.BeadColor(x, y); Previous_bead_NPC[NPCid][3] = PS.BeadGlyph(x, y); PS.BeadColor(x, y, c); PS.BeadData(x, y, "blocked"); PS.BeadGlyph(x, y, g); NPC[NPCid][0] = x; //x NPC[NPCid][1] = y; //y NPC[NPCid][2] = c; //color NPC[NPCid][3] = g; //glyph NPC[NPCid][4] = dx; //destination x NPC[NPCid][5] = dy; //destination y NPC[NPCid][6] = s; //status - 0: arrived, 1: en route }; var CreateNPC = function () { "use strict"; var i; for (i = 0; i < 10; i++) { var x = PS.Random (30); var y = PS.Random (30); var c = COLOR.human; var g = " "; var r = PS.Random (100); if (r < 50) { c = COLOR.human; } else if (r < 75) { c = COLOR.nigro; } else { c = COLOR.asian; } r = PS.Random (19); g = letters[r]; while (PS.BeadData(x, y) === "blocked") { x = PS.Random (30); y = PS.Random (30); } MakeNPC(x, y, c, g, i, x, y, 0); } }; // NPC pathfinding var NPCAI = function(NPCid) { "use strict"; //choosing destination for NPC if (NPC[NPCid][6] == 0) { var r = PS.Random (100); if (r < 10) { NPC[NPCid][4] = locations[0][0]; NPC[NPCid][5] = locations[0][1]; } else if (r < 20) { NPC[NPCid][4] = locations[1][0]; NPC[NPCid][5] = locations[1][1]; } else if (r < 30) { NPC[NPCid][4] = locations[2][0]; NPC[NPCid][5] = locations[2][1]; } else if (r < 40) { NPC[NPCid][4] = locations[3][0]; NPC[NPCid][5] = locations[3][1]; } else if (r < 50) { NPC[NPCid][4] = locations[4][0]; NPC[NPCid][5] = locations[4][1]; } else if (r < 60) { NPC[NPCid][4] = locations[5][0]; NPC[NPCid][5] = locations[5][1]; } else if (r < 70) { NPC[NPCid][4] = locations[6][0]; NPC[NPCid][5] = locations[6][1]; } else if (r < 80) { NPC[NPCid][4] = locations[7][0]; NPC[NPCid][5] = locations[7][1]; } else if (r < 90) { NPC[NPCid][4] = locations[8][0]; NPC[NPCid][5] = locations[8][1]; } else if (r < 100) { NPC[NPCid][4] = locations[9][0]; NPC[NPCid][5] = locations[9][1]; } //checking if NPC isn't already at its destination if (NPC[NPCid][4] == NPC[NPCid][0] && NPC[NPCid][5] == NPC[NPCid][1]) { NPC[NPCid][6] = 0; } else { NPC[NPCid][6] = 1; } } //pathfinding logic if (NPC[NPCid][6] == 1) { var pointAx = NPC[NPCid][0]; //current position x var pointAy = NPC[NPCid][1]; //current position y var pointBx = NPC[NPCid][4]; //destination x var pointBy = NPC[NPCid][5]; //destination y var adjacent_squareNx = pointAx; var adjacent_squareNy = pointAy - 1; var adjacent_squareEx = pointAx + 1; var adjacent_squareEy = pointAy; var adjacent_squareSx = pointAx; var adjacent_squareSy = pointAy + 1; var adjacent_squareWx = pointAx - 1; var adjacent_squareWy = pointAy; var G = new Array(4); //cost of moving to given adjacent square var H = new Array(4); //cost of movimg to pointB from given adjacent square var F = new Array(4); //total cost of a move = G + H G[0] = 10; //N G[1] = 10; //E G[2] = 10; //S G[3] = 10; //W H[0] = 10*(Math.abs(adjacent_squareNx-pointBx)+Math.abs(adjacent_squareNy-pointBy)); H[1] = 10*(Math.abs(adjacent_squareEx-pointBx)+Math.abs(adjacent_squareEy-pointBy)); H[2] = 10*(Math.abs(adjacent_squareSx-pointBx)+Math.abs(adjacent_squareSy-pointBy)); H[3] = 10*(Math.abs(adjacent_squareWx-pointBx)+Math.abs(adjacent_squareWy-pointBy)); F[0] = G[0]+H[0]; F[1] = G[1]+H[1]; F[2] = G[2]+H[2]; F[3] = G[3]+H[3]; var path = Math.min(F[0], F[1], F[2], F[3]); //WARPATH LOL //choosing the right path if (path == F[0]) { //go N if (pointAy > 0) { if (!(PS.BeadData(pointAx, pointAy - 1) === "blocked")) { // Set bead to Previous State PS.BeadColor(pointAx, pointAy, Previous_bead_NPC[NPCid][2]); PS.BeadData(pointAx, pointAy, 0); PS.BeadGlyph(pointAx, pointAy, " "); // Increment pointAy -= 1; // Place NPC MakeNPC(pointAx, pointAy, NPC[NPCid][2], NPC[NPCid][3], NPC[NPCid][4], NPC[NPCid][5], 1); } } } else if (path == F[1]) { //go E if (pointAx < 31) { if (!(PS.BeadData(pointAx + 1, pointAy) === "blocked")) { // Set bead to Previous State PS.BeadColor(pointAx, pointAy, Previous_bead_NPC[NPCid][2]); PS.BeadData(pointAx, pointAy, 0); PS.BeadGlyph(pointAx, pointAy, " "); // Increment pointAx += 1; // Place NPC MakeNPC(pointAx, pointAy, NPC[NPCid][2], NPC[NPCid][3], NPC[NPCid][4], NPC[NPCid][5], 1); } } } else if (path == F[2]) { //go S if (pointAy < 31) { if (!(PS.BeadData(pointAx, pointAy + 1) === "blocked")) { // Set bead to Previous State PS.BeadColor(pointAx, pointAy, Previous_bead_NPC[NPCid][2]); PS.BeadData(pointAx, pointAy, 0); PS.BeadGlyph(pointAx, pointAy, " "); // Increment pointAy += 1; // Place NPC MakeNPC(pointAx, pointAy, NPC[NPCid][2], NPC[NPCid][3], NPC[NPCid][4], NPC[NPCid][5], 1); } } } else if (path == F[3]) { //go W if (pointAx > 0) { if (!(PS.BeadData(pointAx - 1, pointAy) === "blocked")) { // Set bead to Previous State PS.BeadColor(pointAx, pointAy, Previous_bead_NPC[NPCid][2]); PS.BeadData(pointAx, pointAy, 0); PS.BeadGlyph(pointAx, pointAy, " "); // Increment pointAx -= 1; // Place NPC MakeNPC(pointAx, pointAy, NPC[NPCid][2], NPC[NPCid][3], NPC[NPCid][4], NPC[NPCid][5], 1); } } } } //checking if NPC has arrived if (NPC[NPCid][4] == NPC[NPCid][0] && NPC[NPCid][5] == NPC[NPCid][1]) { NPC[NPCid][6] = 0; } else { NPC[NPCid][6] = 1; } };
0
[ 2, 19583, 367, 13439, 20, 3095, 19, 8247, 8741, 7019, 800, 3726, 3726, 235, 50, 203, 3719, 45, 233, 103, 5779, 15, 1600, 103, 5779, 17, 13, 8157, 793, 49, 9, 1600, 103, 5779, 1461, 382, 35, 799, 71, 17, 11350, 1054, 20, 233, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Derive a class from JointCollection === I want to **derive** a class from `Microsoft.Kinect.JointCollection` class. public class Derived : JointCollection { public string NewItem; public Derived () { } } Error: ----- The type 'Microsoft.Kinect.JointCollection' has no constructors defined. What is the problem and how can I solve it?
0
[ 2, 20576, 21, 718, 37, 2266, 15015, 872, 800, 3726, 3726, 31, 259, 20, 13, 1409, 1157, 1284, 1409, 21, 718, 37, 13, 1, 22019, 12980, 9, 1767, 11557, 9, 17838, 15015, 872, 1, 718, 9, 317, 718, 3981, 13, 45, 2266, 15015, 872, 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...
Argument out of range exception error in C# === My method looks like that. [(Grabbed from here)][1] private void inetConvert() { byte[] buf = new byte[1024]; string result; 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, 10240); // Error result = Encoding.ASCII.GetString(buf, 0, read); curRateLbl.Text= result; } The problem is, when app executes this application getting this screen after hanging about 4-5 seconds ![enter image description here][2] What am I missing? [1]: http://dickchiang.blogspot.com/2010/02/getting-foreign-exchange-currency-with.html [2]: http://i.stack.imgur.com/WwAWZ.png
0
[ 2, 5476, 70, 16, 978, 5391, 7019, 19, 272, 5910, 800, 3726, 3726, 51, 2109, 1879, 101, 30, 9, 636, 5, 4973, 3490, 69, 37, 235, 6, 500, 2558, 165, 500, 932, 11364, 19, 1198, 1126, 8122, 5, 6, 13, 1, 34, 591, 2558, 500, 3183, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
iOS Device bound ID's - identifying devices === I have created an app with membership feature and during sign up, I am planning to give out 10 points initially for each user. But in order to detect bulk accounts, - accounts signed just for points- I need to detect each device while signing up, and if device id is used, I should disable additional points. I guess I might as well register into keychain with such thing as; thisUserSignedUpAlready = YES; But I would like to detect device ID's so even if the device is restored or so, I wouldn't give this additional credit to those devices.
0
[ 2, 13, 7760, 3646, 4138, 4924, 22, 18, 13, 8, 13785, 4690, 800, 3726, 3726, 31, 57, 679, 40, 4865, 29, 4363, 1580, 17, 112, 1676, 71, 15, 31, 589, 2334, 20, 590, 70, 332, 819, 1537, 26, 206, 4155, 9, 47, 19, 389, 20, 9092, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MSSQL: expression in "IN" operator === I have table of shops name, ID, Type,etc. Also I have classes of shops (supermarkets, store, retailer) and each class has several types (supermarket=megamarket,multimarket,etc) I would like to get all shops which are supermarkets. Let's assume supermarkets is ShopClass 2. So I would like to write query like this: SELECT ShopID, ShopName FROM Shops WHERE ShopType in (SELECT ShopType FROM ShopClasses WHERE ShopClass=2) But unfortunately that query doesn't work: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS What is the reason? AFAIK I can use expressions in IN statement.
0
[ 2, 4235, 18, 22402, 45, 1803, 19, 13, 7, 108, 7, 6022, 800, 3726, 3726, 31, 57, 859, 16, 7014, 204, 15, 4924, 15, 1001, 15, 1198, 150, 9, 67, 31, 57, 2684, 16, 7014, 13, 5, 8542, 10822, 18, 15, 1718, 15, 22943, 6, 17, 206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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't debug Razor helper - seems IIS is not compiling with debugging symbols? === I am trying to debug a Razor helper function which is running locally on IIS. Even when my helper code reads: System.Diagnostics.Debugger.Break(); The breakpoint does not occur. So I think it is because IIS fails to compile the function in debug mode. I added this in web.config but it doesn't solve the issue: <compilation debug="true"></compilation> Surely somebody else has run into this, or is just my particular laptop buggy??? Thanks! - Brian
0
[ 2, 92, 22, 38, 121, 16254, 14282, 448, 106, 13, 8, 2206, 595, 18, 25, 52, 24378, 29, 121, 16254, 2762, 9794, 60, 800, 3726, 3726, 31, 589, 749, 20, 121, 16254, 21, 14282, 448, 106, 1990, 56, 25, 946, 6680, 27, 595, 18, 9, 166,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to determine performance cost of large objects (in C++) === I am working on a program which does a lot of manipulation on objects; creating, deleting, dynamic_cast-ing them, shuffling around pointers, comparing contents etc. Most of these objects are at least 40 bytes (up to ~90 bytes), and there may be upwards of 10,000 of them in memory at once. What I'm trying to determine is whether I should bother trying to decrease their size. I could profile constructors, new, delete, etc. However, I am lead to believe that the most important performance hit from large objects is from cache unfriendliness. Is there a way to determine the contribution of the size of objects on the number of cache misses that happen? PS: I imagine excessive use of dynamic_cast also affects performance. However this is much easier to diagnose.
0
[ 2, 184, 20, 3746, 956, 1516, 16, 370, 3916, 13, 5, 108, 272, 20512, 6, 800, 3726, 3726, 31, 589, 638, 27, 21, 625, 56, 630, 21, 865, 16, 17561, 27, 3916, 73, 2936, 15, 121, 1336, 68, 15, 7782, 1, 6146, 8, 68, 105, 15, 26588,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
html2fpdf clean up after creating the pdf === I'm trying to generate a pdf file with html2fpdf. $pdf = new HTML2FPDF(); $pdf->HTML2FPDF("P","mm","A4"); $pdf->AddPage(); $pdf->WriteHTML($html); $pdf->output('sample.pdf'); This sample works great. But: How do i delete the pdf after the output? I just want to have links in my tool, the users can download the pdf and after that it shoud be deleted on the server. How can i 'clean up' after generating the pdf?
0
[ 2, 13, 15895, 135, 410, 11124, 2745, 71, 75, 2936, 14, 13, 11124, 800, 3726, 3726, 31, 22, 79, 749, 20, 7920, 21, 13, 11124, 3893, 29, 13, 15895, 135, 410, 11124, 9, 5579, 11124, 800, 78, 13, 15895, 135, 410, 11124, 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...
How to close Youtube ads on video automatically? === This is about the ads that appears on the bottom of the YouTube video screen when a video starts playing for the first time. We can manually close the video by clicking the Close button on the upper right corner of the ad. Is there anyway to write a script or small piece of program for the browser to automatically close if any ad appears, when its browsing YouTube. (I thought it would be interesting if we could do that) Thanks.
0
[ 2, 184, 20, 543, 7330, 16236, 27, 763, 7499, 60, 800, 3726, 3726, 48, 25, 88, 14, 16236, 30, 1780, 27, 14, 2129, 16, 14, 7330, 763, 2324, 76, 21, 763, 3244, 791, 26, 14, 64, 85, 9, 95, 92, 23671, 543, 14, 763, 34, 25590, 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...
Apple Sandbox and AXUIElementRefs === How can i access another app if my app is in this strange Sandboxing thing which is required to release a app in the MAC App Store? I'm reading with this Method an UIElement: AXUIElementCopyElementAtPosition(xxx) This works fine so far. But if i enable App Sandboxing, i no longer get reference to the MenuItem!!! Thanks for help.
0
[ 2, 4037, 1965, 5309, 17, 21, 396, 5661, 27567, 14057, 18, 800, 3726, 3726, 184, 92, 31, 1381, 226, 4865, 100, 51, 4865, 25, 19, 48, 2578, 1965, 5309, 68, 584, 56, 25, 1390, 20, 830, 21, 4865, 19, 14, 1572, 4865, 1718, 60, 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...
Get 404 error when trying to use PersistentManager in Tomcat === I am following a book on Tomcat 7 and I am trying to use PersistentManager with FileStore for session persistence. I have a Tomcat 7 server running in Eclipse so I went to it's folder in Project Explorer and in the context.xml file located there I inserted the following text <Manager> className="org.apache.catalina.session.PersistentManager" saveOnRestart="true" maxActiveSessions="-1" minIdleSwap="-1" maxIdleSwap="-1" maxIdleBackup="-1" <Store className="org.apache.catalina.session.FileStore" directory="/mypath/mydir" /> </Manager> As the book says I have to set the Manager in the context.xml file and as I am running Tomcat through Eclipse I presume that is the context.xml file to use. Anyway when I insert that text and restart Tomcat I get a 404 when I try to visit my localhost webpage. Here's the output from the console when I click restart - 08-Jul-2012 18:59:32 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\ActiveState Komodo Edit 6\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Windows Live\Shared;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Network Monitor 3\;C:\Program Files\MATLAB\R2011a\runtime\win32;C:\Program Files\MATLAB\R2011a\bin;C:\Program Files\Nmap;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin;C:\Program Files\Steam;C:\ProgramData\Propeople\Drush\;C:\Program Files\Propeople\Drush\GnuWin32\bin;C:\Program Files\Propeople\Drush\Php;C:\bf_scripts;C:\Program Files\Java\jdk1.6.0_30\bin;C:\apache\ant\bin;C:\Users\Brian\Eclipse\eclipse tomcat;;. 08-Jul-2012 18:59:32 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:chapter5' did not find a matching property. 08-Jul-2012 18:59:32 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8080"] 08-Jul-2012 18:59:32 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] 08-Jul-2012 18:59:32 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 376 ms 08-Jul-2012 18:59:32 org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina 08-Jul-2012 18:59:32 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.27 08-Jul-2012 18:59:32 org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:612) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:556) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:814) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:363) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 08-Jul-2012 18:59:32 org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in context.xml for java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1054) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:612) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:556) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:814) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:363) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051) ... 28 more 08-Jul-2012 18:59:32 org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Occurred at line 41 column 87 08-Jul-2012 18:59:32 org.apache.catalina.startup.ContextConfig configureStart SEVERE: Marking this application unavailable due to previous error(s) 08-Jul-2012 18:59:32 org.apache.catalina.core.StandardContext startInternal SEVERE: Error getConfigured 08-Jul-2012 18:59:32 org.apache.catalina.core.StandardContext startInternal SEVERE: Context [] startup failed due to previous errors 08-Jul-2012 18:59:32 org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:612) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:556) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:814) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:363) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 08-Jul-2012 18:59:32 org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in context.xml for /chapter5 java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1054) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:612) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:556) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:814) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:363) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchMethodException: org.apache.catalina.session.StandardManager setStore at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051) ... 28 more 08-Jul-2012 18:59:32 org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Occurred at line 41 column 87 08-Jul-2012 18:59:33 org.apache.catalina.startup.ContextConfig configureStart SEVERE: Marking this application unavailable due to previous error(s) 08-Jul-2012 18:59:33 org.apache.catalina.core.StandardContext startInternal SEVERE: Error getConfigured 08-Jul-2012 18:59:33 org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/chapter5] startup failed due to previous errors 08-Jul-2012 18:59:33 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] 08-Jul-2012 18:59:33 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] 08-Jul-2012 18:59:33 org.apache.catalina.startup.Catalina start INFO: Server startup in 257 ms Any ideas what is going wrong?
0
[ 2, 164, 13, 23397, 7019, 76, 749, 20, 275, 15348, 22256, 19, 2067, 5782, 800, 3726, 3726, 31, 589, 249, 21, 360, 27, 2067, 5782, 453, 17, 31, 589, 749, 20, 275, 15348, 22256, 29, 3893, 16828, 26, 3723, 28584, 9, 31, 57, 21, 2067...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 learn Linux from beginning? === I want to learn Linux from beginning . So any one can help me which ebook is better to learn linux and also tell me which version is mostly used in company work (ubuntu, red hat and many more ).
2
[ 2, 184, 20, 2484, 13024, 37, 997, 60, 800, 3726, 3726, 31, 259, 20, 2484, 13024, 37, 997, 13, 9, 86, 186, 53, 92, 448, 55, 56, 26751, 25, 574, 20, 2484, 13024, 17, 67, 494, 55, 56, 615, 25, 1555, 147, 19, 237, 170, 13, 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, 0, 0, 0, 0...
C# copy string to byte buffer === I'm really feeling like a dufus. I have read a bunch of articles on how to do this but I can't seem to make it work. I am trying to copy an Ascii string to a byte array. Here are the two things I have tried so far. Neither one works: public int GetString (ref byte[] buffer, int buflen) { string mystring = "hello world"; // I have tried this: System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(); buffer = encoding.GetBytes(mystring); // and tried this: System.Buffer.BlockCopy(mystring.ToCharArray(), 0, buffer, 0, buflen); return (buflen); } Can someone show me how to do this? Thanks.
0
[ 2, 272, 5910, 4344, 3724, 20, 34, 591, 17497, 800, 3726, 3726, 31, 22, 79, 510, 1249, 101, 21, 1052, 13735, 9, 31, 57, 1302, 21, 7653, 16, 3376, 27, 184, 20, 107, 48, 47, 31, 92, 22, 38, 2260, 20, 233, 32, 170, 9, 31, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
MVVM dynamically created === I am using MVVM Light Toolkit for the first time. Now I have problem, when I am creating my own Views dynamically and on all of them one style is aplied. In this style binding properties are set. As source I am using ViewModelLocator. How can I assign standalone ViewModel to every dynamically created View. And how to keep them interconnected. I found this answer http://stackoverflow.com/a/9364361/1209448, but this solution is returning new ViewModel everytime a binding property is used. This is Style: <Style TargetType="{x:Type Items:DesignerItem}"> <Setter Property="MinHeight" Value="50"/> <Setter Property="MinWidth" Value="50"/> <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/> <!-- Binding to DesignerItemViewModel --> <Setter Property="Canvas.Left" Value="{Binding Source={StaticResource Locator2}, Path=DesignerItem.Left, Mode=TwoWay}" /> <Setter Property="Canvas.Top" Value="{Binding Source={StaticResource Locator2}, Path=DesignerItem.Top, Mode=TwoWay}" /> <Setter Property="IsClicked" Value="{Binding Source={StaticResource Locator2}, Path=DesignerItem.IsClicked, Mode=TwoWay}" /> <!-- END --> <Setter Property="Template"> <Setter.Value> <!-- Other Child Controls --> </Setter.Value> </Setter> </Style> ViewModelLocator class: public class ViewModelLocator { public ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); SimpleIoc.Default.Register<MainViewModel>(); SimpleIoc.Default.Register<DesignerItemViewModel>(); } public MainViewModel Main { get { return ServiceLocator.Current.GetInstance<MainViewModel>(); } } public DesignerItemViewModel DesignerItem { get { return ServiceLocator.Current.GetInstance<DesignerItemViewModel>(Guid.NewGuid().ToString()); } } public static void Cleanup() { // TODO Clear the ViewModels } } It is somehow possible to return specific ViewModel from ViewModelLocator according to value of Property GUID of the View?
0
[ 2, 17967, 20147, 7782, 1326, 679, 800, 3726, 3726, 31, 589, 568, 17967, 20147, 471, 5607, 13703, 26, 14, 64, 85, 9, 130, 31, 57, 1448, 15, 76, 31, 589, 2936, 51, 258, 4146, 7782, 1326, 17, 27, 65, 16, 105, 53, 1034, 25, 21, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CKEditor. How to turn off autogrow (set constant height) === I use autogrow plugin and have a need turn it of in some cases. And set constant height... but how can I do it? Didn't find any documentation about how to enable/disable plugins on the fly.
0
[ 2, 13, 2601, 13401, 9, 184, 20, 805, 168, 3108, 263, 5417, 13, 5, 3554, 3587, 2947, 6, 800, 3726, 3726, 31, 275, 3108, 263, 5417, 10922, 108, 17, 57, 21, 376, 805, 32, 16, 19, 109, 1871, 9, 17, 309, 3587, 2947, 9, 9, 9, 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...
Using regex in javscript to select only text between tags === I've search and search but can't seem to find the answer I need. I'm still wrapping my head around the whole regex thing don't know enough to solve this problem, which seems far to simple. I have a string `"<a href="#">London<span>35.2miles</span></a>"` I need to chop everything apart from `"London"`, but everything I try results in `"London<span>35.2miles</span>"` I cannot seem to get rid of the *span* tags and text, as well as the *a* tags. please help Thanks
0
[ 2, 568, 7953, 1706, 19, 3009, 710, 8741, 20, 5407, 104, 1854, 128, 3383, 18, 800, 3726, 3726, 31, 22, 195, 2122, 17, 2122, 47, 92, 22, 38, 2260, 20, 477, 14, 1623, 31, 376, 9, 31, 22, 79, 174, 13437, 51, 157, 140, 14, 979, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
embed navigation bar into iframe === I am thinking to embed a navigation bar into an iframe. The environment is a growing intranet site that needs consistent look & feel. Usually I would put the navigation into the layout-template code, but this is more difficult as it sounds. The layout-template is layered, you have an overall template and then an application-/site-specific template. So this solutions feels messy. The actual reason why it's a problem is this: the navigation is different for different users because of rights management. Problem #2: one could use an AJAX solution but this is also not cool because I have the requirement to keep Javascript usage as low and simple as possible. So, question: iframe yes or no? One reason for *no*: iframes block page load and this intranet site must also be available via VPN using bad connections.
0
[ 2, 11911, 69, 8368, 748, 77, 31, 8361, 800, 3726, 3726, 31, 589, 1440, 20, 11911, 69, 21, 8368, 748, 77, 40, 31, 8361, 9, 14, 2307, 25, 21, 1991, 14369, 2328, 689, 30, 2274, 8224, 361, 279, 583, 9, 951, 31, 83, 442, 14, 8368, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 most simple LINQ to XML query. But I can't get it === I'm new to LINQ. My XML: <Config> <day>7</day> </Config> How to get 7 using LINQ? I've tried the following and none helps: XElement doc = XElement.Load("Config.xml"); remainDay = Convert.ToInt32(doc.Element("remainingDays").Value); remainDay = Convert.ToInt32((from ele in doc.Elements() let e = ele.Element("remainingDays") select e)); remainDay = Convert.ToInt32((from el in doc.Descendants("remainingDays") select el).First());
0
[ 2, 14, 127, 1935, 6294, 1251, 20, 23504, 25597, 9, 47, 31, 92, 22, 38, 164, 32, 800, 3726, 3726, 31, 22, 79, 78, 20, 6294, 1251, 9, 51, 23504, 45, 13, 1, 14093, 2816, 1, 13, 1, 1185, 1, 465, 1, 118, 1185, 1, 13, 1, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Calculating age in years/ month(if year is 0) from date of birth in HQL === I want to calculate the age from date of birth.. By subtracting the current date and birth date i can calculate the year as age by using DATE_FORMAT(FROM_DAYS(TO_DAYS(CURRENT_DATE( ))-TO_DAYS('2010-06-01')),'%Y')+0 if suppose the year is 0 then i have to display the month as age(eg: Age: 2-months). I can get the month also by using DATE_FORMAT(FROM_DAYS(TO_DAYS(CURRENT_DATE( ))-TO_DAYS('2012-06-01')),'%m') For this process, i am using case in HQL query. Is any other way to do this without going for case in query. Thanks in Advance.
0
[ 2, 22937, 348, 19, 122, 118, 1617, 5, 821, 159, 25, 713, 6, 37, 1231, 16, 2208, 19, 746, 22402, 800, 3726, 3726, 31, 259, 20, 18469, 14, 348, 37, 1231, 16, 2208, 9, 9, 34, 27031, 68, 14, 866, 1231, 17, 2208, 1231, 31, 92, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Missing; before statement error jsonp === My service is hosted on 192......222/MyService.asmx when i call it from remote using jsonp i found following error d [Break On This Error] <string xmlns="http://tempuri.org/">&lt;a/&gt; &lt;b/&gt;</string> My jsonp Code is here; function test() { $.ajax({ url: "http://10.20.30.62/TestService/JSONP-EndPoint.asmx/Sum", data: { x: JSON.stringify("Now i am getting jsop string") }, dataType: "jsonp", success: function(json) { alert(json.d); }, error: function() { alert("Hit error fn!"); } }); } using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Web; namespace ContentTypeHttpModule { public class ContentTypeHttpModule : IHttpModule { private const string JSON_CONTENT_TYPE = "application/json; charset=utf-8"; #region IHttpModule Members public void Dispose() { } public void Init(HttpApplication app) { app.BeginRequest += OnBeginRequest; app.ReleaseRequestState += OnReleaseRequestState; } #endregion public void OnBeginRequest(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpRequest resquest = app.Request; if (!resquest.Url.AbsolutePath.Contains("JSONP-EndPoint.asmx")) return; if (string.IsNullOrEmpty(app.Context.Request.ContentType)) { app.Context.Request.ContentType = JSON_CONTENT_TYPE; } else { //app.Context.Request.ContentType = JSON_CONTENT_TYPE; } } public void OnReleaseRequestState(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpResponse response = app.Response; if (app.Context.Request.ContentType != JSON_CONTENT_TYPE) return; response.Filter = new JsonResponseFilter(response.Filter); } } public class JsonResponseFilter : Stream { private readonly Stream _responseStream; private long _position; public JsonResponseFilter(Stream responseStream) { _responseStream = responseStream; } public override bool CanRead { get { return true; } } public override bool CanSeek { get { return true; } } public override bool CanWrite { get { return true; } } public override long Length { get { return 0; } } public override long Position { get { return _position; } set { _position = value; } } public override void Write(byte[] buffer, int offset, int count) { string strBuffer = Encoding.UTF8.GetString(buffer, offset, count); strBuffer = AppendJsonpCallback(strBuffer, HttpContext.Current.Request); byte[] data = Encoding.UTF8.GetBytes(strBuffer); _responseStream.Write(data, 0, data.Length); } private string AppendJsonpCallback(string strBuffer, HttpRequest request) { return request.Params["callback"] +"(" + strBuffer + ");"; } public override void Close() { _responseStream.Close(); } public override void Flush() { _responseStream.Flush(); } public override long Seek(long offset, SeekOrigin origin) { return _responseStream.Seek(offset, origin); } public override void SetLength(long length) { _responseStream.SetLength(length); } public override int Read(byte[] buffer, int offset, int count) { return _responseStream.Read(buffer, offset, count); } } } I need immediate resolve! facing last many days
0
[ 2, 2863, 73, 115, 3331, 7019, 487, 528, 306, 800, 3726, 3726, 51, 365, 25, 2812, 27, 13, 19532, 9, 9, 9, 9, 9, 9, 19428, 118, 915, 11449, 9, 472, 79, 396, 76, 31, 645, 32, 37, 5388, 568, 487, 528, 306, 31, 216, 249, 7019, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Unable to create local database file using server explorer === I have recently had my computer migrated to use a different server within my compnay and because of the migration the Domain name has changed. Previous to this everything was working fine and i could create local database files (.mdf files). So now when i try to create a new local database file within Visual Studio's Server Exploer: Add Connection > Data source = Microsoft SQL Server Database File (SqlClient) > using a new name for the Database file name > Using Windows Authentication. I get the error: Login failed for user 'DOMAIN\USERNAME' I aslo get this error message if i am trying to connect to a local database file that i created before the migration. Any help would be great. Thanks.
0
[ 2, 2343, 20, 1600, 375, 6018, 3893, 568, 8128, 8520, 800, 3726, 3726, 31, 57, 1989, 41, 51, 1428, 14204, 20, 275, 21, 421, 8128, 363, 51, 6479, 10118, 17, 185, 16, 14, 8443, 14, 4603, 204, 63, 1015, 9, 1158, 20, 48, 796, 23, 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...
How to move figures when they are part of a connection === I am working on a small graphical editor using the Draw2d library (without GEF). One requirement is, that you can move figures by dragging them with the mouse. This works fine as long as there is no c(Polyline-) connection between the figures. When I add a connection, all is rendered correctly but it is impossible to move the figures. Here is a code example that shows the problem: public class Main { public static void main(String[] args) { Display d = new Display(); final Shell shell = new Shell(d); shell.setSize(400, 400); shell.setText("Draw2d Test"); LightweightSystem lws = new LightweightSystem(shell); Figure contents = new Figure(); XYLayout contentsLayout = new XYLayout(); contents.setLayoutManager(contentsLayout); // create figures Figure f1 = new TestFigure("Test 1"); Figure f2 = new TestFigure("Test 2"); MouseManager mm = new MouseManager(); // register mouse listeners f1.addMouseMotionListener(mm); f1.addMouseListener(mm); f2.addMouseMotionListener(mm); f2.addMouseListener(mm); // set constraints to layout manager contentsLayout.setConstraint(f1, new Rectangle(10, 10, -1, -1)); contentsLayout.setConstraint(f2, new Rectangle(200, 200, -1, -1)); // add to layout manager contents.add(f1); contents.add(f2); // add connection // When uncommenting these lines, dragging works fine PolylineConnection c = new PolylineConnection(); c.setSourceAnchor(new ChopboxAnchor(f1)); c.setTargetAnchor(new ChopboxAnchor(f2)); c.setConnectionRouter(new ManhattanConnectionRouter()); contents.add(c); lws.setContents(contents); shell.open(); while (!shell.isDisposed()) { while (!d.readAndDispatch()) { d.sleep(); } } } } class MouseManager implements MouseMotionListener, MouseListener { Figure selection; private Point lastDragLocation; @Override public void mousePressed(MouseEvent me) { System.out.println("mouse pressed"); selection = (Figure) me.getSource(); } @Override public void mouseReleased(MouseEvent me) { System.out.println("mouse released"); selection = null; lastDragLocation = null; } @Override public void mouseDragged(MouseEvent me) { if (lastDragLocation != null && selection != null) { int offsetX = me.getLocation().x - lastDragLocation.x; int offsetY = me.getLocation().y - lastDragLocation.y; int newX = selection.getLocation().x + offsetX; int newY = selection.getLocation().y + offsetY; System.out.println(String.format("NewX: %d, NewY: %d", newX, newY)); selection.setBounds(selection.getBounds().getTranslated(offsetX, offsetY)); } lastDragLocation = me.getLocation(); } // [removed empty implementations of the interface for this post] } class TestFigure extends RectangleFigure { public Color classColor; public TestFigure(String name) { ToolbarLayout layout = new ToolbarLayout(); setLayoutManager(layout); setOpaque(true); classColor = new Color(null, 255, 255, 206); setBackgroundColor(classColor); Label lbl_name = new Label(name); add(lbl_name); } @Override protected void finalize() throws Throwable { classColor.dispose(); super.finalize(); } } Does anyone have an idea how to make dragging possible when there is a connection between the two figures (It is not neccessary to render the dragging of the connection)?
0
[ 2, 184, 20, 780, 2957, 76, 59, 50, 141, 16, 21, 2760, 800, 3726, 3726, 31, 589, 638, 27, 21, 284, 21755, 1835, 568, 14, 2003, 135, 43, 1248, 13, 5, 14506, 3168, 410, 6, 9, 53, 8981, 25, 15, 30, 42, 92, 780, 2957, 34, 13052, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id .. amistad views? === I am using amistad as a friends controller. now I want to add friend but the error I get is : Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id.. this is my link to add friend : <section> <h1> <%= @user.username %> </h1> <% unless current_user == @user %> <%= link_to "Arkadaşlarıma Ekle", friends_path(:friend_id => @user), :method => :post,class: "btn btn-large btn-primary" %> <%end %> </section> and my friendships_controller.rb: class FriendshipsController < ApplicationController before_filter :authenticate_user! def index @friends = current_user.friends @pending_invited_by = current_user.pending_invited_by @pending_invited = current_user.pending_invited end def new @users = User.all :conditions => ["id != ?", current_user.id] end def create invitee = User.find_by_id(params[:user_id]) if current_user.invite invitee redirect_to new_friend_path, :notice => "Successfully invited friend!" else redirect_to new_friend_path, :notice => "Sorry! You can't invite that user!" end end def update inviter = User.find_by_id(params[:id]) if current_user.approve inviter redirect_to new_friend_path, :notice => "Successfully confirmed friend!" else redirect_to new_friend_path, :notice => "Sorry! Could not confirm friend!" end end def requests @pending_requests = current_user.pending_invited_by end def invites @pending_invites = current_user.pending_invited end def destroy user = User.find_by_id(params[:id]) if current_user.remove_friendship user redirect_to friends_path, :notice => "Successfully removed friend!" else redirect_to friends_path, :notice => "Sorry, couldn't remove friend!" end end end how can i arrange the correct views for amistad ? is there a tutorial?
0
[ 2, 227, 4924, 26, 1781, 255, 15, 56, 83, 23745, 44, 268, 13, 8, 8, 100, 42, 510, 417, 14, 4924, 16, 1781, 255, 15, 275, 3095, 1, 1340, 13, 9, 9, 13, 5448, 8536, 4146, 60, 800, 3726, 3726, 31, 589, 568, 13, 5448, 8536, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Table Data in Visual Studio from SQL CE Database === I am trying to show the table data of a table in a SQL CE database through Visual Studio and for some reason I'm getting the following error. Now, here is a brief recent history of this machine and I'll give it as best I can. Most recently I repaired the Visual Studio SP1 installation in hopes that it would fix this problem. Prior to that I installed SQL 2012 due to a requirement surrounding integration tests so I now have SQL 2008 and SQL 2012 installed on this box. Some other items of interest might be that I have LightSwitch installed and I had at one time installed Visual Studio 2012 RC - but have since uninstalled it. I'm hoping that I can just repair something and get it working :) I look forward to your responses. ![Visual Studio Error][1] [1]: http://i.stack.imgur.com/BmZCY.png
0
[ 2, 298, 859, 1054, 19, 3458, 1120, 37, 4444, 255, 4000, 6018, 800, 3726, 3726, 31, 589, 749, 20, 298, 14, 859, 1054, 16, 21, 859, 19, 21, 4444, 255, 4000, 6018, 120, 3458, 1120, 17, 26, 109, 1215, 31, 22, 79, 1017, 14, 249, 70...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible to store null value of an enumerated attribute to database? === I am trying to store **null** value of an **enumerated** attribute of an entity in Java to Oracle database using JPA TopLink. The code is executed with no exception or warning, but the entity is not stored in the database. The entity is defined as follows: @Entity public class LetterDoc { ... @Column(name = "delivery_type", columnDefinition = "VARCHAR2(20)", nullable = true) @Enumerated(EnumType.STRING) private DocDeliveryTypeEnum deliveryType; ... } The Enum class DocDeliveryTypeEnum have only required values. public enum DocDeliveryTypeEnum { NORMAL, RECOMMENDED, ACKNOWLEDGEMENT } In my situation, I have instances of entities where the deliveryType makes sence and is required. However, for some cases, the deliveryType is **irrelevant** and I want to leave it **null**. I don't want to set a default value as there is no adequate value for this case. The entity instance has the value set to null, but when I try to persist and flush the instance in the database, it is just not stored, although the column is defined as VARCHAR2(20) with NULL value enabled. Is there any chance to make this work, or do I really have to set a value for all enumerated attributes before persisting? Do I really have to create a default value in the Enum class? I have solved my problem by setting a default value that does not make much sense in the particular situation. However, I wonder if there is any other option. Thank you very much for your experience and advice.
0
[ 2, 25, 32, 938, 20, 1718, 16203, 1923, 16, 40, 26940, 69, 35, 14755, 20, 6018, 60, 800, 3726, 3726, 31, 589, 749, 20, 1718, 13, 1409, 4215, 211, 1409, 1923, 16, 40, 13, 1409, 219, 9472, 7432, 1409, 35, 14755, 16, 40, 9252, 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...
jQuery: Convert numeric string in to some standard format === Is there any jQuery plugin which convert numeric string into a standard format let say: 200000 to 2,00,000 1000 to 1,000 398740 to 3,987,40 and so on..
0
[ 2, 487, 8190, 93, 45, 8406, 15764, 596, 3724, 19, 20, 109, 1236, 2595, 800, 3726, 3726, 25, 80, 186, 487, 8190, 93, 10922, 108, 56, 8406, 15764, 596, 3724, 77, 21, 1236, 2595, 408, 395, 45, 824, 2032, 20, 172, 15, 2032, 15, 3993...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
NSUserdeafults iOS String Storing Error === I'm trying to store the value of an label in a NSUserDefault key `prevmode` but when it doesn't appear to be storing and when trying to recall after it says in debugger `Invalid CFStringRef`. The code to store is //Check for previous mode NSUserDefaults *defaults; NSString *prevmode; prevmode = passLength.text; [defaults setObject:prevmode forKey:@"prevmode"]; and to recover is NSUserDefaults *defaults; NSString *prevmode; prevmode = [defaults objectForKey:@"prevmode"];
0
[ 2, 13, 2172, 16704, 12746, 1566, 38, 18, 13, 7760, 3724, 25615, 7019, 800, 3726, 3726, 31, 22, 79, 749, 20, 1718, 14, 1923, 16, 40, 1899, 19, 21, 13, 2172, 16704, 13862, 9708, 1246, 13, 1, 3515, 710, 15570, 1, 47, 76, 32, 1437, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Deserializing JSON into one of several C# subclasses === I have a json structure that looks something like this: "list":[ { "type":"link", "href":"http://google.com" }, { "type":"image", "src":"http://google.com/logo.png" }, { "type":"text", "text":"some text here" }, ] I would like to deserialize this into a list of objects, where each object is a subclass of a base class. Each item in the list has different properties (href, src, text), so I can't use the same class for reach one. Instead I would like three subclasses of a general class. The type property of each item in the JSON list can be used to decide which subclass to use. So for example, I could have the following classes public Item{ public string type {get; set;} } public LinkItem : Item { public string href {get; set;} } public ImageItem : Item { public string src {get; set;} } public TextItem : Item { public string text {get; set;} } Is there any way to do this? Or is there a better way to deserialize a list of heterogeneous object types?
0
[ 2, 1746, 106, 2815, 3335, 487, 528, 77, 53, 16, 238, 272, 5910, 972, 1898, 160, 800, 3726, 3726, 31, 57, 21, 487, 528, 1411, 30, 1879, 301, 101, 48, 45, 13, 7, 5739, 7, 45, 2558, 13, 1, 13, 7, 4474, 7, 45, 7, 6258, 7, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Asp.net Chart Control Issue === ![enter image description here][1] [1]: http://i.stack.imgur.com/nwopF.jpg I need this kind of graph by using MSChart in asp.net,I used the **DataBindTable** method of Chart control by assigning the datatable to to chart like this : //convert datatable to a IEnumerable form var IEtable = (table as System.ComponentModel.IListSource).GetList(); Chart1.DataBindTable(IEtable, "Param"); the problem is now that bar colors depend upon certain conditions and I am unable to do it. Please help me out.
0
[ 2, 28, 306, 9, 2328, 1795, 569, 1513, 800, 3726, 3726, 13, 187, 2558, 13679, 1961, 5318, 235, 500, 2558, 165, 500, 636, 165, 500, 45, 7775, 6903, 49, 9, 25325, 9, 1660, 11147, 9, 960, 118, 103, 6374, 7721, 9, 12851, 263, 31, 376...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Time Series JFreeChart repaint the time axis === I created a dynamic time series chart using J-Free chart API. and it is working fine. I have to add a combo box to it, in which time values will be there like 5 sec, 15 sec, 30 sec. when user choose on from it the time axis has to repaint with given interval and the timer has to delay the process for 5, 15,30 seconds(updating the chart). I this on my previous post [this][1] [1]: http://stackoverflow.com/questions/11188219/jfreechart-timeseries-is-not-refreshing with some extensions like adding combo box to it final JComboBox combo = new JComboBox(); combo.addItem("5"); combo.addItem("15"); combo.addItem("30"); combo.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ if("5".equals(combo.getSelectedItem())){ seriesvalue=5; }else if("15".equals(combo.getSelectedItem())){ seriesvalue=15; unit = new DateTickUnit(DateTickUnitType.MINUTE,seriesvalue/2); repaint(); } } }); I defined MINUTE in my latest code and added a class variable seriesvalue and make some changes on timer also timer = new Timer(999*seriesvalue, new ActionListener() { public void actionPerformed(ActionEvent e) { for(int i=0;i<seriesvalue;i++){ newData[0] = randy.getRandomvalue(); dataset.advanceTime(); dataset.appendData(newData); } } }); but it's not worked for me, any help will be appreciated. thanks
0
[ 2, 85, 231, 487, 4639, 5433, 38, 302, 20578, 14, 85, 8577, 800, 3726, 3726, 31, 679, 21, 7782, 85, 231, 1795, 568, 487, 8, 4639, 1795, 21, 2159, 9, 17, 32, 25, 638, 1123, 9, 31, 57, 20, 3547, 21, 22621, 1649, 20, 32, 15, 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 NaN in pearson corellation user-user similarity matrix in a recommender system is handled === I am generating a user-user similarity matrix from a user-rating data (particularly MovieLens100K data). Computing correlation leads to some NaN values. I have tested in a smaller dataset: User-Item rating matrix I1 I2 I3 I4 U1 4 0 5 5 U2 4 2 1 0 U3 3 0 2 4 U4 4 4 0 0 User-User Pearson Correlation similarity matrix U1 U2 U3 U4 U5 U1 1 -1 0 -nan 0.755929 U2 -1 1 1 -nan -0.327327 U3 0 1 1 -nan 0.654654 U4 -nan -nan -nan -nan -nan U5 0.755929 -0.327327 0.654654 -nan 1 For computing the pearson correlation , only corated items are considered between two users. (See [Toward the Next Generation of Recommender Systems: A Survey of the State-of-the-Art and Possible Extensions, Gediminas Adomavicius, Alexander Tuzhilin][1] How can i handle the NaN values? [1]: http://dl.acm.org/citation.cfm?id=1070751
0
[ 2, 184, 5884, 19, 14153, 2884, 211, 857, 4155, 8, 16704, 17204, 8187, 19, 21, 12360, 106, 329, 25, 9006, 800, 3726, 3726, 31, 589, 13500, 21, 4155, 8, 16704, 17204, 8187, 37, 21, 4155, 8, 15073, 1054, 13, 5, 20874, 1308, 2284, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Vimeo video player issue === am also having this problem on my iPhone4 with iOS 5.0. I am trying to embed the video from vimeo.com using following HTML string and then loading it on to the webView: NSString *vimeoURL = [NSString stringWithFormat:@"http://player.vimeo.com/video/%@?title=0&amp;byline=0&amp;portrait=0", self.videoId]; NSString *htmlString = [NSString stringWithFormat:@"<iframe src=\"%@\" width=\"320\" height=\"320\" frameborder=\"0\" webkitAllowFullScreen="" allowFullScreen=""></iframe>", vimeoURL]; Although when I play a video by tapping on it at very first time in one screen in a tab and then try to play the same video (works fine if I play any other video) in some other tab then the status bar of iPhone shows the play status (play icon on top right corner of status bar) but I can hear the audio only and can't see any video on the screen.
0
[ 2, 1790, 790, 111, 763, 517, 1513, 800, 3726, 3726, 589, 67, 452, 48, 1448, 27, 51, 21024, 300, 29, 13, 7760, 331, 9, 387, 9, 31, 589, 749, 20, 11911, 69, 14, 763, 37, 1790, 790, 111, 9, 960, 568, 249, 13, 15895, 3724, 17, 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 do i convet following sql query to linq === I have to convert a following sql query into linq Can you please help me to sort out this SELECT DISTINCT ExamConditionSeverityID, ( SELECT _tblBodyPart.BodyPartCode FROM _tblBodyPart WHERE _tblBodyPart.BodyPartID = IncExam.BodyPartID UNION SELECT _tblBodyPart.BodyPartCode FROM _tblBodyPart WHERE _tblBodyPart.BodyPartID = IncExam.BodyPartID AND _tblBodyPart.LeftRightID IS NULL UNION SELECT _tblBodyPart.BodyPartCode FROM _tblBodyPart WHERE _tblBodyPart.BodyPartID = IncExam.BodyPartID AND _tblBodyPart.FrontBackID IS NULL UNION SELECT _tblBodyPart.BodyPartCode FROM _tblBodyPart WHERE _tblBodyPart.BodyPartID = IncExam.BodyPartID AND _tblBodyPart.FrontBackID IS NULL AND _tblBodyPart.LeftRightID IS NULL ) AS BodyPartCode FROM tblIncExam IncExam inner join _tblBodyPart B on IncExam.BodyPartID=B.BodyPartID Thanks in Advance Meeran
3
[ 2, 184, 107, 31, 1065, 195, 38, 249, 4444, 255, 25597, 20, 6294, 1251, 800, 3726, 3726, 31, 57, 20, 8406, 21, 249, 4444, 255, 25597, 77, 6294, 1251, 92, 42, 2247, 448, 55, 20, 2058, 70, 48, 5407, 4421, 11796, 22141, 18, 5221, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Updtaing a QProgressbar from a different Thread === I have developed my own hybrid stream cipher and for the GUI i am using Qt. Initially i wrote it on a single thread but it being a stream cipher was making GUI dysfunctional when operating on large files. So i shifted the encryption/decryption to a separate Qthread. Also to show the progress i included a standard QProgressbar onto the GUI. But when I run the File I/O the encryption/decryption works perfectly but the progress bar doesn't update properly. After the whole operation completes, the progress bar suddenly goes from 0% to 100% showing that it didn't get the chance to update during the operation. For the code, I emitted the completed percentage from the FileCrypto to the main GUI thread onto the QProgressbar's setValue(int) slot. Since it didn't work I also tried to sent a int poitner over to the FileCrypto thread whilst updating the pointer with the percentage and using a QTimer on the GUI thread to check the value of the int value locally and update the progress bar but still I got the exact same result. Here is my code: The FileCrypto class: #include <QThread> #include <QFile> #include <PolyVernam.h> //my algo header class FileCrypto : public QThread { Q_OBJECT public: FileCrypto(QString, QString, int); bool stopIt; protected: void run(); signals: void completed(int); void msg(QString); void pathMsg1(QString); void pathMsg2(QString); void keyMsg(QString); private: QFile src, dest; QString tag; int mode; qint64 length; PolyVernam pv; }; The Code: #include <FileCrypto.h> FileCrypto::FileCrypto(QString input, QString keyFile, int mode) { stopIt = false; this->mode = mode; src.setFileName(input); if(mode == 1) { emit msg("Current Encryption/Decryption status: Encrypting file... :D:D"); tag = "-encrypted"; pv.setMode("encrypt", ""); } else { emit msg("Current Encryption/Decryption status: Decrypting file... :D:D"); tag = "-decrypted"; pv.setMode("decrypt", keyFile); } dest.setFileName(QFileInfo(src).absolutePath() + "/" + QFileInfo(src).baseName() + tag + "." + QFileInfo(src).completeSuffix()); length = src.bytesAvailable(); } void FileCrypto::run() { qint64 done = 0; quint8 r, outChar; char ch; QDataStream in(&src); in.setVersion(QDataStream::Qt_4_7); src.open(QIODevice::ReadOnly); QDataStream out(&dest); out.setVersion(QDataStream::Qt_4_7); dest.open(QIODevice::WriteOnly); while(!in.atEnd() && !stopIt) { done++; in >> r; ch = char(r); if(mode == 1) outChar = pv.encrypt(QString(ch)).at(0).toAscii(); else outChar = pv.decrypt(QString(ch)).at(0).toAscii(); out << outChar; emit completed(int((done / length) * 100)); } src.close(); dest.close(); if(stopIt) this->exit(0); if(mode == 1) { emit pathMsg1(QFileInfo(src).absoluteFilePath()); emit pathMsg2(QFileInfo(dest).absoluteFilePath()); } else { emit pathMsg1(QFileInfo(dest).absoluteFilePath()); emit pathMsg2(QFileInfo(src).absoluteFilePath()); } emit keyMsg(pv.keyFilePath); emit msg("Current Encryption/Decryption status: Idle... :'("); } This is how I am making the thread and connecting it on the main GUI thread: FileCrypto *fc = new FileCrypto(ui->lineEdit_4->text(), "", 1); connect(fc, SIGNAL(completed(int)), ui->progressBar, SLOT(setValue(int))); connect(fc, SIGNAL(msg(QString)), ui->statusBar, SLOT(showMessage(QString))); connect(fc, SIGNAL(pathMsg1(QString)), ui->lineEdit_4, SLOT(setText(QString))); connect(fc, SIGNAL(pathMsg2(QString)), ui->lineEdit_5, SLOT(setText(QString))); connect(fc, SIGNAL(keyMsg(QString)), ui->lineEdit_2, SLOT(setText(QString))); connect(fc, SIGNAL(keyMsg(QString)), this, SLOT(done())); If I don't update the progress bar i.e. don't emit the percentage, the process happens much faster. I also tried printing the percentage. It slows it down like hell but the values are fine. Also can you suggest a way to change it to buffered IO.... Any sort of help is much appreciated here.......
0
[ 2, 71, 43, 536, 68, 21, 2593, 2740, 13026, 1850, 37, 21, 421, 9322, 800, 3726, 3726, 31, 57, 885, 51, 258, 6957, 3766, 23525, 17, 26, 14, 9457, 31, 589, 568, 2593, 38, 9, 1537, 31, 738, 32, 27, 21, 345, 9322, 47, 32, 142, 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...
Mean Square Error Vs Iteratation for CMA, MMA and LMS algorithm === I need the matlab code to get the mean square error vs the iteration curve for different adaptive algorithm like constant modulus algorithm (CMA), Multi Modulus algorithm (MMA) and Least Mean square algorithm. anyone please help. i need it urgently.
1
[ 2, 884, 735, 7019, 4611, 32, 2615, 8593, 26, 2390, 58, 15, 13, 11651, 17, 13, 10363, 18, 9083, 800, 3726, 3726, 31, 376, 14, 4277, 9086, 1797, 20, 164, 14, 884, 735, 7019, 4611, 14, 23534, 7101, 26, 421, 22142, 9083, 101, 3587, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Jersey - Maven (Quickstart) Project for Client === I just found a command for creating the core service: mvn archetype:generate -DarchetypeCatalog=http://download.java.net/maven/2 Is there any maven command for creating explicit a jersey client?
0
[ 2, 2134, 13, 8, 1216, 3124, 13, 5, 25865, 13680, 6, 669, 26, 6819, 800, 3726, 3726, 31, 114, 216, 21, 1202, 26, 2936, 14, 2884, 365, 45, 17967, 103, 13, 21943, 4474, 45, 17083, 1373, 13, 8, 43, 21943, 4474, 9709, 5567, 3726, 211...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Use environment var in compiler arguments on a Flashbuilder project === In the compiler options of my flashbuilder project, i'm trying to do this : -define+=CONFIG::dev,${MY_VAR} As MY_VAR would be a variable related to the environment and not to the project (so each developer on the project can define his value of MY_VAR). I tried to find a way in flashbuilder, or by setting an os var in windows, but without success, any idea ?
0
[ 2, 275, 2307, 4033, 19, 21486, 10553, 27, 21, 4433, 20904, 669, 800, 3726, 3726, 19, 14, 21486, 6368, 16, 51, 4433, 20904, 669, 15, 31, 22, 79, 749, 20, 107, 48, 13, 45, 13, 8, 546, 7509, 2430, 3726, 14093, 2816, 45, 45, 14438, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Ajax post doesn't call webmethod in the page === Here is my script code: <script type="text/javascript"> $(document).ready(function () { jQuery("#tblList").jqGrid({ url: 'MyCustomers.aspx/GetCustomerList', mtype: 'POST', datatype: 'json', postData: { searchString: '', searchField: '', searchOper: '' }, ajaxGridOptions: { contentType: "application/json" }, serializeGridData: function (postData) { var propertyName, propertyValue, dataToSend = {}; for (propertyName in postData) { if (postData.hasOwnProperty(propertyName)) { propertyValue = postData[propertyName]; if ($.isFunction(propertyValue)) { dataToSend[propertyName] = propertyValue(); } else { dataToSend[propertyName] = propertyValue; } } } return JSON.stringify(dataToSend); }, jsonReader: { root: "d.rows", page: "d.page", total: "d.total", records: "d.records" }, colNames: ['Id', 'Ad', 'Soyad', 'Telefon', 'Kullanıcı Adı', 'E-Posta'], colModel: [ { name: 'UserId', index: 'UserId', hidden: true }, { name: 'Name', index: 'Name', width: 100 }, { name: 'Surname', index: 'Surname', width: 400 }, { name: 'Telephone1', index: 'Telephone1', width: 100 }, { name: 'UserName', index: 'UserName', hidden: true }, { name: 'Email', index: 'Email', width: 100 } ], pager: '#tblPager', rowList: [10, 20, 30], sortname: 'UserId', sortorder: 'desc', rowNum: 10, loadtext: "Yukleniyor....", shrinkToFit: false, multiselect: false, emptyrecords: "Kayit Bulunamadi", autowidth: true, shrinkToFit: true, height: "400", rownumbers: true, //subGrid: true, caption: 'Müşterilerim' }); And here is webmethod code: [WebMethod] public static GridData GetCustomerList(string sidx, string sord, int page, int rows) { try { ... } } I put a breakpoint on GetCustomerList method but nothing happen.
0
[ 2, 20624, 678, 1437, 22, 38, 645, 2741, 5909, 1807, 43, 19, 14, 2478, 800, 3726, 3726, 235, 25, 51, 3884, 1797, 45, 13, 1, 8741, 1001, 3726, 7, 11969, 118, 1004, 1385, 8741, 7, 1, 5579, 5, 28132, 6, 9, 15193, 5, 22359, 13, 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...
threads is exiting my app === I'm trying to upload images to a php file, everything works, but sometimes when the site is getting slow to load our app start frizzing until the page is done loading so i thought about using threads to avoid such frizzing, but right now our app display and quit. I dont see any warnings or problem... it just enter the app and exist right away. Please help me out the code: -(void) source { NSData *imageData = UIImageJPEGRepresentation(imageView.image, 90); NSString *urlString = @"http://domain"; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request addValue:contentType forHTTPHeaderField:@"Content-Type"]; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\".jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imageData]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:body]; NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; our_label.text = [NSString stringWithFormat:@"%@", returnString]; } -(void)multithreading:(id)param{ [lock lock]; [self source]; [lock unlock]; } - (void) awakeFromNib { [NSThread detachNewThreadSelector:@selector(multithreading:) toTarget: [MainViewController class] withObject:nil]; }
0
[ 2, 20396, 25, 24999, 51, 4865, 800, 3726, 3726, 31, 22, 79, 749, 20, 71, 8294, 3502, 20, 21, 13, 26120, 3893, 15, 796, 693, 15, 47, 1030, 76, 14, 689, 25, 1017, 2276, 20, 6305, 318, 4865, 799, 6266, 5092, 68, 163, 14, 2478, 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...
Gradient boosting predictions in low-latency production environments? === Can anyone recommend a strategy for making predictions using a gradient boosting model in the <10-15ms range (the faster the better)? I have been using `R`'s `gbm` package, but the first prediction takes ~50ms (subsequent vectorized predictions average to 1ms, so there appears to be overhead, perhaps in the call to the C++ library). As a guideline, there will be ~10-50 inputs and ~50-500 trees. The task is classification and I need access to predicted probabilities. I know there are a lot of libraries out there, but I've had little luck finding information even on rough prediction times for them. The training will happen offline, so only predictions need to be fast -- also, predictions may come from a piece of code / library that is completely separate from whatever does the training (as long as there is a common format for representing the trees).
0
[ 2, 17442, 10419, 68, 13823, 18, 19, 708, 8, 8927, 8883, 637, 11246, 60, 800, 3726, 3726, 92, 1276, 12360, 21, 4427, 26, 544, 13823, 18, 568, 21, 17442, 10419, 68, 1061, 19, 14, 13, 1, 1036, 8, 1193, 79, 18, 978, 13, 5, 124, 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...
generic request with linq to entities and Type parameter === I want to make a linq to entities generic request for example I have public Dictionary<string, bool> IsObjectInBase(Type type) { MyEntityContainer context = new EntityContainer(); Dictionary<string, bool> isObjectInBaseDico = new Dictionary<string, bool> List<AnObject> objectList = callingAMethod(type.ToString()); foreach(AnObject object in objectList) { List<T> genericObjectList = context.type.ToList(); if(genericObject.Count > 0) { isObjectInDataBaseDico.Add(type.ToString(),true); } } return isAnObjectInDataBaseDico; } I cannot use the type parameter for my request with the database context, is anyone know if it's possible to make a generic linq to entities request?
0
[ 2, 12733, 3772, 29, 6294, 1251, 20, 12549, 17, 1001, 18906, 800, 3726, 3726, 31, 259, 20, 233, 21, 6294, 1251, 20, 12549, 12733, 3772, 26, 823, 31, 57, 317, 9186, 1, 11130, 15, 1607, 1823, 1, 25, 23793, 108, 8436, 5, 4474, 1001, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Mailer is not actually sending emails === I have just started learning ruby on rails and this was one of the tutorials i followed: http://railscasts.com/episodes/206-action-mailer-in-rails-3 I followed it to a T and I have yet to receive anything in my gmail account. Is it fair to assume some updates to ruby have changed how you do things? My best guess from reading everything over the net, the tutorial is missing actually setting the mailer to use smtp setting. Here are my smtp settings: ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "alexei.herokuapp.com", :user_name => "mygmailaccount", :password => "mygmailpassword", :authentication => "plain" :enable_starttls_auto => true } Could it be that i am still in local environment when testing this?
0
[ 2, 2240, 18, 4216, 106, 25, 52, 1121, 4907, 8517, 18, 800, 3726, 3726, 31, 57, 114, 373, 2477, 10811, 27, 2240, 18, 17, 48, 23, 53, 16, 14, 29724, 18, 31, 709, 45, 7775, 6903, 7301, 18, 6146, 18, 9, 960, 118, 13397, 18, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Rotate Image In Place With jQuery? === I am trying to make an image rotate in place with each click (the image is an old-fashioned TV knob). I cannot get it to work because: A. I am a newbie. B. I am frustrated. C. I have said the f-word out loud several times and cannot think logically in blind rage. Please be gentle with your words. I know you are all genius'. Thank you for any help. Here is the code below: ------------------------------------------------------ var value = 0 $("#img").rotate({ bind: { click: function(){ value +=90; $(this).rotate({ animateTo:value}) } } }); --------------------------------------------------------------------------
0
[ 2, 184, 20, 21448, 1961, 19, 209, 29, 487, 8190, 93, 60, 800, 3726, 3726, 31, 589, 749, 20, 233, 40, 1961, 21448, 19, 209, 29, 206, 10840, 13, 5, 124, 1961, 25, 40, 315, 8, 15016, 983, 14804, 6, 9, 31, 1967, 164, 32, 20, 170...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Japnese TTS on android === I have to develop an android app for Japan which has to use Text to Speech engine (Japnese TTS). When an android phone is sold in Japnese market are the users provided with a default Text to Speech engine in their language ? I know they can buy a TTS engine from market and programatically I have to place checks of TTS engine existence but I need to know if I can expect the engine installed by default on MOST OF THE PHONES I have to make a feasibility decision based on this Thanks,
0
[ 2, 3009, 306, 14107, 13, 38, 38, 18, 27, 13005, 800, 3726, 3726, 31, 57, 20, 2803, 40, 13005, 4865, 26, 1029, 56, 63, 20, 275, 1854, 20, 2974, 1406, 13, 5, 1004, 306, 14107, 13, 38, 38, 18, 6, 9, 76, 40, 13005, 1132, 25, 945...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
WCF proxy classes for java soap service === I need to create .net WCF Proxy stub based on WSDL which is describing java soap service. when I try to generate classes I get following error Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is depend ent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='mywsdl.wsdl']/wsdl:binding[@name='SomethingSoap12 '] XPath to Error Source: //wsdl:definitions[@targetNamespace='mywsdl.wsdl']/wsdl:service[@name='test']/wsdl:port[@name='SomethingSoap12'] It generates CS file but when I call service and look at the SOAP message it is different from what service expects.
0
[ 2, 11801, 410, 27188, 2684, 26, 8247, 6447, 365, 800, 3726, 3726, 31, 376, 20, 1600, 13, 9, 2328, 11801, 410, 27188, 21354, 432, 27, 619, 18, 8643, 56, 25, 7153, 8247, 6447, 365, 9, 76, 31, 1131, 20, 7920, 2684, 31, 164, 249, 70...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
I have made a Pygame program but when the sprites overlap it has a white outline on some of them === I am making a level editor for a game I am working on. I have it set up so that you can put a picture in a folder and it will split it from a 90x90 pix block to 9 30x30 pix blocks that can be used in the editor. The code that makes the 30x30 blocks looks like this: one = Image.new('RGBA',(30,30),(255,255,255,0)) two = Image.new('RGBA',(30,30),(255,255,255,0)) three = Image.new('RGBA',(30,30),(255,255,2550,0)) four = Image.new('RGBA',(30,30),(255,255,255,0)) five = Image.new('RGBA',(30,30),(255,255,255,0)) six = Image.new('RGBA',(30,30),(255,255,2550,0)) seven = Image.new('RGBA',(30,30),(255,255,2550,0)) eight = Image.new('RGBA',(30,30),(255,255,255,0)) nine = Image.new('RGBA',(30,30),(255,255,255,0)) for y in range(1,iy): print ((y/9)*10),"%" for x in range(1,ix): pixel = im.getpixel((x,y)) if y<30: if x<30: one.putpixel((x,y),pixel) elif x<60: four.putpixel((x-30,y),pixel) else: seven.putpixel((x-60,y),pixel) elif y <60: if x <30: two.putpixel((x,y-30),pixel) elif x <60: five.putpixel((x-30,y-30),pixel) else: eight.putpixel((x-60,y-30),pixel) else: if x < 30: three.putpixel((x,y-60),pixel) elif x < 60: six.putpixel((x-30,y-60),pixel) else: nine.putpixel((x-60,y-60),pixel) add = [im,one,two,three,four,five,six,seven,eight,nine] bdict[s]= add cd = os.getcwd()+'\\'+s +'\\' one.save(cd + s +'one.png') two.save(cd+s+'two.png') three.save(cd+s+'three.png') four.save(cd+s+'four.png') five.save(cd+s+'five.png') six.save(cd+s+'six.png') seven.save(cd+s+'seven.png') eight.save(cd+s+'eight.png') nine.save(cd+s+'nine.png') im.save(cd + fol) im = os.getcwd()+'\\'+fol one = os.getcwd()+'\\'+s+'one.png' two =os.getcwd()+'\\'+s+'two.png' three =os.getcwd()+'\\'+s+'three.png' four = os.getcwd()+'\\'+s+'four.png' five =os.getcwd()+'\\'+s+'five.png' six =os.getcwd()+'\\'+s+'six.png' seven =os.getcwd()+'\\'+s+'seven.png' eight =os.getcwd()+'\\'+s+'eight.png' nine =os.getcwd()+'\\'+s+'nine.png' add = [im,one,two,three,four,five,six,seven,eight,nine] bdict[s]= add maxes[0]+=1 when two blocks overlap, they have this strange white bar that only shows up around the top left and right blocks and the bottom left and right blocks. That looks like this: ![overlap error][1] [1]: http://i.stack.imgur.com/lcQK5.jpg The only other place that might have the error is where the code loads the sprites, here: grounds is an array containing the different rectangles while gsprites is an array containing the different sprites in the format that they are loaded by Pygame. for number in range(0,len(grounds)): cr = grounds[number] cr.left += xscroll cr.top += yscroll pygame.draw.rect(windowsurface,clear,cr) change = pygame.transform.scale(gsprites[number],(30,30)) windowsurface.blit(gsprites[number],cr) cr.left -= xscroll cr.top -= yscroll I am running windows vista 32 bit.
0
[ 2, 31, 57, 117, 21, 7103, 5128, 625, 47, 76, 14, 27902, 18, 15406, 32, 63, 21, 359, 11160, 27, 109, 16, 105, 800, 3726, 3726, 31, 589, 544, 21, 662, 1835, 26, 21, 250, 31, 589, 638, 27, 9, 31, 57, 32, 309, 71, 86, 30, 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...
PhoneGap with WCF Rest Reservice === so I have started with PhoneGap/Cordova (windows phone) and WCF Rest Services, however I am having problems on getting the Emulator to interact with the WCF Service. At first I was thinking that maybe the Emulator could not connect to the localhost WCF Service, so I published the WCF Service on an external host however the problem still occured.. i.e. still not able to make a call to the WCF Service. The code I have is shown below: The javascript file for the PhoneGap application is the following: function getAjax() { var jqxhr = $.ajax({ url: 'http://link.to.service.com/service1/', //headers: beforeSend: function (xhr) { //xhr.overrideMimeType('text/plain; charset=x-user-defined'); }, dataType: 'json' }) .done(function (data) { var element = document.getElementById('ajaxCall'); element.innerHTML = JSON.stringify(data, null, "\t"); }) .fail(function (xhr, status, error) { showError(error); }) .always(function () { showAlert("complete"); }); } Then the WCF Service contains the following method: [WebGet(UriTemplate = "")] public List<SampleItem> GetCollection() { return new List<SampleItem>() { new SampleItem() { Id = 1, StringValue = "Hello" } }; } Therefore, when the a call to the javascript method "getAjax" is done, the WCF Service method should be called however it keeps entering the fail function instead showing an error message 'undefined'. Is there something that I am missing out here? Thanks
0
[ 2, 1132, 1136, 306, 29, 11801, 410, 760, 302, 11449, 800, 3726, 3726, 86, 31, 57, 373, 29, 1132, 1136, 306, 118, 17213, 3496, 13, 5, 27508, 18, 1132, 6, 17, 11801, 410, 760, 687, 15, 207, 31, 589, 452, 1716, 27, 1017, 14, 3579, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Implement Algorithm to search short path in mysql from java === hi all i need to search a path between one point to second point i have in my mysql database a table of points that connect from point to other and i want build a search that if i want to go from 1 to 5 and in my database i have connect from 1 to 2 and 2 to 3 and 3 to 4 and 4 to 5. and its should return my the list of the paths. public List<Conniction> findPath(int one,int two){ List<Conniction> list = new ArrayList<Conniction>(); Connection c = null; String sql = "SELECT * FROM conniction WHERE oneid="+one+"&& twoid="+two; try { c = ConnectionHelper.getConnection(); Statement s = c.createStatement(); ResultSet rs = s.executeQuery(sql); // ResultSetMetaData metaData = rs.getMetaData(); int rowCount = rs.last() ? rs.getRow() : 0; System.out.println(rowCount); //direct result if (rowCount > 0) { System.out.println("Match one and two found!"); while (rs.next()) { list.add(processRow(rs)); } } else{ String sql2 = "SELECT * FROM conniction WHERE oneid="+one; s = c.createStatement(); rs = s.executeQuery(sql2); // metaData = rs.getMetaData(); int rowCount2 = rs.last() ? rs.getRow() : 0; System.out.println(rowCount); if (rowCount2 > 0) { System.out.println("One Match found!"); while (rs.next()) { list.add(processRow(rs)); } } } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } the first option return the path of if one and two have a direct path and the second option should check by others points from one to X point and then check if two and if not go from X to X2 ....
0
[ 2, 184, 20, 8713, 9083, 20, 2122, 502, 2013, 19, 51, 18, 22402, 37, 8247, 800, 3726, 3726, 4148, 65, 31, 376, 20, 2122, 21, 2013, 128, 53, 454, 20, 153, 454, 31, 57, 19, 51, 51, 18, 22402, 6018, 21, 859, 16, 819, 30, 6379, 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...