unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
IOS: Storyboard and side menu as facebook app === How do I create a hidden menu with storyboard and Navigation Controller? Thank you!
0
[ 2, 13, 7760, 45, 609, 2806, 17, 270, 11379, 28, 9090, 4865, 800, 3726, 3726, 184, 107, 31, 1600, 21, 3689, 11379, 29, 609, 2806, 17, 8368, 9919, 60, 3531, 42, 187, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Draw 9 patch dotted /dashed line on Android === Google doesn't help me find a solution ofmy problem. (As far I was looking for...). I want to know if it's possible to draw dotted line with 9 patch capabilities on Android. My goal is to draw dotted line from a layout to another one. I touhgt about 9 patch because i want the dotted line to be the same in every Activities. (not to be stretched). Is that possible ? Or maybe is there a better solution ? Here an exemple (with a solid line) of what i would like : http://hpics.li/866bb56 Thanks
0
[ 2, 2003, 561, 7331, 23696, 13, 118, 593, 7399, 293, 27, 13005, 800, 3726, 3726, 8144, 1437, 22, 38, 448, 55, 477, 21, 4295, 16, 915, 1448, 9, 13, 5, 472, 463, 31, 23, 699, 26, 9, 9, 9, 6, 9, 31, 259, 20, 143, 100, 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...
Default Google Map Using Geo in Android === I'm using following code to locate location on default google map. Uri uri = Uri.parse("geo:"+ Global.detail_lat+","+Global.detail_long+"?z=15"); Intent in = new Intent(Intent.ACTION_VIEW, uri); startActivity(in); But using this code, when map will be open, there is no any point or mark or pin has been displayed on that location. It just looks like simple map only. How can i push pin on it? or how can i highlight that location on this default google map using this code? Thanks, Jay Patel
0
[ 2, 12838, 8144, 2942, 568, 6389, 19, 13005, 800, 3726, 3726, 31, 22, 79, 568, 249, 1797, 20, 12717, 1474, 27, 12838, 8144, 2942, 9, 13, 3594, 13, 3594, 800, 13, 3594, 9, 3574, 870, 5, 7, 834, 111, 45, 7, 2430, 2062, 9, 546, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Oracle SQL - Find special cars in field === Hpw can I identify the datas that have anything else than a number in them in a where clause ?
0
[ 2, 15759, 4444, 255, 13, 8, 477, 621, 2137, 19, 575, 800, 3726, 3726, 5301, 499, 92, 31, 5808, 14, 1054, 18, 30, 57, 602, 962, 119, 21, 234, 19, 105, 19, 21, 113, 9040, 13, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
PHP Checking input with isset === In order to check if an input field is empty or has any value, will the following both methods work in same way? Or is any of them better than other? if ($options['url']) { .. } **Or** if ( isset ($options['url']) && ($options['url']!="") ) { .. }
0
[ 2, 13, 26120, 9886, 6367, 29, 25, 3554, 800, 3726, 3726, 19, 389, 20, 2631, 100, 40, 6367, 575, 25, 2424, 54, 63, 186, 1923, 15, 129, 14, 249, 156, 3195, 170, 19, 205, 161, 60, 54, 25, 186, 16, 105, 574, 119, 89, 60, 100, 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...
Android: Hiding and Showing CheckBoxPreference === I have a **PreferenceScreen** with multiple **PreferenceCategory** that have many **CheckBoxPreferences** in them. I'm trying to create an expandable list concept by hiding or displaying a category on click of the preference category label. I can implement the click listener but there's no way to set the visibility for a **CheckBoxPreference** as far as I know apart from using **addPreference** and **removePreference** but since the layout is completely built in xml (required to do so) I can not add preferences to the correct category without causing force closes. Is there a way instead to somehow treat the **CheckBoxPreference** as a **View** and change its visibility to GONE or VISIBLE as needed? Or is there an alternate method to accomplish what I'm trying to do? Thanks.
0
[ 2, 13005, 45, 5314, 17, 3187, 2631, 5309, 306, 28018, 800, 3726, 3726, 31, 57, 21, 13, 1409, 306, 28018, 7187, 1409, 29, 1886, 13, 1409, 306, 28018, 14375, 93, 1409, 30, 57, 151, 13, 1409, 12542, 5309, 306, 28018, 18, 1409, 19, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
OpenCV PCA project loses precision === i've a problem on my OpenCV program: i'm performing PCA on a Floating Point Mat, all well, but when i do projection on the PCA Subspace (still on a floating point Mat) it loses precision and fails to train the CvKnearest classifier....here's my code Mat dati (db.size(), SIZE*SIZE, CV_32FC1 ); for (int i = 0; i < db.size(); i++) { //copy images to Mat, converting to float Mat aux = dati.row(i); db[i].reshape(1,1).convertTo(aux, CV_32FC1, 1/255.); } //performing PCA PCA pca(dati,Mat(),CV_PCA_DATA_AS_ROW,COMPONENTIPRINCIPALI); Mat PCASubSpace(db.size(), COMPONENTIPRINCIPALI, CV_32FC1); //Projecting on Subspace pca.project(dati, PCASubSpace); //CvKnearest train knn->train(PCASubSpace, trainClasses); When i do a nearest search i got this error: Bad argument (Input samples must be floating-point matrix (<num_samples>x<var_count>)) in find_nearest Thanks!
0
[ 2, 368, 12732, 5168, 58, 669, 14745, 13133, 800, 3726, 3726, 31, 22, 195, 21, 1448, 27, 51, 368, 12732, 625, 45, 31, 22, 79, 2955, 5168, 58, 27, 21, 8319, 454, 4277, 15, 65, 134, 15, 47, 76, 31, 107, 11607, 27, 14, 5168, 58, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to convert string into int array === Hello how to convert String into int array. I tried that but id did not work. String s = "Alice"; int[] tab = s.getBytes();
0
[ 2, 184, 20, 8406, 3724, 77, 19, 38, 7718, 800, 3726, 3726, 10975, 184, 20, 8406, 3724, 77, 19, 38, 7718, 9, 31, 794, 30, 47, 4924, 144, 52, 170, 9, 3724, 13, 18, 800, 13, 7, 58, 11909, 7, 73, 19, 38, 2558, 500, 6523, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
Javascript & Php Checksum or Similar === Had a look around and couldn't seem to find anything to simple.. Basicly im sending my JSON object from JavaScript to my PHP script over intranet. I want to be able to check sum the JSON in JavaScript before I send it, and have the PHP return its checksum once its received it. And if both checksums are the same alert the user saying "Verified and valid" or else saying "Something went wrong" Even a simple function out of a library? Nothing to complicated as the whole point is speed. Current I send my JSON and get the PHP to send them back and if there === then its verified. But I don't think this is the best way. Thanks
0
[ 2, 8247, 8741, 279, 13, 26120, 16602, 723, 54, 835, 800, 3726, 3726, 41, 21, 361, 140, 17, 711, 22, 38, 2260, 20, 477, 602, 20, 1935, 9, 9, 2125, 102, 797, 4907, 51, 487, 528, 3095, 37, 8247, 8741, 20, 51, 13, 26120, 3884, 84,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
YouTube JSON Pagination (jQuery) === I'm trying to create a function that load 15 new results and append them below the results previously loaded with jQuery, is there a way? Javascript: $(document).ready(function() { startindex = 1; loadmore = 15; src = "https://gdata.youtube.com/feeds/api/videos?category=games&alt=json-in-script&max-results=12&start-index=" + startindex; $.ajax({ dataType: "jsonp", url: src, success: function(data, textStatus, jqXHR) { if (data.feed && data.feed.entry) { var list = []; $.each(data.feed.entry, function(i, e) { list.push([ '<li class="video">', '<img src="http://img.youtube.com/vi/' + e.id.$t + '/default.jpg" />', '<a href="' + e.link[1].href + '">', '<span>' + e.title.$t + '</span>', '</a>', '<span>' + e.author[0].name.$t + '</span>', '</li>' ].join("")); }); $("#list").html(list.join("")); } } }); function loadMore() { var startindex = parseInt(startindex) + parseInt(loadmore); } }); HTML: <ol id="list"></ol>
0
[ 2, 7330, 487, 528, 19006, 108, 857, 13, 5, 728, 8190, 93, 6, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 1990, 30, 6305, 357, 78, 1736, 17, 4865, 2451, 105, 1021, 14, 1736, 1343, 8572, 29, 487, 8190, 93, 15, 25, 80, 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...
Loading data in bulk from Python === We are runnning a Python app that connects using pymssql module, on Ubuntu. We want to save rows in bulk, using TVPs. Somehow we were not able to find a working example. Has anyone invoked stored procedures with TVPs via pymssql?
0
[ 2, 12797, 1054, 19, 7238, 37, 20059, 800, 3726, 3726, 95, 50, 485, 103, 2981, 21, 20059, 4865, 30, 8534, 568, 7103, 79, 18, 18, 22402, 12613, 15, 27, 287, 12968, 2473, 9, 95, 259, 20, 2079, 11295, 19, 7238, 15, 568, 983, 1919, 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...
Pointing a specific part of the table when app is opened === I am developing an app in windows using Qt. This app displays a table that contains some data. Depending on the time a certain row is highlighted. The window size of the application is fixed. The number of rows exceed the height of the window, so we have to scroll down to see the whole table. I want to acheive this: when i open the application it should show me that part of the table where the highlighted row is visible. I shouldn't get the need to scroll up or down to search for the highlighted row. But the order of the rows must remain same. How do you do that?
0
[ 2, 6832, 21, 1903, 141, 16, 14, 859, 76, 4865, 25, 520, 800, 3726, 3726, 31, 589, 3561, 40, 4865, 19, 1936, 568, 2593, 38, 9, 48, 4865, 9412, 21, 859, 30, 1588, 109, 1054, 9, 4758, 27, 14, 85, 21, 1200, 3131, 25, 12528, 9, 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...
MongoDB Schema Design for Analytic or Trending Dashboard === Currently working on a POC to migrate from a RDBMS and evaluating MongoDB, in the process of doing the schema and would like to ensure it meets our needs. Some background - We process +-100,000 files per a day - About 10 different file types (which would go into different collections) - +100million records per a day - Files are Pipe Delimited Text - Will Use python to load the data - Each file contains between 100-250 fields Current Setup - Each file type gets loaded into it's own table (Which is partitioned by day) i.e File Type A would be in FileA (Partition 20120701) File Type B would be in FileB (Partition 20120701) etc. - We run a job to summarize the data every 5-10 minutes (for hourly trending) - We run a job to summarize the data daily (for daily trending) - No joins etc are done on the data I have included a trimmed file (removed fields and records) of the source data, as well 4 different options to structure the data. My current design would be: 1. Collection per a day for each file type (detailed records) i.e FileA_20120701 FileB_20120701 2. Collection per month for hourly summarized data , will include all file types records i.e Hourly_usage_201207 3. Collection per a year for daily summarized data , will include all file type records i.e Daily_usage_2012 So : Map Reduce For Hourly > Map Reduce for Daily Right now I am focusing on how to store the detailed records, please take a look at the raw data provided in files: SERIAL TIMESTAMP CUSTOMER_ID RESERVED01 PRODUCT_ID CUSTOMER_TYPE CUSTOMER_STATE ChargeAmount_OF_UNITS ChargeAmount_OF_FUND ChargeAmount_FROM_ACCOUNT1 ACCOUNT1_BALANCE ChargeAmount_FROM_ACCOUNT2 ACCOUNT2_BALANCE WalletType1 UnitType1 ChargeAmount1 WalletBalance1 WalletType2 UnitType2 ChargeAmount2 WalletBalance2 WalletType3 UnitType3 ChargeAmount3 WalletBalance3 Bonus1 Bonus2 Bonus3 AddtionaInfo 379120186 20120701235122 1345567 0 555 0 1000000 0 0 5 664 0 0 200 1 5 664 0 0 0 0 0 0 0 0 1234 379120190 20120701235124 1345568 0 1 0 1000000 0 0 4 108 0 0 200 1 4 108 0 0 0 0 0 0 0 0 379120197 20120701235132 1345569 0 4 0 1000000 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 379120203 20120701235136 1345570 0 1 0 1000000 0 0 0 346 0 0 0 0 0 0 0 0 0 0 0 0 0 0 XXX 379120207 20120701235138 1345571 0 10 0 1000000 0 0 0 0 3 100 200 1 3 100 500 2 10 0 610 2 20 80 10 379120208 20120701235138 1345571 0 1 0 1000000 0 0 3 306 0 0 200 1 3 306 0 0 0 0 0 0 0 0 379120211 20120701235141 1345573 0 1 0 1000000 0 0 0 181 0 0 0 0 0 0 0 0 0 0 0 0 0 0 379120213 20120701235143 3101015742206 0 349 1 1000001 0 0 0 274 0 0 0 0 0 0 0 0 0 0 0 0 0 0 379120214 20120701235144 3101015742206 0 349 1 1000001 0 0 0 0 120 680 210 1 37 0 200 18 120 680 0 0 0 0 379120215 20120701235147 3101015742206 0 349 1 1000001 0 0 0 992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 379120217 20120701235147 3101015742206 0 349 1 1000001 0 2 0 1 0 0 400 3 2 1766 0 0 0 0 0 0 0 0 379120223 20120701235149 3101015742206 0 349 1 1000001 0 0 11 196 0 0 200 1 11 196 0 0 0 0 0 0 0 0 379120229 20120701235153 1345579 0 349 3 1000000 0 0 40 707 0 0 200 1 40 707 0 0 0 0 0 0 0 0 20 5 XXX 379120230 20120701235153 3101015742206 0 349 1 1000001 0 0 9 1702 0 0 200 1 9 1702 0 0 0 0 0 0 0 0 379120232 20120701235153 1345581 0 349 2 1000000 0 0 150 59 0 0 200 1 150 59 0 0 0 0 0 0 0 0 379120237 20120701235158 1345582 0 1 2 1000000 0 0 3 303 0 0 200 1 3 303 0 0 0 0 0 0 0 0 379120241 20120701235202 538552582 0 14 0 1000000 0 0 0 779 10 777 210 1 150 200 0 0 0 0 0 0 0 0 YYY 379120245 20120701235206 538552582 0 14 0 1000000 0 0 3 300 0 0 200 1 3 300 0 0 0 0 0 0 0 0 379120248 20120701235206 538552582 0 14 0 1000000 0 0 155 202 0 0 200 1 155 202 0 0 0 0 0 0 0 0 379120250 20120701235208 538552582 0 14 0 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 **data1.json structure :** just loads the data from the CSV without any transformation, removing nulls etc. This would not be ideal, but quickest processing time [ { 'SERIAL': 379120186, 'TIMESTAMP': 20120701235122, 'CUSTOMER_ID': 1345567, 'RESERVED01': 0, 'PRODUCT_ID': 555, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 5, 'ACCOUNT1_BALANCE': 664, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'WalletType1': 200, 'UnitType1': 1, 'ChargeAmount1': 5, 'WalletBalance1': 664, 'WalletType2': 0, 'UnitType2': 0, 'ChargeAmount2': 0, 'WalletBalance2': 0, 'WalletType3': 0, 'UnitType3': 0, 'ChargeAmount3': 0, 'WalletBalance3': 0, 'Bonus1': '', 'Bonus2': '', 'Bonus3': '', 'AddtionaInfo': '1234' }, { 'SERIAL': 379120203, 'TIMESTAMP': 20120701235136, 'CUSTOMER_ID': 1345570, 'RESERVED01': 0, 'PRODUCT_ID': 1, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 346, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'WalletType1': 0, 'UnitType1': 0, 'ChargeAmount1': 0, 'WalletBalance1': 0, 'WalletType2': 0, 'UnitType2': 0, 'ChargeAmount2': 0, 'WalletBalance2': 0, 'WalletType3': 0, 'UnitType3': 0, 'ChargeAmount3': 0, 'WalletBalance3': 0, 'Bonus1': '', 'Bonus2': '', 'Bonus3': '', 'AddtionaInfo': XXX }, { 'SERIAL': 379120207, 'TIMESTAMP': 20120701235138, 'CUSTOMER_ID': 1345571, 'RESERVED01': 0, 'PRODUCT_ID': 10, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 0, 'ChargeAmount_FROM_ACCOUNT2': 3, 'ACCOUNT2_BALANCE': 100, 'WalletType1': 200, 'UnitType1': 1, 'ChargeAmount1': 3, 'WalletBalance1': 100, 'WalletType2': 500, 'UnitType2': 2, 'ChargeAmount2': 10, 'WalletBalance2': 0, 'WalletType3': 610, 'UnitType3': 2, 'ChargeAmount3': 20, 'WalletBalance3': 80, 'Bonus1': 10, 'Bonus2': '', 'Bonus3': '', 'AddtionaInfo': '' } ] **data2.json structure:** removes empty values. Values from the charging fields (WalletType1-3) where no charging occurred (Wallet ID = 0) is removed. Only wallets that were affected are kept. [ { 'SERIAL': 379120186, 'TIMESTAMP': 20120701235122, 'CUSTOMER_ID': 1345567, 'PRODUCT_ID': 555, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 5, 'ACCOUNT1_BALANCE': 664, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'WalletType1': 200, 'UnitType1': 1, 'ChargeAmount1': 5, 'WalletBalance1': 664, 'AddtionaInfo': 1234 }, { 'SERIAL': 379120203, 'TIMESTAMP': 20120701235136, 'CUSTOMER_ID': 1345570, 'RESERVED01': 0, 'PRODUCT_ID': 1, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 346, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'AddtionaInfo': 'XXX' }, { 'SERIAL': 379120207, 'TIMESTAMP': 20120701235138, 'CUSTOMER_ID': 1345571, 'RESERVED01': 0, 'PRODUCT_ID': 10, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 0, 'ChargeAmount_FROM_ACCOUNT2': 3, 'ACCOUNT2_BALANCE': 100, 'WalletType1': 200, 'UnitType1': 1, 'ChargeAmount1': 3, 'WalletBalance1': 100, 'WalletType2': 500, 'UnitType2': 2, 'ChargeAmount2': 10, 'WalletBalance2': 0, 'WalletType3': 610, 'UnitType3': 2, 'ChargeAmount3': 20, 'WalletBalance3': 80, 'Bonus1': 10, } ] **data3.json structure:** removes empty strings, Values from charging are inserted into the key 'Charging', with a list. The wallet type is used as the key, and the linked info for that wallet type is a further level down. Only Wallets are affected are being inserted. [ { 'SERIAL': 379120186, 'TIMESTAMP': 20120701235122, 'CUSTOMER_ID': 1345567, 'PRODUCT_ID': 555, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 5, 'ACCOUNT1_BALANCE': 664, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'CHARGING': [ { '200': { 'UnitType': 1, 'ChargeAmount': 5, 'WalletBalance': 664 } } ] , 'AddtionaInfo': '1234' }, { 'SERIAL': 379120203, 'TIMESTAMP': 20120701235136, 'CUSTOMER_ID': 1345570, 'RESERVED01': 0, 'PRODUCT_ID': 1, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 346, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'CHARGING' : [], 'AddtionaInfo': 'XXX' }, { 'SERIAL': 379120207, 'TIMESTAMP': 20120701235138, 'CUSTOMER_ID': 1345571, 'RESERVED01': 0, 'PRODUCT_ID': 10, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 0, 'ChargeAmount_FROM_ACCOUNT2': 3, 'ACCOUNT2_BALANCE': 100, 'CHARGING': [ { '200': { 'UnitType': 1, 'ChargeAmount': 3, 'WalletBalance': 100, } }, { '500': { 'UnitType': 2, 'ChargeAmount': 10, 'WalletBalance': 0, } }, { '610': { 'UnitType': 2, 'ChargeAmount': 20, 'WalletBalance': 80 } } ], 'Bonus1': 10, } ] **data4.json** removes empty strings, Charging values are put into 'Charging', however we keep it at this level and now use the key 'WalletType', once again only keeping those wallets that were affected. The List gives you the order in which they were charged. [ { 'SERIAL': 379120186, 'TIMESTAMP': 20120701235122, 'CUSTOMER_ID': 1345567, 'PRODUCT_ID': 555, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 5, 'ACCOUNT1_BALANCE': 664, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'CHARGING': [ { 'WalletType': '200', 'UnitType': 1, 'ChargeAmount': 5, 'WalletBalance': 664 } ] , 'AddtionaInfo': '1234' }, { 'SERIAL': 379120203, 'TIMESTAMP': 20120701235136, 'CUSTOMER_ID': 1345570, 'RESERVED01': 0, 'PRODUCT_ID': 1, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 346, 'ChargeAmount_FROM_ACCOUNT2': 0, 'ACCOUNT2_BALANCE': 0, 'CHARGING' : [], 'AddtionaInfo': 'XXX' }, { 'SERIAL': 379120207, 'TIMESTAMP': 20120701235138, 'CUSTOMER_ID': 1345571, 'RESERVED01': 0, 'PRODUCT_ID': 10, 'CUSTOMER_TYPE': 0, 'CUSTOMER_STATE': 1000000, 'ChargeAmount_OF_UNITS': 0, 'ChargeAmount_OF_FUND': 0, 'ChargeAmount_FROM_ACCOUNT1': 0, 'ACCOUNT1_BALANCE': 0, 'ChargeAmount_FROM_ACCOUNT2': 3, 'ACCOUNT2_BALANCE': 100, 'CHARGING': [ { 'WalletType': '200', 'UnitType': 1, 'ChargeAmount': 3, 'WalletBalance': 100, }, { 'WalletType': 500, 'UnitType': 2, 'ChargeAmount': 10, 'WalletBalance': 0, }, { 'WalletType': 610, 'UnitType': 2, 'ChargeAmount': 20, 'WalletBalance': 80 } ], 'Bonus1': 10, } ] **Note:** - When we summarize the data would like to see something similar to Date | Hour | Wallet 200 Total Charge| Wallet 500 Total Charge | Wallet 610 Total Charge - I have trimmed this, but the actual file has WalletType1-20 - The number in the field name WalletType(1), refers to the order of which wallets were charged (indicated by the Wallet ID's) i.e WalletType1 = 200, means first wallet 200 was charged etc. - The order in which they were charged is relevant when viewing the detailed records (nor for the summaries) - Any of the WalletType id's can appear anywhere in the wallet fields. i.e Wallet ID =200 can be populated in WalletType1 or WalletTyp2 etc, this is dependent on priority rules. **Questions:** - Which of the document structures would you recommend, and why? - What would be the pitfalls of the structures provided? - Do you have any further suggestions / other possible structures? - Any shading/partitioning recommendations?
0
[ 2, 3521, 5474, 220, 23874, 704, 26, 13, 19293, 54, 8703, 68, 26478, 800, 3726, 3726, 871, 638, 27, 21, 13, 23093, 20, 22985, 37, 21, 13, 897, 13178, 18, 17, 26764, 3521, 5474, 220, 15, 19, 14, 953, 16, 845, 14, 23874, 17, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get domain of the POST request via jQuery === I have a script that makes a ***POST*** request to my website from other websites (different domains) and I need to know if it's possible to get what's that other domain. Like: **helloworld.com** uses my script and it does the ***POST*** request with **mywebsite.com**. How does **mywebsite.com** know that the request is from **helloworld.com**? I have tried `$_SERVER['REMOTE_HOST']` but isn't working. Thanks and have a nice day :)
0
[ 2, 164, 4603, 16, 14, 678, 3772, 1197, 487, 8190, 93, 800, 3726, 3726, 31, 57, 21, 3884, 30, 1364, 21, 8980, 6962, 2483, 1409, 3772, 20, 51, 2271, 37, 89, 13931, 13, 5, 15782, 15544, 6, 17, 31, 376, 20, 143, 100, 32, 22, 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...
How to add a confirming pop up window in objective? === like JOptionPane in java, when user do something. and i ask for confirmation like, are you sure you want to delete file?? or whatever the case is. user confirms it then i detect what user has chosen between both buttons then i do something according to user choice is there anything like this in objective c ?? links plz and some guidelines thank you every one
0
[ 2, 184, 20, 3547, 21, 21472, 1675, 71, 1463, 19, 7038, 60, 800, 3726, 3726, 101, 2640, 306, 3309, 16660, 19, 8247, 15, 76, 4155, 107, 301, 9, 17, 31, 1349, 26, 15939, 101, 15, 50, 42, 562, 42, 259, 20, 27448, 3893, 60, 60, 54,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
View page tab when 'Using facebook as page' not working === If I try to view a page tab when 'using facebook as page', the iframe is blank. Is this the designed behavior? It's very confusing because I am trying to develop a page tab and was adding the page tab to a page then clicking 'use facebook as page' to see the page tab. I then would click the page tab and nothing would show up. For a long time I thought I was doing it wrong then I realized that no page tabs would work if I was "using facebook as page". Hope that doesn't sound too confusing.
0
[ 2, 1418, 2478, 6523, 76, 13, 22, 12655, 9090, 28, 2478, 22, 52, 638, 800, 3726, 3726, 100, 31, 1131, 20, 1418, 21, 2478, 6523, 76, 13, 22, 12655, 9090, 28, 2478, 22, 15, 14, 31, 8361, 25, 6463, 9, 25, 48, 14, 1006, 3257, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Video Capture using Callback showing error on orientation changed === I have created an app which works like this, it asks the user to select a video either he can do it by selecting from gallery or capturing video at that time only . for this I have written my code like this :- public class VideoQuestionActivity extends Activity implements View.OnClickListener, Callback { / Here I have declared my object like Button etc so omitting this from code / private Dialog myDialog; private Dialog videoDialog; private File videoFolder; private String videoFileName; private String selectedVideoPath; private Uri selectedVideoURI; private Bitmap bMap; private SurfaceView surfaceView; private SurfaceHolder surfaceHolder; private MediaPlayer mediaPlayer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.question); mCurrentSurvey =(Survey)getIntent().getSerializableExtra("CurrentSurvey"); mCurrentQuestion =(Question)getIntent().getSerializableExtra("CurrentQuestion"); Initialize(); } public void Initialize() { // This function initializes the objects like buttons, surface view media player so also omitting this just to keep the code simple } @Override public void onClick(View v) { // TODO Auto-generated method stub switch(v.getId()) { case R.id.btnQuestionTypeAction: getVideo(); break; case R.id.btn_live: Intent liveIntent= new Intent( android.provider.MediaStore.ACTION_VIDEO_CAPTURE); startActivityForResult(liveIntent,RESULT_CAPTURE_VIDEO); myDialog.dismiss(); break; case R.id.btn_gallery: Intent galIntent = new Intent(Intent.ACTION_GET_CONTENT); galIntent.setType("video/*"); startActivityForResult(galIntent,RESULT_LOAD_VIDEO); myDialog.dismiss(); break; case R.id.btnCancel: videoDialog.dismiss(); break; case R.id.btnOk: videoDialog.dismiss(); boolean sdcardAvailable = sdcardState(); if(sdcardAvailable) { videoFolder =new File(userFolderPath+"/Videos"); if(!videoFolder.exists()) { videoFolder.mkdir(); } CopyFile(selectedVideoPath,videoFolder.toString()); try { mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setDisplay(surfaceHolder); mediaPlayer.setDataSource(getApplicationContext(), selectedVideoURI); mediaPlayer.prepare(); mediaPlayer.start(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } Toast.makeText(getApplicationContext(),selectedVideoPath , Toast.LENGTH_LONG).show(); } else { Toast.makeText(getApplicationContext(),"SD Card not available", Toast.LENGTH_LONG).show(); } break; } } public void startIntentForController() { // this function calls another activity so omitting this from code. } @Override public void onBackPressed() { } private void getVideo() { boolean sdcardAvailable = sdcardState(); if(sdcardAvailable) { extStorageDirectory= Environment.getExternalStorageDirectory().getAbsolutePath().toString(); userFolderPath=extStorageDirectory+"/User"; File userFolder=new File(userFolderPath); if(!(userFolder.exists())) userFolder.mkdir(); dialogShow(); } else { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("SD Card unavailable.....") .setCancelable(false) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog alert = builder.create(); alert.show(); } } public boolean sdcardState() { sdcardState = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(sdcardState)) { // We can read and write the media return true; } else { // We can't read and write the media return false; } } public void dialogShow() { myDialog = new Dialog(VideoQuestionActivity.this); myDialog.setContentView(R.layout.picturecustomdialog); //Initializing the UI component of custom dialog TextView title = (TextView) myDialog.findViewById(R.id.lbl_photo); TextView subTitle = (TextView) myDialog.findViewById(R.id.lbl_source); Button gallery=(Button) myDialog.findViewById(R.id.btn_gallery); Button live=(Button) myDialog.findViewById(R.id.btn_live); //Setting the value to each UI component of custom dialog title.setText("Attach a Video"); subTitle.setText("Choose a source"); gallery.setText("Gallery"); live.setText("Capture"); myDialog.show(); gallery.setOnClickListener(this); live.setOnClickListener(this); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RESULT_LOAD_VIDEO && resultCode == RESULT_OK && data != null) { myDialog.dismiss(); Uri myVideo; myVideo= data.getData(); selectedVideoURI=myVideo; selectedVideoPath= getRealPathFromURI(myVideo); videoDialogshow(); } if (requestCode == RESULT_LOAD_VIDEO && resultCode == RESULT_CANCELED && data!= null) { finish(); } if (requestCode == RESULT_CAPTURE_VIDEO && resultCode == RESULT_OK) { myDialog.dismiss(); Uri myVideo; myVideo= data.getData(); selectedVideoURI=myVideo; selectedVideoPath= (getRealPathFromURI(myVideo)); videoDialogshow(); } if (requestCode == RESULT_CAPTURE_VIDEO && resultCode == RESULT_CANCELED ) { finish(); } if(resultCode==RESULT_CANCELED) { mCurrentSurvey.setSurveyQuestionIndex(mCurrentSurvey.getSurveyQuestionIndex()); startIntentForController(); } } public String getRealPathFromURI(Uri contentUri) { String imgAbsolutePath; String[] proj = { MediaStore.Video.Media.DATA }; Cursor cursor = managedQuery(contentUri, proj, null, null, null); int column_index = cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA); cursor.moveToFirst(); imgAbsolutePath=cursor.getString(column_index); return imgAbsolutePath; } public void videoDialogshow() { videoDialog = new Dialog(VideoQuestionActivity.this); videoDialog.setContentView(R.layout.mediacontaincustomdialog); //Initializing the UI component of custom dialog Button btnVideoCancel = (Button) videoDialog.findViewById(R.id.btnCancel); Button btnVideoOk = (Button) videoDialog.findViewById(R.id.btnOk); btnVideoCancel.setBackgroundResource(R.drawable.img_wrong); btnVideoOk.setBackgroundResource(R.drawable.img_right); //Setting the value to each UI component of custom dialog LinearLayout llMediaView =(LinearLayout) videoDialog.findViewById(R.id.llMediaView); final VideoView mediaVideoView=new VideoView(this); mediaVideoView.setVideoURI(selectedVideoURI); mediaVideoView.setMediaController(new MediaController(this)); mediaVideoView.requestFocus(); llMediaView.addView(mediaVideoView); videoDialog.show(); bMap = ThumbnailUtils.createVideoThumbnail(selectedVideoPath, MediaStore.Video.Thumbnails.MICRO_KIND); mediaVideoView.setBackgroundDrawable(new BitmapDrawable(getResources(), bMap)); mediaVideoView.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub mediaVideoView.start(); } }); btnVideoCancel.setOnClickListener(this); btnVideoOk.setOnClickListener(this); } public boolean CopyFile(String srcPath,String destPath) { //this function copies the file to a custom location in my sd card so also omitting this } @Override public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } @Override public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub } @Override public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub mediaPlayer.reset(); } @Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); mediaPlayer.release(); } } Now this code works fine on my phone, but whenever I change the orientation then my application crashes. Also In my manifest I have added the config changes attribute i.e :- android:configChanges="keyboardHidden|orientation" , i m putting my logcat , 07-05 20:26:09.203: E/AndroidRuntime(1907): FATAL EXCEPTION: main 07-05 20:26:09.203: E/AndroidRuntime(1907): java.lang.IllegalStateException 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.media.MediaPlayer._reset(Native Method) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.media.MediaPlayer.reset(MediaPlayer.java:1066) 07-05 20:26:09.203: E/AndroidRuntime(1907): at com.optimus.mobile.question.VideoQuestionActivity.surfaceDestroyed(VideoQuestionActivity.java:475) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.SurfaceView.reportSurfaceDestroyed(SurfaceView.java:568) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.SurfaceView.updateWindow(SurfaceView.java:472) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:206) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.View.dispatchDetachedFromWindow(View.java:6173) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1156) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewRoot.dispatchDetachedFromWindow(ViewRoot.java:1630) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewRoot.doDie(ViewRoot.java:2671) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.ViewRoot.die(ViewRoot.java:2641) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:218) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.view.Window$LocalWindowManager.removeViewImmediate(Window.java:436) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3684) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3789) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.app.ActivityThread.access$2400(ActivityThread.java:125) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2037) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.os.Handler.dispatchMessage(Handler.java:99) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.os.Looper.loop(Looper.java:123) 07-05 20:26:09.203: E/AndroidRuntime(1907): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-05 20:26:09.203: E/AndroidRuntime(1907): at java.lang.reflect.Method.invokeNative(Native Method) 07-05 20:26:09.203: E/AndroidRuntime(1907): at java.lang.reflect.Method.invoke(Method.java:521) 07-05 20:26:09.203: E/AndroidRuntime(1907): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 07-05 20:26:09.203: E/AndroidRuntime(1907): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 07-05 20:26:09.203: E/AndroidRuntime(1907): at dalvik.system.NativeStart.main(Native Method) any thoughts on How can I solve this?
0
[ 2, 763, 3683, 568, 645, 1958, 3187, 7019, 27, 10245, 1015, 800, 3726, 3726, 31, 57, 679, 40, 4865, 56, 693, 101, 48, 15, 32, 3913, 14, 4155, 20, 5407, 21, 763, 694, 24, 92, 107, 32, 34, 20764, 37, 2246, 54, 12859, 763, 35, 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...
Cross-frade for inline text elements with jQuery === I am looking for a way to properly animate/crossfade inline anchor elements with jQuery. There are several solutions out there for block elements, but nothing so far for inline-elements. My alternative text for each individual word comes from an attribute within the element: <a data-r="nerd">word</a>​ But if I try to fadeout, replace the text and fade in, like here: jQuery(document).ready(function($) { $('a').click(function(index) { $(this).fadeOut(500, function() { $(this).text($(this).attr("data-r")); }); $(this).fadeIn(500); }); });​ I am not getting the cross-fade effect that I would like, but a fadeout followed by a fade in, as you can see in this [demo][1]. I'd be very grateful for any tips you might have. [1]: http://jsfiddle.net/psychomachine/rYK3v/
0
[ 2, 919, 8, 8691, 546, 26, 19, 1143, 1854, 2065, 29, 487, 8190, 93, 800, 3726, 3726, 31, 589, 699, 26, 21, 161, 20, 7428, 14487, 591, 118, 7703, 1473, 546, 19, 1143, 6265, 2065, 29, 487, 8190, 93, 9, 80, 50, 238, 6776, 70, 80, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 make the pagination class in Codeigniter work with AJAX? === I have a table loaded via AJAX and along with the table the pagination is also loaded through AJAX. The table contains a list of all users on my site limited to 30 at a time. This is how I'm returning the response to the JavaScript from the controller: $users = $this->users_m->get_users($type, $offset); $num_rows = $this->users_m->user_stats($type); $config['per_page'] = 30; $config['num_links'] = 5; $config['total_rows'] = $num_rows[0]; $this->pagination->initialize($config); echo json_encode(array( 'users' => $users, 'pagination' => $this->pagination->create_links() )); All is well except the pagination is never correct. The first time it is but on subsequent requests it is not. When using the pagination class in a non AJAX page, the page number I click becomes the active one. Here page 1 is always active (surrounded by `<strong>` tags as opposed to being a link). Secondly the numbers never change. I get: [1] [2] [3] [4] [5] [6] [>] [Last >] every time. Even if I click last I get the same numbers back, it doesn't change. How to get the pagination class to work with AJAX?
0
[ 2, 184, 20, 233, 14, 19006, 108, 857, 718, 19, 1797, 9693, 242, 106, 170, 29, 20624, 60, 800, 3726, 3726, 31, 57, 21, 859, 8572, 1197, 20624, 17, 303, 29, 14, 859, 14, 19006, 108, 857, 25, 67, 8572, 120, 20624, 9, 14, 859, 158...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
AllFramesReady Repeating Loop === I am creating a program where you do rep of a stretch, so it adds one to amount of reps. I have this nested within the `AllFramesReadyEventArgs`. The problem is, since the SDK uses the `AllFramesReadyEvent` through out the whole program, it keeps repeating the same thing over and over even though I don't want it to. Thanks in advance. if (skeleton.TrackingState == SkeletonTrackingState.Tracked) { //int diff = (int)(Math.Abs(Canvas.GetLeft(pspine) - Canvas.GetLeft(ellipse1)) + (Math.Abs(Canvas.GetTop(pspine) - Canvas.GetTop(ellipse1)))); int whereIsX = (int)Canvas.GetLeft(ellipse1); int whereToX = (int)Canvas.GetLeft(pspine); whatToMultiplyX = whereToX / whereIsX; int whereIsY = (int)Canvas.GetTop(ellipse1); int whereToY = (int)Canvas.GetTop(pspine); whatToMultiplyY = whereToY / whereIsY; Canvas.SetTop(ellipse1, Canvas.GetTop(ellipse1) * whatToMultiplyY); Canvas.SetLeft(ellipse1, Canvas.GetLeft(ellipse1) * whatToMultiplyX); //if (diff < 50) { for (int i = 0; i < Doctor_ShoulderX.Count; i++) { Canvas.SetTop(doctorHand, Doctor_HandY[i] * whatToMultiplyY); Canvas.SetTop(doctorElbow, Doctor_ElbowY[i] * whatToMultiplyY); Canvas.SetTop(doctor_Shoulder, Doctor_ShoulderY[i] * whatToMultiplyY); Canvas.SetLeft(doctorHand, Doctor_HandX[i] * whatToMultiplyX); Canvas.SetLeft(doctorElbow, Doctor_ElbowX[i] * whatToMultiplyX); Canvas.SetLeft(doctor_Shoulder, Doctor_ShoulderX[i] * whatToMultiplyX); handX = Canvas.GetLeft(handright); handY = Canvas.GetTop(handright); elbowX = Canvas.GetLeft(elbowright); elbowY = Canvas.GetTop(elbowright); shoulderX = Canvas.GetLeft(shoulderright); shoulderY = Canvas.GetTop(shoulderright); shoulder_x.Text = "Shoulder X: " + shoulderX.ToString(); shoulder_y.Text = "Shoulder Y: " + shoulderY.ToString(); elbow_x.Text = "Elbow X: " + elbowX.ToString(); elbow_y.Text = "Elbow Y: " + elbowY.ToString(); hand_x.Text = "Hand X: " + handX.ToString(); hand_y.Text = "Hand Y: " + handY.ToString(); //shoulder_x.Text = "Doctor Shoulder X: " + dsX.ToString(); //shoulder_y.Text = "Doctor Shoulder Y: " + dsY.ToString(); //elbow_x.Text = "Doctor Elbow X: " + deX.ToString(); //elbow_y.Text = "Doctor Elbow Y: " + deY.ToString(); //hand_x.Text = "Doctor Hand X: " + dhandX.ToString(); //hand_y.Text = "Doctor Hand Y: " + dhandY.ToString(); Patient_HandX.Add(handX); Patient_HandY.Add(handY); Patient_ElbowX.Add(elbowX); Patient_ElbowY.Add(elbowY); Patient_ShoulderX.Add(shoulderX); Patient_ShoulderY.Add(shoulderY); } } }
0
[ 2, 65, 8361, 18, 15193, 17389, 5293, 800, 3726, 3726, 31, 589, 2936, 21, 625, 113, 42, 107, 9411, 16, 21, 6363, 15, 86, 32, 10621, 53, 20, 2006, 16, 9411, 18, 9, 31, 57, 48, 5618, 69, 363, 14, 13, 1, 1233, 8361, 18, 15193, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Syncing application to Android calendar === I am very new to Eclipse and developing generally. I have been looking for some days now, but I am still not able to find a question that is somewhat similar to this one. Please forgive me if a similar question has been asked. I am trying to develop an application for my my Android 4.0.3 tablet, that can help me keep track of what I have done today. I would like to have boxes I can check when I have for example walked or fed the dog. I managed to drag the checkboxes into my Activity screen, and I can check them when I run the .apk on my tablet. But once I close the application the boxes I checked will not be saved. I want the application to reset each day, so that I do not overfeed my dog. I am sincerely sorry for asking you this, but I do not know who else I can ask. I really hope you can help me out. Thank you very much! *Kindest regards from a friend.*
1
[ 2, 6063, 6302, 3010, 20, 13005, 7036, 800, 3726, 3726, 31, 589, 253, 78, 20, 11652, 17, 3561, 1469, 9, 31, 57, 74, 699, 26, 109, 509, 130, 15, 47, 31, 589, 174, 52, 777, 20, 477, 21, 1301, 30, 25, 4131, 835, 20, 48, 53, 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...
unchecking radio === I have some radio buttons in my html form here is code: slovenský<input type="radio" name="jazyk1" value="1" style="margin-right: 20px; margin-bottom: 15px;" /> český<input type="radio" name="jazyk1" value="2" style="margin-right: 20px; margin-bottom: 15px;" /> anglický<input type="radio" name="jazyk1" value="3" style="margin-right: 20px; margin-bottom: 15px;" /> <br /> nemecký<input type="radio" name="jazyk1" value="4" style="margin-right: 20px; margin-bottom: 15px;" /> francúzsky<input type="radio" name="jazyk1" value="5" style="margin-right: 20px; margin-bottom: 15px;" /> španielsky<input type="radio" name="jazyk1" value="6" style="margin-right: 20px; margin-bottom: 15px;" /> <br /> taliansky<input type="radio" name="jazyk1" value="7" style="margin-right: 20px; margin-bottom: 15px;" /> ruský<input type="radio" name="jazyk1" value="8" style="margin-right: 20px; margin-bottom: 15px;" /> maďarský<input type="radio" name="jazyk1" value="9" style="margin-right: 20px; margin-bottom: 15px;" /> <br /> poľský<input type="radio" name="jazyk1" value="10" style="margin-right: 20px; margin-bottom: 15px;" /> And i want to add there link to reset this radio buttons, but only this radio buttons, cause i have there more radio buttons in one form...Can you help me please?
0
[ 2, 367, 12542, 68, 603, 800, 3726, 3726, 31, 57, 109, 603, 12861, 19, 51, 13, 15895, 505, 235, 25, 1797, 45, 13, 18, 4583, 18051, 1, 108, 4881, 1001, 3726, 7, 11129, 7, 204, 3726, 7, 19622, 15579, 165, 7, 1923, 3726, 7, 165, 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...
Android Project === In my project there will be simply 3 points attached each other like a triangle. In three intersection points, two 2d graphic object will be placed and other would be free. I want to touch an object and slide it to next free point. object will be placed only in intersection points. Please help me out. Please suggest me what should be studied carefully.
0
[ 2, 13005, 669, 800, 3726, 3726, 19, 51, 669, 80, 129, 44, 1659, 203, 819, 3638, 206, 89, 101, 21, 8676, 9, 19, 132, 5351, 819, 15, 81, 172, 43, 8479, 3095, 129, 44, 1037, 17, 89, 83, 44, 551, 9, 31, 259, 20, 1723, 40, 3095, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bookmarking and page reloads with Backbone.js and pushState === I've been trying to get various routes bookmarkable within my app, and this is possible if I don't have pushState enabled. A user can enter mysite.com/#/view/30 and the proper view renders. However, if I were to enable pushState and go to mysite.com/view/30 I receive a parse error (navigating there via the root page works fine). I'm currently utilizing the Backbone.js Boilerplate using Require.js, and the parse error is appearing in my config.js file. I'm fairly certain the issue isn't with Require but I'm not completely sure. Frankly, I don't necessarily know what code to paste here either because I believe I'm more lacking a fundamental understanding a difference between hashbangs vs. pushState. I've read up on the HTML5 feature, however the answer to my specific question still eludes me.
0
[ 2, 360, 4527, 68, 17, 2478, 27339, 18, 29, 24036, 9, 728, 18, 17, 3250, 3859, 800, 3726, 3726, 31, 22, 195, 74, 749, 20, 164, 617, 5050, 360, 4527, 579, 363, 51, 4865, 15, 17, 48, 25, 938, 100, 31, 221, 22, 38, 57, 3250, 385...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Controlling hover area and CSS image sprites === Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain areas changes part of the image. All works fine but struggling with being able to control the area of the hover once you are over the hover area. For example, lets say the main area is 400x400 pixels and the hover area is 100x100 from the top left corner. As you move into the hover area, the 'new' image to display is 200x200. This appears but then this 'new' 200x200 image becomes active; I can then move anywhere within this new image (to say 150x150) and the hover image is still there even though now I am out of the 100x100 original hover area. Is there any way to restrain this so that the active area is always 100x100 even with the 200x200 hovered image displayed? My (cut-down) CSS (areaTest.css) is: #bigArea { width: 400px; height: 400px; background: url(areaImage.jpg) no-repeat; margin: 10px auto; padding: 0; position: relative; } #bigArea li { margin: 0; padding: 0; list-style: none; display: block; position: absolute; } #bigArea a { display: block; text-indent: -9999px; text-decoration: none; } #littleArea { width: 100px; height: 100px; } #littleArea a { width: 100px; height: 100px; } #littleArea a:hover { width: 200px; height: 200px; background: url(areaImage.jpg) 0px -410px no-repeat; } and my HTML is: <link href="areaTest.css" rel="stylesheet" type="text/css"> <div> <ul id="bigArea"> <li id="littleArea"><a href="#"></a></li> </ul> </div> Any help would be much appreciated. Thanks, Jam
0
[ 2, 10106, 21350, 217, 17, 272, 18, 18, 1961, 27902, 18, 800, 3726, 3726, 568, 21, 272, 18, 18, 1961, 27902, 15, 31, 22, 79, 2936, 40, 13, 22, 6280, 7889, 22, 1961, 113, 18503, 84, 1200, 924, 1693, 141, 16, 14, 1961, 9, 65, 693...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drop down list - PHP - SQL === I want to create 2 drop down lists to choose a value(a name, and a company) and these is to be set into the Database, and also be set into a calendar. Now i have a calendar allready(not mine though - i am a basic PHP user and i cannot OOP etc) and i dont know how to connect it this one. But that is not the foremost thing i want to do now. I also besides these 2 drop down lists, also a calendar in JavaScript(not to be confused with the real PHP calendar script!) wich is to set a DATE too for this form. I have no idea how to do this. I have so far put in data for some names and some copmanynames into the SQl database. But how should i do with this javascript calendar? (If someone want the javascript code to help just tell) The php script for the names: $sql = "SELECT kontaktperson FROM kontaktperson LIMIT 10"; $result = mysql_query($sql); echo "<select name='uppdrag'>"; while ($row = mysql_fetch_array($result)) { echo "<option value='" . $row['kontaktperson'] . "'> " . $count . " " . $row['kontaktperson'] . "</option>"; } echo "</select>";?> ..And the php script for the companys drop down(remember the names are set in database): $sql = "SELECT foretagsnamn FROM foretagsnamn LIMIT 10"; $result = mysql_query($sql); echo "<select name='uppdrag'>"; while ($row = mysql_fetch_array($result)) { echo "<option value='" . $row['foretagsnamn'] . "'> " . $count . " " . $row['foretagsnamn'] . "</option>"; } echo "</select>";
0
[ 2, 2804, 125, 968, 13, 8, 13, 26120, 13, 8, 4444, 255, 800, 3726, 3726, 31, 259, 20, 1600, 172, 2804, 125, 7227, 20, 3538, 21, 1923, 5, 58, 204, 15, 17, 21, 237, 6, 17, 158, 25, 20, 44, 309, 77, 14, 6018, 15, 17, 67, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 stripslashes after mysql_real_escape_string === I have to escape some inputs on a form. I used mysql_real_escape_string to escape the value but it adds a lot slashes with value inside database, the reason is i have an apostrophe in my input let us say exp's. Now to get rid of slashes, I use stripslashes after mysql_real_escape_string and then data goes to database successfully and don't see any apostrophe with value in database. $name = mysql_real_escape_string(trim($_POST['userame'])); $name = stripslashes(stripslashes($userame)); // then data goes to db successfully without apostrophe I just wanted to confirm, is this correct way of escaping the input value? Thanks Dayan
0
[ 2, 568, 15383, 9545, 160, 75, 51, 18, 22402, 1, 7467, 1, 62, 13109, 1, 11130, 800, 3726, 3726, 31, 57, 20, 2220, 109, 6367, 18, 27, 21, 505, 9, 31, 147, 51, 18, 22402, 1, 7467, 1, 62, 13109, 1, 11130, 20, 2220, 14, 1923, 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...
TinyTerm Wait is returning -2 (Ctrl-C) when it was not pressed === We have some nightly automation TinyTerm CScript written using Wait verb. In the last two months when running this nightly batch, the Wait verb has twice returned that the user pressed Ctrl-C and it stopped the batch. Has anyone run into this issue before where the Wait returned -2 and you are pretty sure the user did not press the Ctrl+C? Since this is an automated batch that is run pretty late at night, I am pretty sure the operator is not pressing Ctrl+C. I was wondering if holding down the Ctrl key while it ran would cause the issue is the letter C came through. That did not seem to be an issue. Here is ther function that is returning the message that it was pressed. Maybe someone can see an error in the code. function testwait(a_msg, t_mdmwait) { t_chk = te.wait(a_msg,t_mdmwait); if ((t_chk == -1)) { // timeout msgbox("'" + a_msg + "' not received","Wait Timed Out",0); quit(1); return(1); } else if ((t_chk == -2)) { // ^C typed msgbox("User pressed Ctrl-C. Cancelled Job","TinyTerm Terminated",0); quit(1); return(1); } else { // OK received return(0); } } Again this process is run nightly and it happened twice in the last two months. Thanks in advance. **Also, can someone create the following two tags and assign it to this posting? tinyterm tinyterm-csript** If you have 1500 rep, you will be able to create these two tags.
0
[ 2, 3228, 3964, 1760, 25, 2485, 13, 8, 135, 13, 5, 4812, 6362, 8, 150, 6, 76, 32, 23, 52, 2931, 800, 3726, 3726, 95, 57, 109, 343, 102, 23217, 3228, 3964, 272, 8741, 642, 568, 1760, 9504, 9, 19, 14, 236, 81, 818, 76, 946, 48,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 lose all jQuery function (click ecc) after append === I'm sending ajax request and i have appended the result on a div. After this append if i want to click on a link appended (exec jquery click function), why click function doesen't work? (Sorry for bad english :P )
0
[ 2, 31, 2926, 65, 487, 8190, 93, 1990, 13, 5, 150, 10129, 6695, 150, 6, 75, 4865, 2451, 800, 3726, 3726, 31, 22, 79, 4907, 20624, 3772, 17, 31, 57, 4865, 10726, 14, 829, 27, 21, 13, 12916, 9, 75, 48, 4865, 2451, 100, 31, 259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
want to display custome sort indicator in spark DataGrid? === i have data-grid in my application and i want to customize my data-grid so i made a renderer for column and header, but now a problem is that **i want to make custom indicator which indicate a sorted column**.? Thanks in advance!
0
[ 2, 259, 20, 3042, 5816, 62, 2058, 13310, 19, 9026, 1054, 16375, 60, 800, 3726, 3726, 31, 57, 1054, 8, 16375, 19, 51, 3010, 17, 31, 259, 20, 5816, 2952, 51, 1054, 8, 16375, 86, 31, 117, 21, 16535, 106, 26, 4698, 17, 157, 106, 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...
Reset javascript function === I am having trouble getting a javascript function to reset itself after an onclick event. When I click the "Start" button the counter begins to count up. But when I click the "Reset" button nothing happens. I need the timer to reset to "0:00" and wait for me to click "Start" again. Here is my code: <script type="text/javascript"> var seconds = 0; var minutes = 0; function zeroPad(time) { var numZeropad = time + ''; while(numZeropad.length < 2) { numZeropad = "0" + numZeropad; } return numZeropad; } function countSecs() { seconds++; if (seconds > 59) { minutes++; seconds = 0; } document.getElementById("timeBox").innerHTML = "Time " + zeroPad(minutes) + ":" + zeroPad(seconds); } function startTimer() { action = window.setInterval(countSecs,1000); } function resetTimer() { var seconds = 0; var minutes = 0; } </script> <body> <button onclick = "startTimer()">Start</button> <div id="timeBox">Time 00:00</div> <button onclick = "resetTimer">Reset</button> </body>
0
[ 2, 23422, 8247, 8741, 1990, 800, 3726, 3726, 31, 589, 452, 2572, 1017, 21, 8247, 8741, 1990, 20, 23422, 1145, 75, 40, 27, 150, 10129, 807, 9, 76, 31, 10840, 14, 13, 7, 13680, 7, 5167, 14, 2105, 2661, 20, 2468, 71, 9, 47, 76, 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...
Winsorize data in Pandas for Python === I am trying to run a Winsorized regression in Pandas for Python. The very helpful user manual offers this example code: winz = rets.copy() std_1year = rolling_std(rets, 250, min_periods=20) cap_level = 3 * np.sign(winz) * std_1year winz[np.abs(winz) > 3 * std_1year] = cap_level winz_model = ols(y=winz['AAPL'], x=winz.ix[:, ['GOOG']],window=250) The fourth line looks wrong to me: shouldn't the RHS be cap_level[np.abs(winz) > 3 * std_1year]? Thanks for the help! I'm still new to using the Pandas dataframe and want to make sure I'm understanding right.
0
[ 2, 4041, 248, 2952, 1054, 19, 16982, 18, 26, 20059, 800, 3726, 3726, 31, 589, 749, 20, 485, 21, 4041, 248, 1333, 27369, 19, 16982, 18, 26, 20059, 9, 14, 253, 15600, 4155, 5132, 2486, 48, 823, 1797, 45, 628, 380, 800, 13, 6239, 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...
Unnecessary use of variables === I am a little confused over why people recommend you use: long rantime = System.currentTimeMillis(); Random random = new Random(rantime); when we could use: Random random = new Random(System.currentTimeMillis()); Will the single line method fail? And if not, isn't it more efficient since you don't create a variable unnecessarily? Is it best practice to avoid using additional variables where possible?
0
[ 2, 16435, 275, 16, 12157, 800, 3726, 3726, 31, 589, 21, 265, 4230, 84, 483, 148, 12360, 42, 275, 45, 175, 717, 891, 800, 329, 9, 17657, 891, 8702, 403, 5, 6, 73, 5477, 5477, 800, 78, 5477, 5, 2195, 891, 6, 73, 76, 95, 110, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use a session variable or cookies === I have a main page with a large list of companies, I have a search button and if I want to find a company by state or city I can filter my search. I decide to filter my search by cities, lets say Chicago, and I get 10 companies as a result of my search. I click any company in that list and I go to the company details but I realize that is not the one I am looking for, so I want to go back to my 10 companies result list but instead I go back to the main company search interface and I have to re-start my search again. How to use a session variable or cookies for this case? Somebody can help me with this?
0
[ 2, 184, 20, 275, 21, 3723, 7612, 54, 19396, 800, 3726, 3726, 31, 57, 21, 407, 2478, 29, 21, 370, 968, 16, 1532, 15, 31, 57, 21, 2122, 5167, 17, 100, 31, 259, 20, 477, 21, 237, 34, 146, 54, 136, 31, 92, 11945, 51, 2122, 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 match the following output using regular expresion === The room information: singleRoom (male): 0x3 singleRoom (famle): 0x0 I want to match the second line of the output: singleRoom (male): 0x3 and get the value:0x3 which is hexadecimal. how to achieve it without using the "*" pattern?
0
[ 2, 184, 20, 730, 14, 249, 5196, 568, 1290, 1396, 11973, 872, 800, 3726, 3726, 14, 337, 676, 45, 345, 4447, 13, 5, 15210, 6, 45, 713, 396, 240, 345, 4447, 13, 5, 1473, 79, 413, 6, 45, 713, 396, 387, 31, 259, 20, 730, 14, 153,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Changing a cell's color while in "highlighted" state === How can I change the default (blue) color that appears on a table view's cell when it is tapped? (Just the overlay color, as when You tap on an option in Settings.app and it gets blue before taking You there)
0
[ 2, 4226, 21, 1667, 22, 18, 1665, 133, 19, 13, 7, 4542, 3130, 69, 7, 146, 800, 3726, 3726, 184, 92, 31, 753, 14, 12838, 13, 5, 6997, 6, 1665, 30, 1780, 27, 21, 859, 1418, 22, 18, 1667, 76, 32, 25, 11218, 60, 13, 5, 2759, 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...
build C++ projects in Maven with maven-nar-plugin === has anyone using maven-nar-plugin to build C++ code for different platforms, using different compilers? If there is someone please give me more info regarding this. I am just wondering how can be a NAR file built for different platforms with maven. I know that in order to be able to build a project on a specific platform you should run the build on that platform, and use the specific compilers and linkers of that platform. But my experience is related to Java projects and Maven and as you already know java is pretty platform portable so I've not experienced problems like thin until now. So, any help and details about how to build projects with maven-nar-plugin would be appreaciated! Thanks
0
[ 2, 1895, 272, 20512, 2314, 19, 1216, 3124, 29, 1216, 3124, 8, 4810, 8, 18527, 5831, 800, 3726, 3726, 63, 1276, 568, 1216, 3124, 8, 4810, 8, 18527, 5831, 20, 1895, 272, 20512, 1797, 26, 421, 6843, 15, 568, 421, 21486, 18, 60, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does one method of string compression return an empty string but another one doesn't? === I'm using [`GZipStream`](http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx) to compress a string, and I've modified two different examples to see what works. The first code snippet, which is a heavily modified version of [the example in the documentation](http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx), simply returns an empty string. public static String CompressStringGzip(String uncompressed) { String compressedString; // Convert the uncompressed source string to a stream stored in memory // and create the MemoryStream that will hold the compressed string using (MemoryStream inStream = new MemoryStream(Encoding.Unicode.GetBytes(uncompressed)), outStream = new MemoryStream()) { using (GZipStream compress = new GZipStream(outStream, CompressionMode.Compress)) { inStream.CopyTo(compress); StreamReader reader = new StreamReader(outStream); compressedString = reader.ReadToEnd(); } } return compressedString; and when I debug it, all I can tell is nothing is read from `reader`, which is `compressedString` is empty. However, the second method I wrote, modified from a [CodeProject snippet](http://www.codeproject.com/Articles/27203/GZipStream-Compress-Decompress-a-string) is successful. public static String CompressStringGzip3(String uncompressed) { //Transform string to byte array String compressedString; byte[] uncompressedByteArray = Encoding.Unicode.GetBytes(uncompressed); using (MemoryStream outStream = new MemoryStream()) { using (GZipStream compress = new GZipStream(outStream, CompressionMode.Compress)) { compress.Write(uncompressedByteArray, 0, uncompressedByteArray.Length); compress.Close(); } byte[] compressedByteArray = outStream.ToArray(); StringBuilder compressedStringBuilder = new StringBuilder(compressedByteArray.Length); foreach (byte b in compressedByteArray) compressedStringBuilder.Append((char)b); compressedString = compressedStringBuilder.ToString(); } return compressedString; } Why is the first code snippet not successful while the other one is? Even though they're slightly different, I don't know why the minor changes in the second snippet allow it to work. The sample string I'm using is `SELECT * FROM foods f WHERE f.name = 'chicken';`
0
[ 2, 483, 630, 53, 2109, 16, 3724, 14864, 788, 40, 2424, 3724, 47, 226, 53, 1437, 22, 38, 60, 800, 3726, 3726, 31, 22, 79, 568, 636, 1, 263, 2553, 306, 11260, 1, 500, 5, 21127, 6903, 79, 18, 43, 103, 9, 22019, 12980, 9, 960, 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...
RestTemplate Uploading File, incorrect Mime-type? === We're trying to do a file upload as part of a REST call using org.springframework.web.client.RestTemplate from the 3.0.5.RELEASE and we're seeing some files, almost all of the Open Office and OOXML formats, show up as our server-side default of application/octet-stream. We can detect the mime-type using Tika before we upload, but don't see how to add that to part of the request through RestTemplate. Below is some Groovy code that we're using to perform the upload: MultiValueMap<String, Object> form = new LinkedMultiValueMap<String, Object>() form.add("title", document.title) form.add("description", document.description) form.add("content", new FileSystemResource(file)) return restTemplate.postForObject(getFullURL(REST_API_URI), form, Document.class)
0
[ 2, 760, 9577, 6554, 71, 16866, 3893, 15, 18867, 26193, 8, 4474, 60, 800, 3726, 3726, 95, 22, 99, 749, 20, 107, 21, 3893, 71, 8294, 28, 141, 16, 21, 760, 645, 568, 13, 5583, 9, 15827, 8361, 3783, 9, 14113, 9, 150, 18513, 38, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Spring / JSP and Servlets - Advanced Access Control === I have a list of pages, round1.jsp, round2.jsp, round3.jsp, etc. I would like to build a control panel where an admin can check the list of available round(s), and only then the user will be able to access them. What is the best way to get this done? I am deploying on GAE, would persisting this data in the datastore be sufficient? If yes, what sort of entity do I need to define?
0
[ 2, 1573, 13, 118, 487, 3401, 17, 13, 10321, 11045, 13, 8, 2255, 1381, 569, 800, 3726, 3726, 31, 57, 21, 968, 16, 4434, 15, 560, 165, 9, 728, 3401, 15, 560, 135, 9, 728, 3401, 15, 560, 240, 9, 728, 3401, 15, 2722, 9, 31, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaScript to create a global radio button for all subsequent radio buttons? === I have this set of labels and radio buttons that look like this: Entertainment: <input type="radio" name="entertainment" id="entertainment" value="0" checked/> <input type="radio" name="entertainment" id="entertainment" value="1" /> <input type="radio" name="entertainment" id="entertainment" value="2" /><br /> Radio: <input type="radio" name="radio" id="radio" value="0" checked/> <input type="radio" name="radio" id="radio" value="1" /> <input type="radio" name="radio" id="radio" value="2" /><br /> Dancing: <input type="radio" name="dancing" id="dancing" value="0" checked/> <input type="radio" name="dancing" id="dancing" value="1" /> <input type="radio" name="dancing" id="dancing" value="2" /><br /> Music: <input type="radio" name="music" id="music" value="0" checked/> <input type="radio" name="music" id="music" value="1" /> <input type="radio" name="music" id="music" value="2" /><br /> Television: <input type="radio" name="tv" id="tv" value="0" checked/> <input type="radio" name="tv" id="tv" value="1" /> <input type="radio" name="tv" id="tv" value="2" /><br /> Film: <input type="radio" name="film" id="film" value="0" checked/> <input type="radio" name="film" id="film" value="1" /> <input type="radio" name="film" id="film" value="2" /><br /> Theatre: <input type="radio" name="theatre" id="theatre" value="0" checked/> <input type="radio" name="theatre" id="theatre" value="1" /> <input type="radio" name="theatre" id="theatre" value="2" /> The idea is that the three 'Entertainment' radio buttons at the top control all the radio buttons below. A 'global switch', if you will, to save people time. Does anyone know the necessary JavaScript/jQuery to accomplish this? I can't find a correct example online.
0
[ 2, 8247, 8741, 20, 1600, 21, 2062, 603, 5167, 26, 65, 3147, 603, 12861, 60, 800, 3726, 3726, 31, 57, 48, 309, 16, 13173, 17, 603, 12861, 30, 361, 101, 48, 45, 2302, 45, 13, 1, 108, 4881, 1001, 3726, 7, 11129, 7, 204, 3726, 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...
Change return-fields in read method django-piston === i'm using django-piston to create my api. I need to know if possible to change the return-fields according to a parameter. I'm trying to return a thumbnail field, but i need to have the option to pass the sizes of the thumbnail via URL. Thanks in advance
0
[ 2, 753, 788, 8, 1109, 18, 19, 1302, 2109, 3857, 14541, 8, 8954, 444, 800, 3726, 3726, 31, 22, 79, 568, 3857, 14541, 8, 8954, 444, 20, 1600, 51, 21, 2159, 9, 31, 376, 20, 143, 100, 938, 20, 753, 14, 788, 8, 1109, 18, 496, 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...
Magento: Get all configured rates of the tablerate shipping module === I'm stuck on what I think should be a minor problem, but I couldn't find a solution yet. I'm working on a module that has to go through all configured rates of the tablerate shipping module. But how do I get all configured rates, and not just the one that fits a given condition? I looked into the code of the corresponding resource model ("shipping/carrier_tablerate"), and saw that the getRate($request)-method limits the select query to 1, so only 1 rate is returned. Is there an easy way to get all configured rates? Is there a built-in way to do this at all or do I have to perform my own database operation?
0
[ 2, 4723, 17050, 45, 164, 65, 28895, 5332, 16, 14, 859, 5487, 7405, 12613, 800, 3726, 3726, 31, 22, 79, 4549, 27, 98, 31, 277, 378, 44, 21, 1689, 1448, 15, 47, 31, 711, 22, 38, 477, 21, 4295, 768, 9, 31, 22, 79, 638, 27, 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...
Powershell v3 Invoke-RestMethod === I am attempting to make use of the new invoke-restmethod cmdlet to POST a JSON file and have succesfully done so. However, I do not receive a response from the webserver like I did when using CURL. For what I'm trying to accomplish I need to take info from the reposne to the POST and use this for another POST command. Can someone please explain how I can get the expected response from the server? Below are the two commands 1st in CURL, 2nd using Invoke-RestMethod. The curl command will perform the correct POST and return a response. The Powershell command will perform the correct POST but will not return a response. Thanks **Curl Command** curl -f -v -s -k --no-sessionid -H X-em7-beautify-response:1 -H content- type:application/json https://URLHERE --data-binary @jsonfile.json **Powershell Code** $cert=New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("certfile.crt") $json = Get-Content jsonfile.json $cred = Get-Credential -Message "Enter Credentials" Invoke-RestMethod -Uri https://URLHERE -Credential $cred -Body $json -Certificate $cert -ContentType application/json -Method POST
0
[ 2, 414, 15984, 566, 240, 28371, 8, 11466, 5909, 1807, 43, 800, 3726, 3726, 31, 589, 6314, 20, 233, 275, 16, 14, 78, 28371, 8, 11466, 5909, 1807, 43, 2390, 43, 1336, 20, 678, 21, 487, 528, 3893, 17, 57, 21792, 5052, 5655, 677, 86...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to set up Python server side with javascript client side === So there is already a Python program set up that runs on the console that I must build upon. I will be building a web GUI interface for the application using Javascript. How would I: a. Go about handling the input/output of this Python program without touching the original code. b. Go about sending console-line inputs to the Python program via Javascript calls. I've looked into raw HTTP requests/AJAX, but I'm not sure how exactly I would go about sending that as input to the Python program. Thank you all, I'm new here. -Nikhil
0
[ 2, 184, 20, 309, 71, 20059, 8128, 270, 29, 8247, 8741, 6819, 270, 800, 3726, 3726, 86, 80, 25, 614, 21, 20059, 625, 309, 71, 30, 1461, 27, 14, 8650, 30, 31, 491, 1895, 685, 9, 31, 129, 44, 353, 21, 2741, 9457, 6573, 26, 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...
Migration to MVC3 === I trying to migrate from MVC2 to MVC3. I use Spark view engine. After changing references I got only 2 errors in my Spark page base class: The type 'System.Web.Mvc.IView' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. C:\Dev\main\app\Web\Html\SparkPageBase.cs The type 'System.Web.Mvc.IViewDataContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. C:\Dev\main\app\Web\Html\SparkPageBase.cs How I can resolve this problem?
0
[ 2, 8443, 20, 307, 8990, 240, 800, 3726, 3726, 31, 749, 20, 22985, 37, 307, 8990, 135, 20, 307, 8990, 240, 9, 31, 275, 9026, 1418, 1406, 9, 75, 4226, 7231, 31, 330, 104, 172, 11908, 19, 51, 9026, 2478, 1000, 718, 45, 14, 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...
Validate optional fields using Kohana 3.2 ORM === What is the simplest (cleaner) way to validate optional fields using Kohana 3.2 ORM? * Validates only if the field has something, after trim filter, if it is possible.
0
[ 2, 7394, 1373, 12832, 2861, 568, 1584, 7285, 203, 9, 135, 54, 79, 800, 3726, 3726, 98, 25, 14, 24384, 13, 5, 20254, 106, 6, 161, 20, 7394, 1373, 12832, 2861, 568, 1584, 7285, 203, 9, 135, 54, 79, 60, 1637, 7394, 7759, 104, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
Matlab summation to form matrix === I am looking for some help with a fast loop to form a bunch of values. Given a 30-vector, **x** and another 30-vector which is the expected value of such data **expx**. I want to be able to quickly sum 30*30=90 values to form a symmetric 30x30 matrix. Here is how the (k,l)-entry of my 30x30 matrix is: http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/418323_10151071044381952_1032371095_n.jpg so **x** forms the entries on the left part of the bracket, x_i and **expx** is the right part, i.e. < x_i > for i=1,2,...,30. You don't need to worry about what values makes up these vectors, I've already determined them. Does anyone know how I should form such elements of the matrix and put them into my 30x30 matrix. I guess I'd start off with: M=30; C = zeros(M); I'm struggling to get the summation though.
0
[ 2, 4277, 9086, 18074, 3309, 20, 505, 8187, 800, 3726, 3726, 31, 589, 699, 26, 109, 448, 29, 21, 1512, 5293, 20, 505, 21, 7653, 16, 4070, 9, 504, 21, 712, 8, 28033, 15, 13, 1409, 396, 1409, 17, 226, 712, 8, 28033, 56, 25, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to develop Rss Reader App using LWUIT Component in j2me(java) === I am new to J2me I have a requirement to develop Rss Reading Application using LWUIT in j2me(java)for series 40 Device. 1)I need to read Rss File 2)i need to display Title and Image from Rss xml File on LWUIT List Screen 3)If i click on Title ,i should be able to display Form Screen ,On LWUIT Form i need to display Description and Publish Date from Rss File any sample Code ,I need help?
0
[ 2, 184, 20, 2803, 13, 1224, 18, 7765, 4865, 568, 13, 23281, 11193, 5912, 19, 487, 135, 790, 5, 1004, 1385, 6, 800, 3726, 3726, 31, 589, 78, 20, 487, 135, 790, 31, 57, 21, 8981, 20, 2803, 13, 1224, 18, 1876, 3010, 568, 13, 2328...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 to pull multiple matches out of a line === I seem to have entered a pretty complex area (to me anyways.) Lets say I have the following line: 1:11:39 "LOGIN ATTEMPT: "47576966" Arlond" What I am trying to do is seperate the time(1:11:39) ID(47576966) and name(Arlond). I got as far as the below regex but I am sort of lost at what I need to do next. I understand my regex is incorrect to grab everything I need and that's where I'll also need help among getting my For loop to work correctly. I have been looking up on how to regex split and replace but so far I have not had any luck getting anything to work. ([""'])(?:(?=(\\?))\2.)*?\1 Using TestFile As New IO.StreamReader(My.Settings.cfgPath & "tempRPT.txt", System.Text.Encoding.Default, False, 4096) Do Until TestFile.EndOfStream ScriptLine = TestFile.ReadLine ScriptLine = LCase(ScriptLine) If InStr(ScriptLine, "login attempt:") Then Dim m As MatchCollection = Regex.Matches(ScriptLine, "([""'])(?:(?=(\\?))\2.)*?\1") For Each x As Match In m Next 'builder.AppendLine(ScriptLine) End If Loop End Using
0
[ 2, 568, 7953, 1706, 20, 2201, 1886, 1717, 70, 16, 21, 293, 800, 3726, 3726, 31, 2260, 20, 57, 1297, 21, 1772, 1502, 217, 13, 5, 262, 55, 2774, 18, 9, 6, 6884, 395, 31, 57, 14, 249, 293, 45, 6352, 1306, 23425, 13, 7, 5567, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
UNIX & PHP: in terminal, php script is failing to connect to mysql === I am trying to run a PHP script from the command line. Terminal returns an error saying it can't mysql_connect(). Any idea how to correct this error? I use MAMP for local development, and have placed the PHP script in my htdocs folder. When I run this file through a web-browser, it works fine. I think I remember something about using a symlink to correct this? Not sure. Last login: Mon Jul 30 10:49:18 on ******** mycomputer:~ fakename$ cd /Applications/MAMP/htdocs/testwebsite/build/includes mycomputer:includes fakename$ php dailyscript_v4.php Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Applications/MAMP/htdocs/testwebsite/build/classes/Database.php on line 22 Warning: mysql_connect(): No such file or directory in /Applications/MAMP/htdocs/testwebsite/build/classes/Database.php on line 22 mycomputer:includes fakename$
0
[ 2, 22540, 279, 13, 26120, 45, 19, 3855, 15, 13, 26120, 3884, 25, 7250, 20, 6379, 20, 51, 18, 22402, 800, 3726, 3726, 31, 589, 749, 20, 485, 21, 13, 26120, 3884, 37, 14, 1202, 293, 9, 3855, 4815, 40, 7019, 1148, 32, 92, 22, 38,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 drop down menu is not behaving properly === I have the following jquery code for my drop down menu: var active = 0; $(document).ready(function(){ jQuery("#dropmenu ul").css({display:"none"}); // For 1 Level jQuery("#dropmenu li:has(ul) a").append(''); jQuery("#dropmenu li ul a span").text(''); // For 2 Level jQuery("#dropmenu li ul li:has(ul) a").append(''); jQuery("#dropmenu li ul li ul a span").text(''); // For 3 Level jQuery("#dropmenu li ul li ul li:has(ul) a").append(''); jQuery("#dropmenu li ul li ul li ul li a span").text(''); // For 4 Level jQuery("#dropmenu li ul li ul li ul li:has(ul) a").append(''); jQuery("#dropmenu li ul li ul li ul li ul li a span").text(''); // For 5 Level jQuery("#dropmenu li ul li ul li ul li ul li:has(ul) a").append(''); jQuery("#dropmenu li ul li ul li ul li ul li ul li a span").text(''); // For 6 Level jQuery("#dropmenu li ul li ul li ul li ul li ul li:has(ul) a").append(''); jQuery("#dropmenu li ul li ul li ul li ul li ul li ul li a span").text(''); // For 7 Level jQuery("#dropmenu li").hover(function(){ if(active != 1){ jQuery($('.active').parent()).find("ul:first").css('display', 'none'); jQuery(this).find("ul:first").fadeIn('fast'); active = 1; } }, function(){ jQuery(this).find("ul:first").fadeOut('fast'); jQuery($('.active').parent()).find("ul:first").fadeIn('fast'); active = 0; }); }); //ACTIVATE $(document).ready(function(){ jQuery($('.active').parent()).find("ul:first").css('display', 'block'); }); What the code is suppose to do is check and see which element has an `active` class and show it when the page loads. The HTML looks something like this: <ul id="dropmenu"> <li><a class="active" href="index.php">home</a> <ul> <li><a href="#">Euro 2012</a></li> <li><a href="#">FIA Cup</a></li> <li><a href="#">Previous Events</a></li> <li><a href="#">Event 2012-2013</a></li> <li class="last"><a href="#">Pre Season</a></li> </ul></li> <li><a href="#" >home</a></li> <li><a href="#">blabl</a></li> <li><a href="#">dropdown</a> <ul> <li><a href="#">Euro 2012</a></li> <li><a href="#">FIA Cup</a></li> <li><a href="#">Previous Events</a></li> <li><a href="#">Event 2012-2013</a></li> <li class="last"><a href="#">Pre Season</a></li> </ul> </li> right now when the page loads the default drop down is shown however once you hover over other menu items if they dont have a drop down menu it shows the default one and hides, and if you quickly go over the the menu item it will keep repeating the animation. How can I avoid the repetition of the animation and how can I avoid showing the default menu when the menu is empty?
0
[ 2, 487, 8190, 93, 2804, 125, 11379, 25, 52, 44, 13693, 7428, 800, 3726, 3726, 31, 57, 14, 249, 487, 8190, 93, 1797, 26, 51, 2804, 125, 11379, 45, 4033, 1348, 800, 713, 73, 5579, 5, 28132, 6, 9, 15193, 5, 22359, 5, 6, 1, 487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TransientError with Google App Engine Search === I'm trying to run a query and sorting by a date field. q = self.request.get("q") index = search.Index(name="transaction") sort_options = search.SortOptions( expressions=[ search.SortExpression(expression='timestamp_date', direction=search.SortExpression.DESCENDING) ], limit=1000) options = search.QueryOptions(limit=30, cursor=search.Cursor(), sort_options=sort_options) results = index.search(search.Query(query_string=q, options=options)) On the development server, the code works but the results are *not correctly sorted*. On the production server it doesn't work at all; It gives the following error: Search failed Traceback (most recent call last): File "/base/data/home/apps/s~xxx/pre-24.359846149527858049/main.py", line 78, in get results = index.search(search.Query(query_string=q, options=options)) File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py", line 2609, in search _CheckStatus(response.status()) File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py", line 414, in _CheckStatus raise _ERROR_MAP[status.code()](status.error_detail()) TransientError I'm wondering how to make it work on the production server and how to sort correctly on the development server. I know its experimental technology, but I wanted to check to see if this was something I was overlooking
0
[ 2, 26008, 29992, 29, 8144, 4865, 1406, 2122, 800, 3726, 3726, 31, 22, 79, 749, 20, 485, 21, 25597, 17, 2058, 68, 34, 21, 1231, 575, 9, 2593, 800, 1119, 9, 99, 10351, 9, 3060, 5, 7, 1251, 7, 6, 4348, 800, 2122, 9, 25671, 5, 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...
ZendDebugger on ubutnu-server === I like to debug my PHP applications. So, I installed the ZendDebugger. I downloaden en paste the ZendDebugger.so file in /usr/lib/php5/modules/ZendDebugger.so And past this code in the php.ini file: zend_extension=/usr/lib/php5/modules/ZendDebugger.so This path is correct, and I have tried several other paths. I also have tried other codes in the php.ini file. I work with a ubuntu server and eclipse with the PDT extension on ubuntu. But the debugger is not installad. The only information I can find in the phpinfo is: > This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies I don't know what to do? I have searched many times on the internet, and tied it with a clean server install. I hope you can help me!
0
[ 2, 10526, 43, 546, 2345, 11356, 27, 287, 811, 4215, 8, 10321, 106, 800, 3726, 3726, 31, 101, 20, 121, 16254, 51, 13, 26120, 3767, 9, 86, 15, 31, 4066, 14, 10526, 43, 546, 2345, 11356, 9, 31, 7121, 219, 1957, 640, 62, 14, 10526, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ThreeJS: Creating a background image that exactly fits the window? === In ThreeJS (JavaScript/ WebGL) how can I create a static background image that is part of the scene but resizes to fit the full inner browser window exactly? It works when I use CSS but then the background image won't show when making a "screenshot" via renderer.domElement.toDataURL('image/png'), which I want to. Thanks!
0
[ 2, 132, 728, 18, 45, 2936, 21, 2395, 1961, 30, 1890, 2742, 18, 14, 1463, 60, 800, 3726, 3726, 19, 132, 728, 18, 13, 5, 1004, 1385, 8741, 118, 2741, 8430, 6, 184, 92, 31, 1600, 21, 12038, 2395, 1961, 30, 25, 141, 16, 14, 1691, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Automatically change width of list view columns in WPF === How can I automatically (or maybe using a recalculate method) to automatically resize the width of a listview in WPF after items have been changed (e.g. using a new source, filter or just added or changed items manually) in such a way that the width of each column accomodates exactly the width of the largest item length (or column name length)?
0
[ 2, 7499, 753, 9456, 16, 968, 1418, 7498, 19, 619, 7721, 800, 3726, 3726, 184, 92, 31, 7499, 13, 5, 248, 913, 568, 21, 302, 16304, 12383, 2109, 6, 20, 7499, 302, 10454, 14, 9456, 16, 21, 968, 4725, 19, 619, 7721, 75, 3755, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RBG24 can be played well on Windows, but on iOS it can't === By decoder transform H264 video to rgb24 file, it can be displayer well on Windows, but when I use UIImage to display it on UIImageView its color is not right. The code I use as this: -(UIImage *)imageFromAVPicture:(const UInt8 *)pict width:(int)width height:(int)height{ CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; CFDataRef data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, pict, width*height*3,kCFAllocatorNull); CGDataProviderRef provider = CGDataProviderCreateWithCFData(data); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGImageRef cgImage = CGImageCreate(width, height, 8, 24, width*3, colorSpace, bitmapInfo, provider, NULL, YES, kCGRenderingIntentDefault); CGColorSpaceRelease(colorSpace); UIImage *image = [self scaleImage:cgImage]; //UIImage *image = [[UIImage alloc] initWithCGImage:cgImage]; CGImageRelease(cgImage); CGDataProviderRelease(provider); CFRelease(data); return image; } But before create CGImage, add code as following, its show will be right, what following code do is transform betweent rgb and bgr. UInt8 tmpBuff1,*tmpBuff2; tmpBuff2 = (UInt8 *)pict; for(int i =0;i<height;i++) for(int j=0;j<width;j++) { tmpBuff1 = *tmpBuff2; *tmpBuff2 = *(tmpBuff2+2); *(tmpBuff2+2) = tmpBuff1; tmpBuff2 += 3; } After transform from rgb to bgr, its show will be right. So I want to know why, why the same RGB24 file can play well on PC, but wrong on iOS before transform from RGB24 to BGR24.
0
[ 2, 13, 7549, 263, 1996, 92, 44, 257, 134, 27, 1936, 15, 47, 27, 13, 7760, 32, 92, 22, 38, 800, 3726, 3726, 34, 12015, 1157, 8007, 746, 20470, 763, 20, 761, 11400, 1996, 3893, 15, 32, 92, 44, 3042, 106, 134, 27, 1936, 15, 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...
Django with ./manager runserver works well, while Django + uwsgi return 404 === This si my settings.py about `static` in `settings.py`: STATIC_ROOT = '/home/coat/www/site/app/static/' STATIC_URL = '/static/' STATICFILES_DIRS = ( "/usr/lib/python2.6/site-packages/django/contrib/admin/static/", # This is Django admin default static files ) I user django server: `./manager runserver` Then I open the URL: `http://localhost:8000/static/admin/css/base.css` It works very well. But a open `http://localhost/static/admin/css/base.css` It print '404' ![enter image description here][1] I had restart Nginx and uwsgi for many times, but it dosen't works. [1]: http://i.stack.imgur.com/D2U5j.png
0
[ 2, 3857, 14541, 29, 13, 9, 118, 22256, 1461, 106, 2304, 693, 134, 15, 133, 3857, 14541, 2754, 13, 14524, 18, 2234, 788, 13, 23397, 800, 3726, 3726, 48, 2769, 51, 12410, 9, 6448, 88, 13, 1, 18077, 1, 19, 13, 1, 19831, 18, 9, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android imagebutton how to change icon size === I have been working on interfaces lately and I have many problems with imagebutton sizes. I'm very bad at designing stuff and I'm having major problems with the Android Icons. Thus, I have some questions regarding those. First of all this is my current layout: ![enter image description here][1] As you can see, I have two icons that have different sizes and that's not good. I can't seem to force them to take the same size. My questions are: 1 - How do I force them to take the same size? 2 - What are the recommended size differences for hdpi, ldpi,mdpi and xhdpi? 3 - Why, if I set the imageButton background color to the same color as the layout background, the Icon is moved as if there was no button in the background? Example: ![enter image description here][2] Thanks in advance!! [1]: http://i.stack.imgur.com/bT3HP.png [2]: http://i.stack.imgur.com/GDfXm.png
0
[ 2, 13005, 1961, 811, 444, 184, 20, 753, 9801, 1072, 800, 3726, 3726, 31, 57, 74, 638, 27, 6573, 18, 10434, 17, 31, 57, 151, 1716, 29, 1961, 811, 444, 13403, 9, 31, 22, 79, 253, 896, 35, 15026, 3217, 17, 31, 22, 79, 452, 394, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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's the difference between .out and .log file === I never bothered to find this out. Let's see I have a java web application running called "myapp" What's the difference between myapp.out and myapp.log file? .log file can be rotated according to log4j.properties setting, how about .out file? do I need to set up the rotation policy for it as well?
0
[ 2, 98, 22, 18, 14, 2841, 128, 13, 9, 1320, 17, 13, 9, 5567, 3893, 800, 3726, 3726, 31, 243, 12200, 20, 477, 48, 70, 9, 408, 22, 18, 196, 31, 57, 21, 8247, 2741, 3010, 946, 227, 13, 7, 915, 7753, 7, 98, 22, 18, 14, 2841, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Read Device Token for iPhone Push Notification === I try to implement push notification in my iPhone application. I have create Provisioning Profile and App-id for push notification and add this certificates into Xcode. Connect iPhone device to mac system and build application through device for read Device token using the following code. **- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken:\n%@", deviceToken); } - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSLog(@"didFailToRegisterForRemoteNotificationsWithError:%@", [error localizedDescription]); }** But it returns error.. like > *didFailToRegisterForRemoteNotificationsWithError:no valid 'aps-environment' entitlement string found for application 2012-07-18 > 14:18:08.597 Z2NotifyMe[1874:707] > didFailToRegisterForRemoteNotificationsWithError:Error > Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' > entitlement string found for application" UserInfo=0x11fee0 > {NSLocalizedDescription=no valid 'aps-environment' entitlement string > found for application}* I have remove all old certificates in Xcode and my device, then re-create all certificate newly then execute above same code it returns same above error. Please help solve this problem. Thanks..
0
[ 2, 1302, 3646, 20, 2853, 26, 21024, 3250, 52, 4634, 800, 3726, 3726, 31, 1131, 20, 8713, 3250, 52, 4634, 19, 51, 21024, 3010, 9, 31, 57, 1600, 8738, 68, 5296, 17, 4865, 8, 1340, 26, 3250, 52, 4634, 17, 3547, 48, 6259, 18, 77, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 setup fastCGI with Apache tomcat to run C++? === I have my java application running along with Apache Tomcat and jdbc is used for DB. However in some of the db transactions there are few dlls that are to be invoked. For this I've decided to use fastcgi. So now I have a C++ program that invokes a dll. FastCGI along with Apache Tomcat should be able to be run this C++ program on a Windows machine? How can this be done? I am not able to get any pointers on Google for this particular fastCGI + Tomcat Apache + C++ + windows combination of setup. Please help!
0
[ 2, 184, 20, 18161, 1512, 150, 2234, 29, 17140, 2067, 5782, 20, 485, 272, 20512, 60, 800, 3726, 3726, 31, 57, 51, 8247, 3010, 946, 303, 29, 17140, 2067, 5782, 17, 487, 43, 7229, 25, 147, 26, 13, 9007, 9, 207, 19, 109, 16, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Magento Order creation sales_flat_quote_item not being made === I have a module that takes a feed from another site and then imports the orders into magento. The problem is that despite the orders being created properly and appering in Magento they don't show up in the Products Ordered report. The reason seems to be that this report looks at the sales_flat_quote_item table to produce its results but there is no entry for my sale items. They do however appear correctly in sales_flat _order_item. Below is a shortened version of the code. Any suggestions as to why im not getting an entry in flat_quote_item? Why does the Magento model used by the Ordered Products report use the quote table and not the order table? $quote = Mage::getModel('sales/quote')->setStoreId((string) $dataArray->StoreviewId); if (is_object($product)) { $product->setPrice(((string) $orderitem->Price) / $reverseRate); $item = Mage::getModel('sales/quote_item'); $item->setQuote($quote)->setProduct($product); $item->setData('qty', (string) $orderitem->Quantity); $item->setCustomPrice((string) $orderitem->Price); $item->setOriginalCustomPrice((string) $orderitem->Price); $quote->addItem($item); }
0
[ 2, 4723, 17050, 389, 2502, 2598, 1, 13830, 1, 8970, 591, 1, 2119, 79, 52, 142, 117, 800, 3726, 3726, 31, 57, 21, 12613, 30, 1384, 21, 4063, 37, 226, 689, 17, 94, 20617, 14, 3204, 77, 4723, 17050, 9, 14, 1448, 25, 30, 869, 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...
disable drupal date validation === I have a date field (widget = select list) in a drupal 7 content type, And I want to be able to enter a date like 2012/2/31 without any validation error? what can I do?
0
[ 2, 1460, 579, 15708, 6720, 1231, 27999, 800, 3726, 3726, 31, 57, 21, 1231, 575, 13, 5, 3976, 43, 3060, 800, 5407, 968, 6, 19, 21, 15708, 6720, 453, 2331, 1001, 15, 17, 31, 259, 20, 44, 777, 20, 2830, 21, 1231, 101, 563, 118, 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, 0, 0, 0, 0, 0, 0...
Drawing on PictureBox === in a `UserControl` I have a `PictureBox` and some other controls. For the user control which contains this picturebox named as `Graph` I have a method to draw a curve on this picture box: //Method to draw X and Y axis on the graph private bool DrawAxis(PaintEventArgs e) { var g = e.Graphics; g.DrawLine(_penAxisMain, (float)(Graph.Bounds.Width / 2), 0, (float)(Graph.Bounds.Width / 2), (float)Bounds.Height); g.DrawLine(_penAxisMain, 0, (float)(Graph.Bounds.Height / 2), Graph.Bounds.Width, (float)(Graph.Bounds.Height / 2)); return true; } //Painting the Graph private void Graph_Paint(object sender, PaintEventArgs e) { base.OnPaint(e); DrawAxis(e); } //Public method to draw curve on picturebox public void DrawData(PointF[] points) { var bmp = Graph.Image; var g = Graphics.FromImage(bmp); g.DrawCurve(_penAxisMain, points); Graph.Image = bmp; g.Dispose(); } When application starts, the axis are drawn. but when I call the `DrawData` method I get the exception that says `bmp` is null. What can be the problem? I also want to be able to call `DrawData` multiple times to show multiple curves when user clicks some buttons. What is the best way to achive this? Thanks
0
[ 2, 3533, 27, 2151, 5309, 800, 3726, 3726, 19, 21, 13, 1, 16704, 12898, 1, 31, 57, 21, 13, 1, 25602, 5309, 1, 17, 109, 89, 8671, 9, 26, 14, 4155, 569, 56, 1588, 48, 2151, 5309, 377, 28, 13, 1, 9614, 1, 31, 57, 21, 2109, 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...
Floating in CSS === i was wondering what is wrong with this code? <style type="text/css"> .recipe h2{ float:left; } .recipe .intro, .recipe ol{ float:right; width:500px; } </style> </head> <body> <h1>Recipes for Cheese</h1> <p class="intro">Cheese is a remarkably versatile food, available in literally hundreds of varieties with different flavores and textures.</p> <div class="recipe"> <h2>Welsh Rarebit</h2> <p class="intro">Welsh Rarebit is a savory dish made from melted cheese, often Cheddar, on toasted bread, and a variety of other ingredients such as mustard, egg or bacon. Here is one take on this classic.</p> <ol> <li>Lightly toast the bread</li> <li>Place a baking tray, and spread with butter.</li> <li>Add the grated Cheddar cheese and 2 tablespoons of beer to a saucepan. Place the saucepan over a medium heat, and stir the cheese continuously until it has melted. Add a teaspoon of wholegrain mustard and grind in a little pepper. Keep stirring.</li> <li>When thick and smooth, pour over each piece of toast spreading it to the edges to stop the toast from burning.</li> <li>Place undre the grill for a couple of minutes or until golden brown.</li> </ol> </div> </body> </html> Originally, the solution of this code should be just like the picture in the book here: https://picasaweb.google.com/lh/photo/fDg4GiRbz3mCZvh2krcsqdMTjNZETYmyPJy0liipFm0?feat=directlink This code above give me this: https://picasaweb.google.com/lh/photo/kaH-7AE5K-UKMcxxlJdkrtMTjNZETYmyPJy0liipFm0?feat=directlink I have read over and over afew times now and could not find anything wrong with this but have no idea why it does this. Could anyone explain why it does this and how to correct it please? Thanks so much in advance!
0
[ 2, 8319, 19, 272, 18, 18, 800, 3726, 3726, 31, 23, 5712, 98, 25, 1389, 29, 48, 1797, 60, 13, 1, 4381, 1001, 3726, 7, 11969, 118, 6824, 18, 7, 1, 13, 9, 15110, 1664, 746, 135, 1, 11510, 45, 9742, 73, 13, 1, 13, 9, 15110, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ColdFusion's XML Support & Word Documents === Using ColdFusion's new XML functions... is it possible to find/replace text in Word documents (docx)? I was trying to wrap my head around accomplising this since a docx document could have a piece of text (a placeholder to search for) spread out on multiple w:r (runs) which could be difficult to search and replace for.
0
[ 2, 1191, 9818, 22, 18, 23504, 555, 279, 833, 4374, 800, 3726, 3726, 568, 1191, 9818, 22, 18, 78, 23504, 3719, 9, 9, 9, 25, 32, 938, 20, 477, 118, 99, 5119, 1854, 19, 833, 4374, 13, 5, 13799, 396, 6, 60, 31, 23, 749, 20, 8118...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Putting Javascript variables into html values === I am using Backbone.js and I am looking for something to turn my data into hidden elements on a form to submit and also to turn the data into values on textboxes. I want something "battle hardened" that handles all special characters on String data and also handles numbers correctly. Does anyone have anything like that?
0
[ 2, 3873, 8247, 8741, 12157, 77, 13, 15895, 4070, 800, 3726, 3726, 31, 589, 568, 24036, 9, 728, 18, 17, 31, 589, 699, 26, 301, 20, 805, 51, 1054, 77, 3689, 2065, 27, 21, 505, 20, 12298, 17, 67, 20, 805, 14, 1054, 77, 4070, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
invoking constructors of struct in functions, C++ === Here is the approximate code of my question. First, we have a struct with a constructor: struct Pair{ Pair(int a, int b): (first (a) , second (b) ) {} int first; int second; }; which is used in a map map<string, Pair> mymap; I would like to initialize this map in a function void f(map<string, Pair>* mymap, string c,int x, int y ) { (*mymap)[c]=Pair(x,y); } But the compiler says first that it could not find an appropriate constructor and then the next lines are that not enough arguments are provided for the constructor. A friend of mine told me that I should write the function like this: void f(map<string, Pair>& mymap, const string& c,int x, int y ) { if (mymap.find(c) != mymap.end()) { mymap[c] = Pair(x,y); } } **But he could not explain why *Type&* should be used here instead of *Type* *, and I would like to clarify this point.** Can anybody explain?
0
[ 2, 19, 2625, 1581, 6960, 248, 18, 16, 13, 10346, 19, 3719, 15, 272, 20512, 800, 3726, 3726, 235, 25, 14, 16569, 1797, 16, 51, 1301, 9, 64, 15, 95, 57, 21, 13, 10346, 29, 21, 6960, 248, 45, 13, 10346, 2146, 1, 2146, 5, 6391, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Visual Sudio Package development - How to detect the current RootSuffix === is there a way to retrieve the current RootSuffix (instance name) of Visual Studio (2010+) of the current Visual Studio instance inside a visual studio package (VSIX package)? Thanks
0
[ 2, 3458, 2538, 6921, 6030, 522, 13, 8, 184, 20, 9092, 14, 866, 5163, 5386, 4028, 800, 3726, 3726, 25, 80, 21, 161, 20, 11917, 14, 866, 5163, 5386, 4028, 13, 5, 108, 384, 2416, 204, 6, 16, 3458, 1120, 13, 5, 2751, 2430, 6, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sourcetree on Mac connecting to Gitolite asks for authentication === We've recently set up Gitolite server. All seems well. I can connect to it without a problem. A new user has been set up, he's on a Mac and trying to use SourceTree. The only way I could get him to connect was for him to attempt to ssh to the server and I typed in the password (exited afterwards). Without that the system kept asking for a password for that server. Is this normal behaviour? How do non-sysadmin users gain access to gitolite?
0
[ 2, 1267, 8101, 27, 1572, 6440, 20, 4100, 262, 10601, 3913, 26, 27963, 800, 3726, 3726, 95, 22, 195, 1989, 309, 71, 4100, 262, 10601, 8128, 9, 65, 2206, 134, 9, 31, 92, 6379, 20, 32, 366, 21, 1448, 9, 21, 78, 4155, 63, 74, 309,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ignore requests from internal redirects === RewriteRule ^resources/.+$ - [L] RewriteRule .? index.php?t=$0 [QSA,L] Would produce a `500 - Internal Server Error`, because it would repeat again and again the same rule, due to internal redirected requests which are exactly treated as the first one. It would lead to an infinite chain of `index.php?t=index.php&t=index.php&t=index.php&[...infinite more...]&t=test.php` But in my opinion this is not much better: RewriteRule ^resources/.+$ - [L] RewriteCond %{QUERY_STRING} !t= RewriteCond %{REQUEST_URI} !^index\.php$ RewriteRule .? index.php?t=$0 [QSA,L] Because now the user could input `index.php?t=test.php` as address, would pass the script and get the same content as if he had given `test.php`. I don't like that. So how do I execute the first one without the issue of repeating internal redirects?<br /> Surely, a flag _VL_ - _Very Last_ would do the trick but sadly it does not exist.
0
[ 2, 7174, 12279, 37, 3117, 302, 14706, 18, 800, 3726, 3726, 27891, 16154, 13, 1, 99, 12097, 18, 118, 9, 2430, 4403, 13, 8, 636, 255, 500, 27891, 16154, 13, 9, 60, 4348, 9, 26120, 60, 38, 3726, 4403, 387, 636, 1251, 1229, 15, 255,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 3: Unknown attribute === I'm wondering if someone could give me some hints as to why I'm getting an unknown attribute error when trying to create instances of a model I have created (Card). Here is a stripped down version of the model class and the rake task where I am getting the error. Card class: class Card < ActiveRecord::Base has_and_belongs_to_many :some_other_model belongs_to :some_other_other_model attr_accessible :attr1, :attr2, :attr3, :attr4,...,:card_type,... end rake task: task :import_cards => :environment do # connect to database conn = Mysql2::Client.new(yadda yadda yadda) results = conn.query("SELECT attr1, attr2, attr3, attr4,..., card_type, ... FROM that_table;") results.each{|row|; Card.create(:attr1 => row['attr1'], :attr2 => row['attr2'], :attr3 => row['attr3'], :attr4 => row['attr4'],..., :card_type => row['card_type'],...);} conn.close() end
0
[ 2, 2240, 18, 2635, 2562, 35, 14755, 800, 3726, 3726, 31, 22, 79, 5712, 100, 737, 110, 590, 55, 109, 6382, 18, 28, 20, 483, 31, 22, 79, 1017, 40, 2562, 35, 14755, 7019, 76, 749, 20, 1600, 13946, 16, 21, 1061, 31, 57, 679, 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...
Detect stack overflow with old GLIBC version === We suspect that we are encountering a stack overflow in our multithreaded program. However, as it is an embedded application, we have been unable to get valgrind etc working for it. Also, we are constrained to using GCC version v4.0.0 and GLIBC v2.3.2, which do not support the flag `-fstack-protector-all`. How could we go about detecting whether the segmentation faults we are seeing are the result of a stack overflow in this instance? We have doubled the stack size of all our threads, and this fixes the problem, but we would like to be sure that this is a genuine fix.
0
[ 2, 9092, 7566, 20285, 29, 315, 13, 6441, 7229, 615, 800, 3726, 3726, 95, 7551, 30, 95, 50, 7007, 68, 21, 7566, 20285, 19, 318, 1889, 96, 10647, 69, 625, 9, 207, 15, 28, 32, 25, 40, 12138, 3010, 15, 95, 57, 74, 2343, 20, 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...
php variables from another php file === A lot of versions around but i can not get it right... I need to transfer variables from one php script file to another. script1.php has the variables: $t1 = $_POST['t1']; $t2 = $_POST['t2']; and I neet to work with these variables in another script file - script2.php How can I access these variables in script2.php file? Thanks! Raivis
0
[ 2, 13, 26120, 12157, 37, 226, 13, 26120, 3893, 800, 3726, 3726, 21, 865, 16, 3281, 140, 47, 31, 92, 52, 164, 32, 193, 9, 9, 9, 31, 376, 20, 2617, 12157, 37, 53, 13, 26120, 3884, 3893, 20, 226, 9, 3884, 165, 9, 26120, 63, 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...
VBA Excel conditional row deletion === I've searched online and on here but can't find anything which seems to fit the bill and work. I have got some code which works but because the length of the range changes as it deletes rows it doesn't catch all of the rows to delete and so I end up running it several times which isn't great...I then added the screenUpdating = False condition before my loop and back to true after the loop but now it seems to do nothing at all. I have a spreadsheet with several columns, one of which is 'cost'. I need to go through the 'cost' column (which can sometimes be column 9, sometimes 10, hence the 'find' bit below) and delete any row where the cost is 0... Below is the code I've written so far, any help would be very, very much appreciated!!!! Sub RemoveRows() Dim cell As Range Dim lastRow As Long Dim lastColumn As Integer Dim criteraColumn As Integer Dim criteriaRange As Range Dim xlCalc As XlCalculation On Error Resume Next lastRow = Cells.Find(What:="*", After:=Range("A1"), LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).row lastColumn = Cells.Find(What:="*", After:=Range("A1"), LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column Rows(1).EntireRow.Select Set criteriaColumn = Selection.Find(What:="Cost", After:=ActiveCell, LookIn:= _ xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:= _ xlNext, MatchCase:=False, SearchFormat:=False).Column Set criteriaRange = Range(Cells(2, criteriaColumn), Cells(lastRow, criteriaColumn)) MsgBox ("Starting first iteration") 'Store current Calculation then switch to manual. 'Turn off events and screen updating With Application .ScreenUpdating = False End With For Each cell In criteriaRange.Cells If cell.Value = 0 Then cell.EntireRow.Delete End If Next cell 'Turn events and screen updating back on With Application .ScreenUpdating = True End With End Sub
0
[ 2, 566, 969, 20700, 21206, 3131, 28916, 800, 3726, 3726, 31, 22, 195, 9036, 2087, 17, 27, 235, 47, 92, 22, 38, 477, 602, 56, 2206, 20, 2742, 14, 1071, 17, 170, 9, 31, 57, 330, 109, 1797, 56, 693, 47, 185, 14, 1476, 16, 14, 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...
Using CSV files with Tradelink === I have recently downloaded [tradelink][1] and am in the process of familiarising my self with the code base. So far, I have not found any examples that show how to consume data from CSV files. is anyone aware of how to consume market data from a CSV file instead of the custom tradelink format? [1]: http://code.google.com/p/tradelink/
0
[ 2, 568, 272, 18, 710, 6488, 29, 1238, 6258, 800, 3726, 3726, 31, 57, 1989, 23887, 636, 19878, 6258, 500, 2558, 165, 500, 17, 589, 19, 14, 953, 16, 3694, 7552, 51, 1119, 29, 14, 1797, 1000, 9, 86, 463, 15, 31, 57, 52, 216, 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, 1, 1, 1, 1...
TCP Client/Server vs Multicast broadcast === I'm developing an none market appliction which run on 20-30 android devices (target specific to tablets with android honeycomb / ICS OS) maintaining connection over local WIFI network for a 1-2 hours period of time, and need to exchange data (simple objects representing commands) between them. most of the time one specific tablet behave like a server which sending the commands, and the other devices like clients which receives the commands, but the "clients" also sending commands to the "server" sometimes. as solution to this communication demand - I'm using for a while an open source library which encapsulates TCP client/server protocol, called - Kryonet. I found it very easy to use, and basically doing the job, although it sometimes "unstable" - a lot of disconnections accrues. **I can't afford this disconnections**, it's dammege the whole flow and use-case, causing the client's to lose commands. I'm doing some recovery logic which re-connect the clients and send them what they have missed, but it's not good enough for the use-case. recently I've heard about multicast broadcast protocol, and found even an open source library calls - JGroups which implement this protocol optimally, and expose easy and simple to use interface. still didn't tried it, but got advice from someone who knows, saying it should be better the the TCP client/server for my purpose. - what is the best approach I should use for implement the behavior I described ? (not necessarily one of the two I suggested) TIA
0
[ 2, 13, 38, 7439, 6819, 118, 10321, 106, 4611, 1889, 6146, 1992, 800, 3726, 3726, 31, 22, 79, 3561, 40, 2369, 1135, 4865, 4663, 3309, 56, 485, 27, 434, 8, 1762, 13005, 4690, 13, 5, 3958, 3060, 1903, 20, 20175, 29, 13005, 29806, 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...
Can't get property from another class === I have a class RootViewController where I have a `UIBarButtonItem` declared. The method to display it is in another class (FirstDetailViewController). I am trying to access it in another class (SecondDetailViewController), but it is always null. I tested with some other variables and they were null as well. Here's what I have: RootViewController.h @interface RootViewController : UITableViewController <UISplitViewControllerDelegate> { } @property (nonatomic, retain) UIBarButtonItem *rootPopoverButtonItem; ... @end --- RootViewController.m #import "RootViewController.h" #import "FirstDetailViewController.h" @implementation RootViewController @synthesize popoverController, splitViewController, rootPopoverButtonItem; - (void)splitViewController:(UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController:(UIPopoverController*)pc { NSLog(@"splitviewController will hide"); // Keep references to the popover controller and the popover button, and tell the detail view controller to show the button. barButtonItem.title = @"Menu"; self.popoverController = pc; self.rootPopoverButtonItem = barButtonItem; UIViewController <SubstitutableDetailViewController> *detailViewController = [splitViewController.viewControllers objectAtIndex:1]; [detailViewController showRootPopoverButtonItem:rootPopoverButtonItem]; } --- FirstDetailViewController.m - (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem { NSLog(@"show root popover button item"); // Add the popover button to the toolbar. NSMutableArray *itemsArray = [toolbar.items mutableCopy]; [itemsArray insertObject:barButtonItem atIndex:0]; [toolbar setItems:itemsArray animated:NO]; [itemsArray release]; } --- SecondDetailViewController.h #import "RootViewController.h" @class RootViewController; @interface SecondDetailViewController : UIViewController <SubstitutableDetailViewController, UIScrollViewDelegate, UITextFieldDelegate, UITextViewDelegate> { ... } @property (nonatomic, retain) RootViewController *root; @end --- //SecondDetailViewController.m #import "SecondDetailViewController.h" @implementation SecondDetailViewController @synthesize root; ... NSLog(@"view class : %@", [root.splitViewController class]); [detailViewController showRootPopoverButtonItem:root.rootPopoverButtonItem]; ...
0
[ 2, 92, 22, 38, 164, 1354, 37, 226, 718, 800, 3726, 3726, 31, 57, 21, 718, 5900, 4725, 12898, 1252, 113, 31, 57, 21, 13, 1, 5661, 1850, 811, 444, 2119, 79, 1, 2482, 9, 14, 2109, 20, 3042, 32, 25, 19, 226, 718, 13, 5, 3552, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GraphicsMagick performance issue using c++ java native code === I am using GraphicsMagick C++ api and calling it in a java web project which is deployed on tomcat to resize images dynamically on runtime from a certain size to given width/height. I am using scale() method of C++ api. Now the performance is normal when there is not much load on tomcat but when number of connections/load increases on server the performance of Image resizing declines greatly. Even it goes to 30 to 40 seconds on each resize. Although memory , cpu and io utilization of the system seems normal and not bad at all. Can any one help me with this issue? I would be highly grateful
0
[ 2, 8351, 21200, 197, 956, 1513, 568, 272, 20512, 8247, 1275, 1797, 800, 3726, 3726, 31, 589, 568, 8351, 21200, 197, 272, 20512, 21, 2159, 17, 2555, 32, 19, 21, 8247, 2741, 669, 56, 25, 6698, 27, 2067, 5782, 20, 302, 10454, 3502, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How is it that lastTimeTargetAdded is ever not 0 === Im beginning work with Cocos2d and have been working off this [tutorial][1] (link is for part 9) the past few days. In reading the source and trying to understand it I have reached a section that doesnt make any sense to me. -(void)gameLogic:(ccTime)dt { static double lastTimeTargetAdded =0; double now = [[NSDate date] timeIntervalSince1970]; AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; if(lastTimeTargetAdded == 0 || now - lastTimeTargetAdded >= delegate.curLevel.spawnRate) { [self addTarget]; lastTimeTargetAdded = now; } } called via this: [self schedule:@selector(gameLogic:) interval:0.2]; With the fact that `lastTimeTargetAdded` is created and set each time the function runs how is it ever not 0? And if thats the case what is the point of `lastTimeTargetAdded = now`? With the if statement being an OR (||) it never evaluates the other side of it so why is that even there? I understand well enough what the function does just not so much how it does it. This method is suppose to spawn creeps based on their spawn rate. Making sure all the creeps in the wave arent just dumped on screen. And the method does do that well enough. [1]: http://www.iphonegametutorials.com/2012/03/06/how-to-build-a-tower-defense-game-for-the-iphone-part-9-menus/
0
[ 2, 184, 25, 32, 30, 236, 891, 3958, 3060, 14854, 69, 25, 462, 52, 713, 800, 3726, 3726, 797, 997, 170, 29, 22470, 18, 135, 43, 17, 57, 74, 638, 168, 48, 636, 2473, 9819, 192, 500, 2558, 165, 500, 13, 5, 6258, 25, 26, 141, 56...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Securely storing credentials for repeat web service calls === I'm working on a web application for internal use that is driven by many web service requests to another remote server. The internal site maintains its own session, authenticated by username/password credentials that are themselves backed by the web service(i.e. we make a remote authentication call to verify the login to the internal site). The web service requests also require authentication using these same credentials. We were hoping these web service requests could remain stateless, which means passing the credentials in with every request for authentication. The problem is remembering the credentials to be used(the ones entered during the initial login) in a way that is secure. I'm not aware of any truly safe way to store a password for later re-use - hashing it would sacrifice our ability to use it again. The best we could do would be to encode it in the session scope and hope that no malicious developer will ever try to catch it in a thread dump or something. Is there a better solution to this that I'm missing? Am I being overly paranoid about the risk of storing an encoded password in memory, or is our approach to this project flawed?
0
[ 2, 4315, 102, 25615, 5059, 43, 10107, 18, 26, 6830, 2741, 365, 3029, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 2741, 3010, 26, 3117, 275, 30, 25, 5355, 34, 151, 2741, 365, 12279, 20, 226, 5388, 8128, 9, 14, 3117, 689, 9767, 82, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Placing images in a fixed layout GTK2 === I have an application that is attempting to do the following: - Create a `GTK2` top level main window - Add a fixed frame into the main window for absolute positioning of widgets - Create a matrix of `GtkImages` that will be used to display animated `GIFS` and static `JPEGS` - On start-up the static `JPEGS` picked randomly from a list will fill the matrix - When an event happens the matrix will be filled with animated `GIFS` - When the animation is over possibly different `JPEGS` will again be displayed in the matrix Run time errors are happening only when two or more of the randomly selected `JPEGS` are placed in a row of the matrix. Here is an example of such a run time error: (wrong:3909): Gtk-WARNING **: Can't set a parent on widget which has a parent If each image of the row are unique no run time errors occur. Code snippets and run time output are as follows: /* * Compile me with: * gcc -Wall -o wrong wrong.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) */ /* header includes */ /**** prototypes ****/ /********************/ typedef struct { unsigned int pixel_width, pixel_height; gchar fileName[20]; GtkWidget *image; }symbol_t; symbol_t symbols[] = { { 118, 107, "images/LO.jpg", NULL }, { 118, 107, "images/L1.jpg", NULL }, { 118, 107, "images/L2.jpg", NULL }, { 118, 107, "images/L3.jpg", NULL }, { 118, 107, "images/H1.jpg", NULL }, { 118, 107, "images/H2.jpg", NULL }, { 118, 107, "images/H3.jpg", NULL }, { 118, 107, "images/H4.jpg", NULL }, { 118, 107, "images/H5.jpg", NULL } }; GtkWidget *frame; /* for absolute positioning of widgets */ GtkWidget *window; int Init( void ) { /* initialize random number generator */ } static void destroy (GtkWidget *window, gpointer data) { gtk_main_quit (); } GtkWidget *SetupWindow(gchar *data, const gchar *filename) { /* setup top-level window setting the background to the image contained in *filename and return window widget */ return(window); } int main (int argc, char *argv[]) { unsigned int y, i, pos_x, pos_y; gtk_init (&argc, &argv); Init(); // init random number generator window = SetupWindow("Broken", "images/background.jpg"); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL); frame = gtk_fixed_new(); gtk_container_add(GTK_CONTAINER(window), frame); /* setup symbol jpgs */ for( i = 0; i < 9; i++ ) { /* load each symbol image into memory */ symbols[i].image = gtk_image_new_from_file( symbols[i].fileName ); } /* display some symbols */ pos_y = 150; pos_x = 187; for( y = 0; y < 5 ; y++ ) /* first row - 5 symbols */ { i = (unsigned int)(random()%9); printf("Symbol[%d] [%s]\n", i, symbols[i].fileName); gtk_fixed_put(GTK_FIXED(frame), symbols[i].image, pos_x, pos_y); pos_x += symbols[i].pixel_width; } gtk_widget_show_all(window); gtk_main (); return 0; } **Run time errors when two or more matching symbols ( images ) are placed on the row:** > [chim] ~/source/matrix > ./wrong > Symbol[1] [images/L1.jpg] > Symbol[7] [images/H4.jpg] > Symbol[0] [images/LO.jpg] > Symbol[7] [images/H4.jpg] > > (wrong:3909): Gtk-WARNING **: Can't set a parent on widget which has a parent > > Symbol[5] [images/H2.jpg] > > (wrong:3909): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed > > (wrong:3909): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed When this occurs some of the images in the row are empty ( white ). **Output when no matching symbols ( images ) are placed on the row:** > [chim] ~/source/matrix > ./wrong > Symbol[1] [images/L1.jpg] > Symbol[6] [images/H3.jpg] > Symbol[3] [images/L3.jpg] > Symbol[0] [images/LO.jpg] > Symbol[4] [images/H1.jpg] And in this case all images are displayed properly. Any suggestions about how to fix and what I might be doing wrong?
0
[ 2, 5861, 3502, 19, 21, 3535, 9106, 9509, 197, 135, 800, 3726, 3726, 31, 57, 40, 3010, 30, 25, 6314, 20, 107, 14, 249, 45, 13, 8, 1600, 21, 13, 1, 263, 38, 197, 135, 1, 371, 662, 407, 1463, 13, 8, 3547, 21, 3535, 3523, 77, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Organisational Heirarchical Chart using aspnet === I am working in an aspnet project where i want to create an organisational heirarchical chart which must be server side scripting like retrieving values from the database.I have it for client side scripting. below is the example![enter image description here][1] [1]: http://i.stack.imgur.com/gSaNC.jpg
0
[ 2, 4080, 192, 7678, 8027, 4272, 1795, 568, 28, 306, 2328, 800, 3726, 3726, 31, 589, 638, 19, 40, 28, 306, 2328, 669, 113, 31, 259, 20, 1600, 40, 4080, 192, 7678, 8027, 4272, 1795, 56, 491, 44, 8128, 270, 3884, 68, 101, 13, 6239,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Excel and web based application integration === I have a list of around 700 items in excel. I need to punch in each of the value in a web based java application and take in the corresponding value for a report. Is there anyway I can do this using Excel VBA or python. Thanks in advance.
0
[ 2, 20700, 17, 2741, 432, 3010, 8078, 800, 3726, 3726, 31, 57, 21, 968, 16, 140, 10954, 3755, 19, 20700, 9, 31, 376, 20, 7756, 19, 206, 16, 14, 1923, 19, 21, 2741, 432, 8247, 3010, 17, 247, 19, 14, 7265, 1923, 26, 21, 1330, 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...
issue with modifying the webconfig file === I am using console application to modify the web config file of mvc projects to add a new assembly reference. var path = @"C:\Tools"; var newAssembly = @"System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"; var files = Directory.GetFiles(path, "Web.config", SearchOption.AllDirectories); foreach (var file in files) { var doc = XDocument.Load(file); var parentElement = doc.Descendants("assemblies").FirstOrDefault(); if (parentElement != null) { var newNode = new XElement("add", new XAttribute("assembly", newAssembly)); parentElement.Add(newNode); } doc.Save(file); } Its modifying the web config files successfully, but after modifying the root element of web config file is modified as <?xml version="1.0" encoding="utf-8"?> i.e. encoding="utf-8" is added, which is not specified by myself in console applcation. Can someone help why its getting added into my file?
0
[ 2, 1513, 29, 17579, 68, 14, 2741, 14093, 2816, 3893, 800, 3726, 3726, 31, 589, 568, 8650, 3010, 20, 17579, 14, 2741, 13, 14093, 2816, 3893, 16, 307, 8990, 2314, 20, 3547, 21, 78, 1475, 2801, 9, 4033, 2013, 800, 13, 1, 7, 150, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
online offline contacts === Hai iam new to the android How to add gmail online and offline contacts to database,and again i have to retrive the contacts from database can any body help me in this.. Thanks in advance
1
[ 2, 2087, 168, 1143, 11894, 800, 3726, 3726, 8349, 31, 765, 78, 20, 14, 13005, 184, 20, 3547, 489, 8079, 2087, 17, 168, 1143, 11894, 20, 6018, 15, 290, 188, 31, 57, 20, 302, 3367, 195, 14, 11894, 37, 6018, 92, 186, 358, 448, 55, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to compile PJSIP 2.x in xcode 4.3.2 and also how to use it? === I'm trying to compile the PJSIP 2.x that i got from [this link][1]. After that I follow step by step, and got the permission denied whenever i have to run ./configure-iphone. what is the different between the PJSIP that i already downloaded and PJSIP subversion repository? after I compile the PJSIP, I also download the SIPHON using this code. `svn checkout http://siphon.googlecode.com/svn/trunk/ siphon`, i wrote that at my terminal. and will automatically create a folder at my pjproject folder. and have a xcode file inside. but whenever i want to try and build the app, it show an error. the error is > pjsua-lib/pjsua.h file not found. I have 8 kind of error with the same message. does anybody know what wrong is that? thanks. [1]: http://www.pjsip.org/download.htm
0
[ 2, 184, 20, 26561, 13, 21670, 18, 4307, 172, 9, 396, 19, 993, 9375, 268, 9, 240, 9, 135, 17, 67, 184, 20, 275, 32, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 26561, 14, 13, 21670, 18, 4307, 172, 9, 396, 30, 31, 330, 37, 636...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: How to pass reference (non-serializable) from one Activity to another? === Say I have an object (that does not implement serializable), how should I go about passing this from one Activity to another? Thanks.
0
[ 2, 13005, 45, 184, 20, 1477, 2801, 13, 5, 3951, 8, 4104, 2815, 3186, 579, 6, 37, 53, 2358, 20, 226, 60, 800, 3726, 3726, 395, 31, 57, 40, 3095, 13, 5, 887, 630, 52, 8713, 5956, 3186, 579, 6, 15, 184, 378, 31, 162, 88, 2848, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
How to set a Printer Port in C# on a specified Printer === I want to be able to do the equivalent of the following in c#: - Go into "Devices and Printers" - Right click a printer - Go to the ports tab - Select COM12: port - click OK I have managed to get a ManagementObject for a named printer and tried to call: > mObj.SetPropertyValue("PortName","COM12:"); On the ManagementObject for that Printer - whch inherits from ManagementBaseObject. However, this piece of code didn't do anything to the Printer Settings. I suspect that I will need to use P/Invoke on the appropriate library but after a lot of searching I cannot find the library or a tutorial for how to do this from c#. Any help would be much appreciated.
0
[ 2, 184, 20, 309, 21, 12925, 1295, 19, 272, 5910, 27, 21, 9931, 12925, 800, 3726, 3726, 31, 259, 20, 44, 777, 20, 107, 14, 4602, 16, 14, 249, 19, 272, 5910, 45, 13, 8, 162, 77, 13, 7, 546, 18507, 18, 17, 12925, 18, 7, 13, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Implementing enumerate_foreach based on Boost foreach === To preface this question: I've been implementing various C++ utility functions and (when I have to) macros in a larger toolkit for my own use. Recently I had been making a variety of loop macros based on BOOST_FOREACH as well as iterable conscious functions. Long story short, I ran into difficulty making an **enumerate-loop** which uses BOOST_FOREACH but with an additional parameter passed which is incremented on every iteration of the loop. This would function much like the enumerate command in Python which I find useful when looping over arbitrary iterators without adding a lot of boiler plate code. The macro takes the form like BOOST_FOREACH: ENUMERATE_FOREACH(COUNT, VAR, COL) and would effectively do this, but without relying on placing an unbalanced '}' to close (or other loop ending macro): COUNT = 0; BOOST_FOREACH(VAR, COL) { COUNT++; ...Rest of loop... Now before I get the accusations of trying to make a non-C++ operator in C++, I am fully aware that this is cramming a foreign concept into C++ and I'm not trying Pythonize C++ code. I am simply curious if it's cleanly possible to implement such a loop with known toolsets/boost without extreme dependencies. Having such a macro definition would eliminate a possible source of bugs for certain styles of looping where I need to count as I iterate and it disambiguates the purpose of the COUNT variable. I thought about doing a template wrapper on the COL variable before it goes into BOOST_FOREACH, but the number of possibilities for COL makes that difficult/impossible with some combinations of iterable varibles without making different version of ENUMERATE_FOREACH and re-implementing a lot of BOOST_FOREACH -- a daunting and fool-worthy task without immense testing/time. Doing a separate inline function could work, but then the syntax of looping becomes broken and I'm to more of a on-each style operator function passing situation (which I already have implemented). This has left me with taking the final lines of foreach.hpp from boost's libraries and inserting my own increment operator on the additional argument. Then I become boost version dependent and worry about new updates (any syntax changes) to boost breaking my hacky custom macro. A last option I thought about is to do a ENUMERATE_BEGIN and ENUMERATE_END to hide my iterator increment operation. This approach is more error prone than a single macro as the user must place two macros instead of one -- though that might be the only simple solution. I tried looking around on SO and other sources to see if someone had tried this before without much luck. Hopefully someone has played with such an implementation concept successfully or has an idea about changing my approach. If there isn't a clean way of doing this I can just keep starting my loops with a count++ when I want to count. Again this is more of a curiosity and someone may propose that one of the ideas I quibbled about is a perfectly reasonable approach or as good as it will get.
0
[ 2, 17333, 26940, 62, 1, 1106, 14322, 432, 27, 10419, 26, 14322, 800, 3726, 3726, 20, 20910, 48, 1301, 45, 31, 22, 195, 74, 17333, 617, 272, 20512, 10082, 3719, 17, 13, 5, 3185, 31, 57, 20, 6, 9069, 18, 19, 21, 1662, 5607, 13703,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get values from jTable and store in a database? === I am not able to understand how to get the values entered in a jTable and store them in a database. Can anyone please help me with the code.
0
[ 2, 184, 20, 164, 4070, 37, 487, 5924, 17, 1718, 19, 21, 6018, 60, 800, 3726, 3726, 31, 589, 52, 777, 20, 1369, 184, 20, 164, 14, 4070, 1297, 19, 21, 487, 5924, 17, 1718, 105, 19, 21, 6018, 9, 92, 1276, 2247, 448, 55, 29, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Fill in Macro to Length cont === Ok I am still trying to learn this macro, but I need Column C to fill in just to the length of B. Right now this macro just wipes out what I have in C1. I can't figure out why. Dim LRow As Long With Sheets("Sheet4") LRow = .Range("B" & .Rows.Count).End(xlUp).Row .Range("C1:C" & LRow).Value = Number .Columns(1).EntireColumn.AutoFit End With I got this to work to fill in the dat on another macro, but can't get this to work.Thanks
0
[ 2, 3509, 19, 9069, 20, 1476, 1065, 38, 800, 3726, 3726, 5854, 31, 589, 174, 749, 20, 2484, 48, 9069, 15, 47, 31, 376, 4698, 272, 20, 3509, 19, 114, 20, 14, 1476, 16, 334, 9, 193, 130, 48, 9069, 114, 11500, 18, 70, 98, 31, 57...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javascript returning element with different styling? === I have a script that hides an element and its content and loads another element and its content on click. The strange thing is, it seems to pile up the 1px border and returns the second element with a 2px border, while showing it still has 1. This is the link code: <li ><a href="plumbing.php">Plumbing</a></li> This is the element in question: <div id="box1"> <ul class="tabs"> <li><a href="#" class="defaulttab" rel="tabs1">Tab #1</a></li> <li><a href="#" rel="tabs2">Tab #2</a></li> <li><a href="#" rel="tabs3">Tab #3</a></li> </ul> <div class="tab-content" id="tabs1">Tab #1 content</div> <div class="tab-content" id="tabs2">Tab #2 content</div> <div class="tab-content" id="tabs3">Tab #3 content</div> </div> Element that on the page that gets loaded is identical with the exception of having only 1 tab and 1 tab content (for the purpose of testing). Style: #box1{width:700px;height:100%;float:left;background:url(../images/box1bg_03.gif);background-repeat:repeat-x;border: 1px solid #d0ccc9;} Javascript: $(document).ready(function() { var hash = window.location.hash.substr(1); var href = $('.navcontent li a').each(function(){ var href = $(this).attr('href'); if(hash==href.substr(0,href.length-5)){ var toLoad = hash+'.html #box1'; $('#box1').load(toLoad) } }); $('.navcontent li a').click(function(){ var toLoad = $(this).attr('href')+' #box1'; $('#box1').hide('fast',loadContent); $('#load').remove(); $('#box1').append('<span id="load">LOADING...</span>'); $('#load').fadeIn('normal'); window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5); function loadContent() { $('#box1').load(toLoad,'',showNewContent()) } function showNewContent() { $('#box1').show('normal',hideLoader()); } function hideLoader() { $('#load').fadeOut('normal'); } return false; }); }); In theory, everything works perfectly except the border - http://imgur.com/a/isqgH. Very annoying.
0
[ 2, 8247, 8741, 2485, 4520, 29, 421, 23020, 60, 800, 3726, 3726, 31, 57, 21, 3884, 30, 3077, 18, 40, 4520, 17, 82, 2331, 17, 19069, 226, 4520, 17, 82, 2331, 27, 10840, 9, 14, 2578, 584, 25, 15, 32, 2206, 20, 6551, 71, 14, 137, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Implementing copy of Android App DB file for backup/restore is this proper way? === I am using java methods to copy my application sqlite db from the application data directory to a folder in sd and have code to restore these file back to the application data directory. Is this a proper way of doing it? Are there potential errors or data corruption since it's a database file?
0
[ 2, 17333, 4344, 16, 13005, 4865, 13, 9007, 3893, 26, 10119, 118, 99, 16828, 25, 48, 4119, 161, 60, 800, 3726, 3726, 31, 589, 568, 8247, 3195, 20, 4344, 51, 3010, 4444, 10601, 13, 9007, 37, 14, 3010, 1054, 16755, 20, 21, 19294, 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...
Double hop SQL delegation not working === I've been trying to diagnose this for some time, and unfortunately Im still getting the dreaded anonymous logon issue when trying to connect to a sql db as a domain user. Steps taken: - App Pool created with delegation service acct - Site / Virtual dir running with Integrated Windows auth only - Made sure site itself can use kerberos KB 215383 - Service acct added to IIS_WPG group - Service acct added to "act as part of operating system" under Local Security settings - Service acct added to Log on as service under Local Security Settings - HTTP SPN set for web address + service account (and FQDN) - MSSQLSvc SPN set for sql box and domain acct sql is running as - Trust for delegation turned on service acct, specified services, and sql service acct After all this, Im still getting the exact same error from when I started. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. This has advanced my balding by at least 5 years so far. I would greatly appreciate any additional tips on diagnosing or setting up.
0
[ 2, 1494, 5469, 4444, 255, 9651, 52, 638, 800, 3726, 3726, 31, 22, 195, 74, 749, 20, 28438, 48, 26, 109, 85, 15, 17, 6200, 797, 174, 1017, 14, 10743, 69, 10364, 6449, 103, 1513, 76, 749, 20, 6379, 20, 21, 4444, 255, 13, 9007, 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...
Changing Pushpin Text Color === I'm attempting to display data through the text of a `Pushpin` object. However, the text color defaults to white which is nigh-invisible when the backdrop is a road-style `MapView`. Looking through the API, paying especially close attention to `PushpinOptions`, I couldn't find anything that manipulated text color. Considering that this seems to a fairly basic feature, I'm a little confused as to why it doesn't exist or at least is really hard to find. Am I missing something or does Bing Maps for Android really not let you change the default text color for a `Pushpin` object?
0
[ 2, 4226, 3250, 3489, 1854, 1665, 800, 3726, 3726, 31, 22, 79, 6314, 20, 3042, 1054, 120, 14, 1854, 16, 21, 13, 1, 26973, 3489, 1, 3095, 9, 207, 15, 14, 1854, 1665, 12838, 18, 20, 359, 56, 25, 13, 103, 6872, 8, 108, 3762, 3426,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Map QVariant type to SQLite type === I need to convert type of QVariant variable to QString of SQLite data type. It seems, that QSqlDriver should do that, but I can't find any method for such conversion.
0
[ 2, 2942, 2593, 18445, 1001, 20, 4444, 10601, 1001, 800, 3726, 3726, 31, 376, 20, 8406, 1001, 16, 2593, 18445, 7612, 20, 2593, 11130, 16, 4444, 10601, 1054, 1001, 9, 32, 2206, 15, 30, 2593, 18, 22402, 21752, 378, 107, 30, 15, 47, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Location Search === Hi I'm trying to work on some search functionality for a webpage I'm working on at the moment and i need a search box that will auto-complete but only return - towns/cities, Country, Airports and resorts. i though i could use Google maps and just remove the map as the search box on https://maps.google.co.uk/ works pretty much how i want it to but i cannot find any documentation of how to replicate that in my page everything iv found deals with the actual map (that i don't actually want), any input would be welcome. thanks in advance
0
[ 2, 1474, 2122, 800, 3726, 3726, 4148, 31, 22, 79, 749, 20, 170, 27, 109, 2122, 18548, 26, 21, 2741, 6486, 31, 22, 79, 638, 27, 35, 14, 688, 17, 31, 376, 21, 2122, 1649, 30, 129, 3108, 8, 15990, 47, 104, 788, 13, 8, 3613, 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...
Override DbContext SaveChanges === I use EF 4.3.1 I need adding a Default Value of an entity at the moment of saving. At the moment I'm using SaveChanges() and it works. As you can see from the code I use `ChangeTracker.Entries<Option>()` where `Option` rappresent a specifc DataType. I would like to know if is possible and how to write a more generic version of ChangeTracker.Entries something like `ChangeTracker.Entries<t>()` so it can check all type of entities in my Model, as you can see in my specif case I have a NoteInternal property on many classes public override int SaveChanges() { #region Option BL var entities = ChangeTracker.Entries<Option>() .Where(e => e.State == EntityState.Added || e.State == EntityState.Modified) .Select(e => e.Entity); // Add Default values when Creating or Editing an Entity string defaultvalue = ""; foreach (var entity in entities) { if (String.IsNullOrWhiteSpace(entity.NoteInternal)) entity.NoteInternal = defaultvalue; } #endregion return base.SaveChanges(); } Thanks for your help! PS: does it make sense use the DYNAMIC datatype here?
0
[ 2, 84, 11891, 13, 9007, 1126, 11969, 2079, 16229, 18, 800, 3726, 3726, 31, 275, 11599, 268, 9, 240, 9, 165, 31, 376, 4721, 21, 12838, 1923, 16, 40, 9252, 35, 14, 688, 16, 7599, 9, 35, 14, 688, 31, 22, 79, 568, 2079, 16229, 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...