unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Set selected option of type model in dropdownlist with knockout === I'm trying to load the saved option from server side with knockout, please see below the general idea, I have the following classes in javascript: funcion Request() { this.Id = ko.observable(''); this.Name = ko.observable(''); this.Form = ko.obsevable(''); } function Form() { this.Id = ko.observable(''); this.Name = ko.observable(''); } this is my viewModel function RequestViewModel() { var self = this; self.Request = new Request(); *self.Request.Form = new Form();* } I can save the Form without problem, but when I try to load the Form field saved into the database, the binding doesn't function. If anybody have ever had the same problem, please let me know How can I fix it?
0
[ 2, 309, 1704, 4255, 16, 1001, 1061, 19, 2804, 2968, 5739, 29, 11676, 800, 3726, 3726, 31, 22, 79, 749, 20, 6305, 14, 4377, 4255, 37, 8128, 270, 29, 11676, 15, 2247, 196, 1021, 14, 297, 882, 15, 31, 57, 14, 249, 2684, 19, 8247, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 execute multiple functions on mutliple objects at the same time in javascript? === Say I have 5 different javascript timers that start ticking when I click "start", each are referenced in variable timer1, timer2, timer3, timer4, timer5. If these timers were each in an array, I would have to do something like this in pseudocode: foreach timer in timerarray { timer.stop; timer.setstoptime(time that it stopped); } The issue here is that if I were to get "getstoptime", due to having to iterate through the array for each timer, all the timers would have different values for the time that they stopped. Is there some way to keep track of all the timers and make it such that when I click on stop, if I were to be able to retrieve their stop time, all of them would be identical? I know this is unlikely to happen with javascript iterating through arrays very fast, but because the array has to iterate, there is a small time gap before each timer stops. I am looking for a way to ensure that all get "stop" executed on them simultaneously. If someone can provide some kind of sample code and some recommendation how to ensure this happens would be great.
0
[ 2, 184, 20, 15644, 1886, 3719, 27, 13, 7903, 6013, 413, 3916, 35, 14, 205, 85, 19, 8247, 8741, 60, 800, 3726, 3726, 395, 31, 57, 331, 421, 8247, 8741, 85, 1224, 30, 799, 8809, 68, 76, 31, 10840, 13, 7, 13680, 7, 15, 206, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JSON does not preserve order === I'm very new to serialization and I'm having a problem. I'm using javascript and JSON to serialize a key column consisting of floats, strings, and arrays of floats or strings. I have one rule. For the purpose of comparison, arrays are bigger than strings and strings are bigger than floats. Strings are compared alphabetically and floats are compared numerically. So before serializing, I sort the key column but when JSON serializes the key column the order is gone. For Example if I start with the following key column: 11, 2, "1" after sorting I'll get: "1", 2, 11 but after serializing, I'll get: "11", "2" , ""1"" Does anyone know how I can save the order? Is there any other serialization method that could preserve this order? any suggestion is highly appreciated. Thank you so much.
0
[ 2, 487, 528, 630, 52, 6224, 389, 800, 3726, 3726, 31, 22, 79, 253, 78, 20, 5956, 1829, 17, 31, 22, 79, 452, 21, 1448, 9, 31, 22, 79, 568, 8247, 8741, 17, 487, 528, 20, 5956, 2952, 21, 1246, 4698, 4160, 16, 11510, 18, 15, 788...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Temp Table / Transform Query - Iterative Looping with Commit into a Results Table === When operating on millions of records (as in 50 Million), this procedure literally is taking over a day (lol). I need help to run the query faster and have no access to an expert SQL Mgmt Studio 2008 SQL coder. You helped me write this, and it works exactly as needed, but it's REAL slow given the gargantuan record set. The thing crashes before committing all the results with an out of memory error. =0(. <br> <br>I'm thinking that if the query were coded to iteratively run on a subset of records (for i=1 to n), then commit the results to RESULTS table, then continue on to do subset 2 of the same size, then commit results to the RESULTS table, then continue on until all of the millions are written to RESULTS the query won't die from hogging system memory. <br> <br>Can someone help? <br>------------------------------------- <br> <br>USE [CoreDB] <br>GO <br>/****** Object: StoredProcedure [dbo].[Transformdata] Script Date: 07/06/2012 18:36:18 ******/ <br>SET ANSI_NULLS ON <br>GO <br>SET QUOTED_IDENTIFIER ON <br>GO <br>ALTER PROCEDURE [dbo].[Transformdata] <br> <br>AS <br> <br>BEGIN <br> <br>IF OBJECT_ID ('dbo.Tempr', 'U') IS NOT NULL <br> DROP TABLE dbo.Tempr; <br> <br>IF OBJECT_ID ('dbo.RESULTS', 'U') IS NOT NULL <br> DROP TABLE dbo.RESULTS; <br> <br>CREATE table Tempr <br>( <br> OccurID int, <br> seq tinyint, <br> Descr varchar(255), <br> Value varchar(255) <br>) <br> <br>Insert into Tempr (OccurID,seq,Descr,Value) [OccurID],seq,[Desc],[Value] <br>from [CoreDB].[dbo].[Table] order by OccurID,seq <br> <br>select T.R.value('(Value[@Descr = "param1"])[1]', 'varchar(18)') as Param1, <br> T.R.value('(nValue[@Descr = "param2"])[1]', 'varchar(18)') as Param2, <br> T.R.value('(nValue[@Descr = "param3"])[1]', 'varchar(15)') as Param3, <br> T.R.value('(nValue[@Descr = "param4"])[1]', 'varchar(2)') as Param4, <br> T.R.value('(nValue[@Descr = "param6"])[1]', 'varchar(50)') as Param6, <br> T.R.value('(nValue[@Descr = "param7"])[1]', 'varchar(4)') as Param7, <br> T.R.value('(nValue[@Descr = "param9"])[1]', 'varchar(16)') as Param9, <br> T.R.value('(nValue[@Descr = "param10"])[1]', 'varchar(16)') as Param10, <br> T.R.value('(nValue[@Descr = "param12"])[1]', 'varchar(20)') as Param12, <br> T.R.value('(nValue[@Descr = "param13"])[1]', 'varchar(18)') as Param13, <br> T.R.value('(nValue[@Descr = "param14"])[1]', 'varchar(15)') as Param14, <br> T.R.value('(nValue[@Descr = "param15"])[1]', 'varchar(2)') as Param15, <br> T.R.value('(nValue[@Descr = "param16"])[1]', 'varchar(8)') as Param16, <br> T.R.value('(nValue[@Descr = "param17"])[1]', 'varchar(2)') as Param17, <br> T.R.value('(nValue[@Descr = "param18"])[1]', 'varchar(12)') as Param18, <br> T.R.value('(nValue[@Descr = "param19 "])[1]', 'varchar(2)') as Param19, <br> T.R.value('(nValue[@Descr = "param20"])[1]', 'varchar(12)') as Param20, <br> T.R.value('(nValue[@Descr = "param21"])[1]', 'varchar(2)') as Param21, <br> T.R.value('(nValue[@Descr = "param22"])[1]', 'varchar(12)') as Param22, <br> T.R.value('(nValue[@Descr = "param23"])[1]', 'varchar(20)') as Param23, <br> T.R.value('(nValue[@Descr = "param24"])[1]', 'varchar(20)') as Param24, <br> T.R.value('(nValue[@Descr = "param25"])[1]', 'varchar(20)') as Param25, <br> T.R.value('(nValue[@Descr = "param26"])[1]', 'varchar(20)') as Param26 <br>into RESULTS <br>from <br> ( <br> select (select T1.Descr as "@Descr", <br> T1.Value as "*" <br> from Tempr T1 <br> where T1.OccurID = T.OccurID <br> for xml path('Value'), root('OccurID'), type) <br> from Tempr T <br> group by T.OccurID <br> for xml path(''), type <br> ) X(XML) <br> cross apply X.XML.nodes('OccurID') as T(R) END <br> <br> <br>The raw data that the parameters are being pulled from exists in a table called Table. The records we want to extract and put in columns appear in a field called 'Descr.' There can be anywhere from 26 to 36 'Descr' and corresponding 'Value' per each single 'OccurID.' <br> <br>Row OccurID Descr Value <br>1 1 param1 value_i <br>2 1 param2 value_ii <br>3 1 param3 value_iii <br>4 1 param4 value_iv <br>5 1 param5 value_v <br>6 1 param6 value_vi <br>7 1 param7 value_vii <br> <br>and so on... <br> <br>26 1 param26 value_xxvi <br>27 1 param27 value_xxvii <br>28 1 param28 value_xxviii <br> <br>and so on... <br> <br>36 1 param36 value_xxxvi <br>37 2 param1 value_a <br>38 2 param2 value_b <br>39 2 param3 value_c ... where the param and it's corresponding value can be different things (eg. height, g-force, decibels, temperature, etc). <br><br>Notice the elements are not all items 1-26, and rows exceed 26 items so the correct parameter must first be read (it will always be identical in all records, eg. if parameter 12 is the word 'height,' it will be 'height' in OccurID 1 and in OccurID 5,298,231, though the values may differ between records).
0
[ 2, 13, 9577, 859, 13, 118, 8007, 25597, 13, 8, 32, 106, 3366, 5293, 68, 29, 9686, 77, 21, 1736, 859, 800, 3726, 3726, 76, 2455, 27, 11999, 16, 742, 13, 5, 472, 19, 1222, 507, 6, 15, 48, 7004, 6949, 25, 741, 84, 21, 208, 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...
Fancybox Modal control location === I'm using Fancybox afterShow to display image descriptions on the side via overlay like so: afterShow : function (){ var description = "<div class='hidden_tab'>"+$("#tab").html()+"</div>" $('#fancybox-overlay').html(description); } The problem is that I need modal to be false so users can click out. But the hidden_tab tabs, when clicked, also exit fancybox. Is there a way to section where modal takes affect? Or a workaround? I have tried setting z-index for the hidden_tab to be high but this did not do the trick.
0
[ 2, 12251, 5309, 13, 20756, 569, 1474, 800, 3726, 3726, 31, 22, 79, 568, 12251, 5309, 75, 9303, 20, 3042, 1961, 15740, 27, 14, 270, 1197, 84, 4414, 101, 86, 45, 75, 9303, 13, 45, 1990, 13, 5, 6, 1, 4033, 5318, 800, 13, 7, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CSS3 Flexbox - fails in Safari with 960grid === I got flexbox working in Firefox, but in webkit browsers the display:box div loses background. Here is the online test: http://www.angeloalpaca.railsperu.com/html/ Here is a simple example, see that the background disappears in the floated flexbox div(webkit): http://www.angeloalpaca.railsperu.com/html/simple.html **The HTML:** <div id="main-wrapper" class="container_12"> <div id="main"> <div id="sidebar-first" class="grid_3"> </div> <div id="content" class="grid_8"> </div> </div> </div> <br /> **STYLES** #main{ display: -webkit-box; -webkit-box-orient: vertical; display: -moz-box; box-orient: vertical; display: box; box-orient: vertical} #main #sidebar-first{ padding-top:170px; background:#1a8099; -webkit-box-flex: 1; -moz-box-flex: 1; box-flex: 1} #content{ min-height:800px; background:red } <br /> **STYLES 960 grid** body{min-width:960px}.container_12{margin-left:auto;margin-right:auto;width:960px}.grid_3,.grid_8{display:inline;float:left;margin-left:10px;margin-right:10px}
0
[ 2, 272, 18, 18, 240, 14409, 5309, 13, 8, 13614, 19, 25055, 29, 13, 24504, 16375, 800, 3726, 3726, 31, 330, 14409, 5309, 638, 19, 535, 18219, 15, 47, 19, 2741, 13703, 16495, 18, 14, 3042, 45, 5309, 13, 12916, 14745, 2395, 9, 235, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create a user side page by using wordpress plugin === I am creating a wordpress plugin which is used to post the ads and it displaying in the user side, for these i had created a user side page and added a template page. Here is the code which i have used to create the page and template For crating a page $new_post = array( 'post_title' => 'Car Inventory', 'post_content' => 'Lorem ipsum dolor sit amet...', 'post_status' => 'publish', 'post_date' => date('Y-m-d H:i:s'), 'post_author' => 'dfdffddf', 'post_type' => 'page', 'post_category' => array(0) ); $post_id = wp_insert_post($new_post); For assigning template add_filter('page_template', 'in_page_template' ); function in_page_template(){ global $wpdb; $new_page_title = 'Car-Inventory'; $sql = "SELECT * FROM wp_posts where post_name='".$new_page_title."';"; $cnt_post = $wpdb->get_results($sql); $ppid=$_GET['page_id']; if(count($cnt_post)!=0){ $pid=$cnt_post[0]->ID; if($pid==$ppid){ //enqueue_styles('site'); // enqueue_scripts('site'); $page_template = dirname( __FILE__ ) . '/car_inventory.php'; return $page_template; } } } Its working fine, now i want to create a detail page listing all details of each add posted in plugin while clicking on images in listing page, how its possible?. Thanks in advance. Here is my temporary url http://rapidsurfing.net/wp_automobile/?page_id=22
0
[ 2, 184, 20, 1600, 21, 4155, 270, 2478, 34, 568, 833, 5890, 10922, 108, 800, 3726, 3726, 31, 589, 2936, 21, 833, 5890, 10922, 108, 56, 25, 147, 20, 678, 14, 16236, 17, 32, 17418, 19, 14, 4155, 270, 15, 26, 158, 31, 41, 679, 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...
Paperclip save remote images without extension === Here I have Controller require 'open-uri' user = User.new url = "some_remote_image.jpg" #remote image WITH extension user.image = open(url) user.save Model has_attached_file :image, :styles => { :thumb => "25x25>", :large => "1000x1000>" }, :path => ":rails_root/images/users/:id/:style/:hash.:extension", :url => "/images/users/:id/:style/:hash.:extension", :hash_secret => "hash string" This work, but images stores without extension, for ex. "some_remote_image." If uploading images by post form everything uploading WITH extension. I'm confused.
0
[ 2, 1397, 150, 6013, 2079, 5388, 3502, 366, 3896, 800, 3726, 3726, 235, 31, 57, 9919, 4077, 13, 22, 10157, 8, 3594, 22, 4155, 800, 4155, 9, 2681, 287, 6362, 800, 13, 7, 3220, 1, 99, 20209, 1, 22039, 9, 12851, 263, 7, 6926, 99, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
getting easy_install to install something for python2.5 when default is python2.7 === since i'm using google app engine, i have to use python2.5. because of this, i need to install an older version of BeautifulSoup that works with python2.5 (i think bs 3.0.7a will work). in order to do that, as far as i can tell, i need to get easy_install to put BeautifulSoup in the python2.5 folder rather than in the python2.7 folder, which is does by default. the docu for easy_install said the following: "Also, if you’re working with Python version 2.4 or higher, you can run Python with -m easy_install to run that particular Python version’s easy_install command." but how exactly do i do that?
0
[ 2, 1017, 2010, 1, 108, 21300, 20, 16146, 301, 26, 20059, 135, 9, 264, 76, 12838, 25, 20059, 135, 9, 465, 800, 3726, 3726, 179, 31, 22, 79, 568, 8144, 4865, 1406, 15, 31, 57, 20, 275, 20059, 135, 9, 264, 9, 185, 16, 48, 15, 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...
Moving ODBC connections from WindowsXP to Win7 64bit === I need to move several ODBC connections (including settings, pwd, etc.) to a new machine. I have exported each key from `HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI`to a `.REG` file. Then i imported each one of them in the target machine registry. They appeared under `HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI`. But the ODBC (I was checking both, the one in `C:\Windows\Sys32` and `C:\Windows\SysWOW64`) is completely blank. I also tried editing the exported .REG files and changed `HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI` values to `HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI` but it is the same story. The keys get imported, but the ODBC sources are blank even after reset. What am I doing wrong?
0
[ 2, 1219, 12340, 7229, 6760, 37, 1936, 396, 306, 20, 628, 465, 4384, 3326, 800, 3726, 3726, 31, 376, 20, 780, 238, 12340, 7229, 6760, 13, 5, 3970, 12410, 15, 351, 14733, 15, 2722, 9, 6, 20, 21, 78, 1940, 9, 31, 57, 18011, 206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unable to start daemons using start-dfs.sh === We are using cdh4-0.0 distribution from cloudera. We are unable to start the daemons using the above command. >start-dfs.sh Starting namenodes on [localhost] hduser@localhost's password: localhost: mkdir: cannot create directory `/hduser': Permission denied localhost: chown: cannot access `/hduser/hduser': No such file or directory localhost: starting namenode, logging to /hduser/hduser/hadoop-hduser-namenode-canberra.out localhost: /home/hduser/work/software/cloudera/hadoop-2.0.0-cdh4.0.0/sbin/hadoop-daemon.sh: line 150: /hduser/hduser/hadoop-hduser-namenode-canberra.out: No such file or directory localhost: head: cannot open `/hduser/hduser/hadoop-hduser-namenode-canberra.out' for reading: No such file or directory
0
[ 2, 2343, 20, 799, 13127, 18, 568, 799, 8, 8736, 18, 9, 1635, 800, 3726, 3726, 95, 50, 568, 1745, 252, 300, 8, 387, 9, 387, 2523, 37, 4005, 2615, 9, 95, 50, 2343, 20, 799, 14, 13127, 18, 568, 14, 784, 1202, 9, 13, 1, 13680, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Different style format in a single strind value === How to have multiple font style in a single string. I have a big string and i will append that string to a microsoft word from c# windows application. I want some characters to be bold... some with big font. like that. I tried with ordinary HTML tags like < b > bold ..< / b> it wont work.. I want string with mixed font styles. Text BOLD small BIG I am Exporting that string to a word file from c# windows application as i mentioned. Help Much appreciated.
0
[ 2, 421, 1034, 2595, 19, 21, 345, 20899, 706, 1923, 800, 3726, 3726, 184, 20, 57, 1886, 9978, 1034, 19, 21, 345, 3724, 9, 31, 57, 21, 580, 3724, 17, 31, 129, 4865, 2451, 30, 3724, 20, 21, 7099, 833, 37, 272, 5910, 1936, 3010, 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...
LSP source example === Can you tell me where can i find Layered Service Provider example with source code, which can sniff data and send data. I tried to find something in google but nothing... Thanks!
4
[ 2, 644, 3401, 1267, 823, 800, 3726, 3726, 92, 42, 494, 55, 113, 92, 31, 477, 5385, 69, 365, 11747, 823, 29, 1267, 1797, 15, 56, 92, 15312, 1054, 17, 2660, 1054, 9, 31, 794, 20, 477, 301, 19, 8144, 47, 626, 9, 9, 9, 3669, 187...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Show ProgressDialog while loading AppState from file === When my activity is being closed, I serialize the application state data to file to give me a chance to reload the state if the app gets killed by the system. This approach (saving and restoring state) works fine. But, sometimes, when the process was killed, and depending on the amount of data to load, the loading state process can least some seconds to complete. So, I can't load the state on a separeted thread because my activity will crash if the data isn't there on the onLoad. So, I'd like to display a progress dialogue while loading the content, but, ensure that the Activity's onLoad method will be called only after the loading state process. Does anybody knows how could I achieve this? Thanks a lot.
0
[ 2, 298, 3455, 4286, 5567, 133, 12797, 4865, 3859, 37, 3893, 800, 3726, 3726, 76, 51, 2358, 25, 142, 827, 15, 31, 5956, 2952, 14, 3010, 146, 1054, 20, 3893, 20, 590, 55, 21, 1504, 20, 27339, 14, 146, 100, 14, 4865, 3049, 841, 34,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Search a word in mysql column using LIKE === Currently i am using this query to search words. $str =$_POST['val'].'%'; $query = mysql_query("select * from table WHERE title LIKE '$str' ORDER BY createdtime DESC LIMIT 0, 70 "); But it searches the match from beginning of a word. For Example If i Type Gold it checks the gold in the beginning not in the middle or end like '40 gold' or 'a gold' or 'golden' it will not display them. Please help.. Thank you..
0
[ 2, 2122, 21, 833, 19, 51, 18, 22402, 4698, 568, 101, 800, 3726, 3726, 871, 31, 589, 568, 48, 25597, 20, 2122, 715, 9, 5579, 9729, 800, 4403, 1, 6962, 2558, 22, 3377, 22, 500, 9, 22, 11881, 22, 73, 5579, 8190, 93, 800, 51, 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...
asp.net postback data === I have a page with a dynamic table, data pulled from a GET method. On it, a button which POSTs to another asp page. Once you click the button, if everything went fine, the table should should be emtpy but even though the POST occurs successfully, after the postback caused by the button click, the table still has data even though it should not. If the page is refreshed only then does it update. How to make it so it updates after the button click? (there may be a slight delay after the POST and getting the data hence it still shows the content of the table).
0
[ 2, 28, 306, 9, 2328, 678, 1958, 1054, 800, 3726, 3726, 31, 57, 21, 2478, 29, 21, 7782, 859, 15, 1054, 881, 37, 21, 164, 2109, 9, 27, 32, 15, 21, 5167, 56, 9868, 20, 226, 28, 306, 2478, 9, 382, 42, 10840, 14, 5167, 15, 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...
Does Google App Engine have a default "under construction" page? === In the dashboard of GAE (https://appengine.google.com), I cannot find a default "under construction" page. I can also create a page and deploy it to GAE. But it is very time consuming if every time I have to do it when I want to manage the site. Can anyone help?
0
[ 2, 630, 8144, 4865, 1406, 57, 21, 12838, 13, 7, 4579, 900, 7, 2478, 60, 800, 3726, 3726, 19, 14, 26478, 16, 13, 17721, 13, 5, 21127, 18, 6903, 7753, 16847, 9, 16111, 4875, 9, 960, 6, 15, 31, 1967, 477, 21, 12838, 13, 7, 4579, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I stop a timer's actionPerformed() method? === I'm implementing a javax.swing.timer to call a synchronous operation on a GUI. However, that operation takes some time to finish and I'd like to provide an abort option to that timer call. Is that possible? Thx!
0
[ 2, 184, 107, 31, 747, 21, 85, 139, 22, 18, 1028, 24915, 5, 6, 2109, 60, 800, 3726, 3726, 31, 22, 79, 17333, 21, 8247, 396, 9, 18, 3546, 9, 891, 139, 20, 645, 21, 13, 16023, 1291, 1453, 27, 21, 9457, 9, 207, 15, 30, 1453, 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...
PostgreSQL+NHibernate -> named parameter in LIKE section === In Spring+Hibernate app im trying to use a named parameter pasend query should sum values from xml document saved in database as text. SELECT document_type, SUM(CAST(substring(document_content ,'<ab.*>(.*[0-9])</ab>') as float)) as value, COUNT(*) FROM statistic_data_test WHERE column LIKE :param1::text GROUP BY document_type ORDER BY value DESC param1 is named parameter passed to program via URL. Whole query and parameter names are dynamically created by user. code shown above works fine, but i need an ability to find not only exact match, but i cant concatenate stings in query. For now, in one part of code i'm checking if type is text, and if so, i add % marks as suffix and prefix. What i wont, is move % marks from parameter to query string, but things like WHERE column LIKE '%'+:param1::text+'%' turns errors How can it be done? How to concatenate stings in query?
0
[ 2, 678, 6879, 18, 22402, 2430, 13880, 15191, 8820, 13, 8, 1, 377, 18906, 19, 101, 1050, 800, 3726, 3726, 19, 1573, 2430, 8630, 106, 8820, 4865, 797, 749, 20, 275, 21, 377, 18906, 5750, 2451, 25597, 378, 3907, 4070, 37, 23504, 4492, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
List Item Absolute Bottom with JQuery Equal Column Height === I have two things. 1. have my last list item absolute bottom of my unordered list, but it overlaps the bottom of my unordered list. 2. I'd like to use the absolute bottom with 'JQuery Equal Column Height' so both my columns are equal to each other since I plan to have beveled borders. I'm looking for someone to solve this issue for me since I'm stuck at this moment. This is my jsfiddle with the last list item absolute bottom: http://jsfiddle.net/evanmoore/QPQ8Z/ This is the jquery equal column height with the last list item absolute bottom http://jsfiddle.net/evanmoore/mCang/2/ var maxHeight = 0; function setHeight(column) { //Get all the element with class = col column = $(column); //Loop all the column column.each(function() { //Store the highest value if($(this).height() > maxHeight) { maxHeight = $(this).height()+2; } }); //Set the height column.height(maxHeight); } $(document).ready(function() { setHeight('.wrapper'); });
0
[ 2, 968, 9101, 7070, 2129, 29, 487, 8190, 93, 2747, 4698, 2947, 800, 3726, 3726, 31, 57, 81, 564, 9, 137, 9, 57, 51, 236, 968, 9101, 7070, 2129, 16, 51, 367, 7861, 69, 968, 15, 47, 32, 15406, 18, 14, 2129, 16, 51, 367, 7861, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# assign const member with function === in java its possible to do something like this class { final int x = SomeClass.generateInt(); } as long as generateInt is final, this compiles. is there an equivalent in C#?
0
[ 2, 272, 5910, 13952, 11608, 38, 322, 29, 1990, 800, 3726, 3726, 19, 8247, 82, 938, 20, 107, 301, 101, 48, 718, 13, 1, 426, 19, 38, 993, 800, 109, 1898, 9, 17083, 1373, 6391, 5, 6, 73, 13, 1, 28, 175, 28, 7920, 6391, 25, 426,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
I would like to flip my app's splash screen - how can I mimic the flip animation like opening of the cover page of a book? === I have an Iphone application in which i want to implement a flipanimation in my splashview,as did in the PATH application.I am using a seperte viewcontroller to present my splashview.I want to remove it from window with this animation.Can anybody have any idea about how to achieve this.this is what i am doing to add the view.How i can remove this view from the window and add newview with an animation like` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.startupController = [[StartupViewController alloc] initWithNibName:@"StartupViewController" bundle:nil]; [window addSubview:self.startupController.view]; [self.startupController.activityIndicator setHidden:NO]; [self.startupController.activityIndicator startAnimating]; [window makeKeyAndVisible]; timer = [NSTimer scheduledTimerWithTimeInterval: 2.0 target: self selector: @selector(handleTimer:) userInfo: nil repeats: NO]; // [window addSubview:navigationController.view]; // [window makeKeyAndVisible]; return YES; } `
0
[ 2, 31, 83, 101, 20, 8805, 51, 4865, 22, 18, 13873, 2324, 13, 8, 184, 92, 31, 13567, 14, 8805, 6236, 101, 1214, 16, 14, 1227, 2478, 16, 21, 360, 60, 800, 3726, 3726, 31, 57, 40, 21024, 3010, 19, 56, 31, 259, 20, 8713, 21, 880...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 items from a list and it's inner list into one list? === i have a list public class Org { public string Name; public List<OrgPost> OrgPostCollection= new List<OrgPost>(); } public class OrgPost { public string OrgPostTitle; } and have: List<Org> OrgCollection=//GetAll(Org); and now i have a list of org like this [Name,OrgPostCollection] [Name2,OrgPostCollection2] ... but i need something like this: [Name1,OrgPostCollection[0]] [Name1,OrgPostCollection[1] [Name2,OrgPostCollection[0]] [Name2,OrgPostCollection[1]] ...
0
[ 2, 164, 3755, 37, 21, 968, 17, 32, 22, 18, 3754, 968, 77, 53, 968, 60, 800, 3726, 3726, 31, 57, 21, 968, 317, 718, 13, 5583, 13, 1, 317, 3724, 204, 73, 317, 968, 1, 5583, 6962, 1, 13, 5583, 6962, 15015, 872, 3726, 78, 968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
deleting object allocated with a custom new operator === I'm writing a stack based allocator for STL. The idea is to allocate a big chunk of memory once and let it build up while objects are constructed and then reset it to zero when needed. For example, this could be used for storing level information for a game or for objects that are created for a single iteration of a game loop. When you load a level you build up the stack, when you need to load a new a level you just reset the top pointer to the beginning, no OS calls needed. Now my issue is the way the standard allocator does things, namely the `deallocate()` function. In [this][1] article i can read that > In the default allocator, the block of storage is deallocated using > ::operator delete. which implies that by using the `deallocate()` function both the memory is freed and the destructor is called. Now for the purpouse of my allocator i can make the `deallocate()` function to be empty, since i'm not going to deallocate memory for individual objects. So, the question is, **how do the STL containers use the allocator class to create new objects? Since the default allocator uses `new` and `delete`, do the containers ever call `construct()` or `destroy()`?** Should i make my `deallocate()` function also call the descrutor? I guess the same question goes for the `allocate()` and `construct()` methods. [1]: http://www.cplusplus.com/reference/std/memory/allocator/deallocate/
0
[ 2, 121, 1336, 68, 3095, 11685, 29, 21, 5816, 78, 6022, 800, 3726, 3726, 31, 22, 79, 1174, 21, 7566, 432, 65, 2499, 3457, 26, 354, 255, 9, 14, 882, 25, 20, 65, 111, 9530, 21, 580, 15009, 16, 1912, 382, 17, 408, 32, 1895, 71, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
number keypad along with decimal point in ios === i am creating a demo application using the jquery and html5 for the ios. I need to add the number along with the one decimal point for the text field along with the keypad that contains the '.' decimal point as well.I am using the 'UIWebView' on which i call my html page that contains the text field on which i have to perform the events. This is my code in html page for the field. <input type="text" name="test" pattern="\d*"/> Please help me out.Any help will be appreciate.
0
[ 2, 234, 1246, 8240, 303, 29, 26380, 454, 19, 13, 7760, 800, 3726, 3726, 31, 589, 2936, 21, 8376, 3010, 568, 14, 487, 8190, 93, 17, 13, 15895, 264, 26, 14, 13, 7760, 9, 31, 376, 20, 3547, 14, 234, 303, 29, 14, 53, 26380, 454, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Suppress "Save Draft" button in MFMailComposeViewController === I am using MFMailComposeViewController inside an iphone app and it works fine. When I press the "Cancel" button, an action sheet with the options "Delete Draft" (red), "Save Draft"(white) and "Cancel"(black) is prompted. I have two questions: 1. Is it possible to suppress the "Save Draft" button? I control programmatically the flow of information and will possibly loose the control, if a mail is pushed into the "Drafts" folder. 2. Is it possible to change the colors of the appearing buttons?
0
[ 2, 12451, 13, 7, 19863, 2472, 7, 5167, 19, 13, 13235, 8079, 960, 15690, 4725, 12898, 1252, 800, 3726, 3726, 31, 589, 568, 13, 13235, 8079, 960, 15690, 4725, 12898, 1252, 572, 40, 21024, 4865, 17, 32, 693, 1123, 9, 76, 31, 901, 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...
Search and Highlight text in Gridview Pages === I have a `gridview` populating from a `dataset`. `Gridview` contains thousands of records so I have implemented paging using a `dataview`. After populating `gridview` I am searching the text in the columns of the `gridview` using java script and the highlighting the text. It works to the end of the rows of `gridview`. I want to implement like search should continue to the next page of the `gridview` using javascript. The gridivew pager controls are added to the panel to make separate from gridview. the search functionality is happening from a pop up window. I am accessing the controls in the panel from the javascript in the pop up window like this. But it returns zero as length. var controls = window.opener.document.getElementById('ctl00_ContentPlaceHolder1_pnlpager1').getElementsByTagName("input"); alert(controls.length); for (var i = 0; i < controls.length; i++) alert(controls[i]); can we search the gridview columns in all pages using a javascript
0
[ 2, 2122, 17, 14373, 1854, 19, 7354, 4725, 4434, 800, 3726, 3726, 31, 57, 21, 13, 1, 16375, 4725, 1, 1675, 10038, 37, 21, 13, 1, 18768, 3554, 1, 9, 13, 1, 16375, 4725, 1, 1588, 3805, 16, 742, 86, 31, 57, 6807, 19006, 68, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Visual Studio settings through C# code === I have been browsing the internet for an hour already but I couldn't find any documentation regarding retrieving Visual Studio Settings (such as TFS url, Proxy Url, etc.) through C# in a **standalone** application. I suppose I should use the Visual Studio SDK. Any code snippet would be appreciated!
0
[ 2, 164, 3458, 1120, 12410, 120, 272, 5910, 1797, 800, 3726, 3726, 31, 57, 74, 10175, 68, 14, 2620, 26, 40, 1671, 614, 47, 31, 711, 22, 38, 477, 186, 13945, 3467, 13, 6239, 3272, 8397, 3458, 1120, 12410, 13, 5, 4289, 28, 13, 1172...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Eclipse quick dialogs === Those who work with eclipse must be familiar with the quick dialogs eclipse provides like quick access( CTRL + 3) Quick outline (CTRL+O) quick type hierarchy(CTRL+T) etc. Is there a way we can make our own dialog like that in our eclipse plugin. Any idea how to do it? some resource related to the topic will be really appreciated. Thanks
0
[ 2, 11652, 2231, 28223, 18, 800, 3726, 3726, 273, 72, 170, 29, 11652, 491, 44, 3694, 29, 14, 2231, 28223, 18, 11652, 1927, 101, 2231, 1381, 5, 13, 4812, 6362, 2754, 203, 6, 2231, 11160, 13, 5, 4812, 6362, 2430, 111, 6, 2231, 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...
Solr query (q) or filter query (fq) === I have a ~1 mil product document Solr index. I also have a whole bunch of UI filters such as, categories, tabs, price ranges, sizes, colors, and some other filters. Is it the right way to have the q selecting everything (q=\*:\*) while all other filters in the fq (For Ex. fq=(catid:90 OR catid:81) AND priceEng:[38 TO 40] AND (size:39 OR size:40 OR size:41 OR size:50 OR size:72) AND (colorGroup:Yellow OR colorGroup:Violet OR colorGroup:Orange ... AND (companyId:81 OR companyId:691 OR companyId:671 OR companyId:628 OR companyId:185 OR companyId:602 OR ... AND endShipDays:[* TO 7])) ? To me, everything from categories to companyIds, from colors and sizes, etc are just filters. Any problem in performance in the future growth with this approach ? Should I put some of the queries in the q, which ones ? Thank you,
0
[ 2, 7176, 139, 25597, 13, 5, 1251, 6, 54, 11945, 25597, 13, 5, 410, 1251, 6, 800, 3726, 3726, 31, 57, 21, 13, 1, 165, 7097, 2374, 4492, 7176, 139, 4348, 9, 31, 67, 57, 21, 979, 7653, 16, 13, 5661, 21062, 145, 28, 15, 6422, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Emulator only got GCM messages? === I have prepared one application for GCM with help of `http://developer.android.com/guide/google/gcm/gs.html`.It is working fine.I got messages in emulator.I have installed my app in device.when i send messages from server emulator only got the messages,but devices not getting messages.I think have done some mistake some where please guide me.
0
[ 2, 3579, 14868, 104, 330, 489, 9095, 7561, 60, 800, 3726, 3726, 31, 57, 3268, 53, 3010, 26, 489, 9095, 29, 448, 16, 13, 1, 21127, 6903, 26051, 106, 9, 290, 18524, 9, 960, 118, 17599, 118, 16111, 4875, 118, 10362, 79, 118, 5447, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Copy a file from Google Drive to my own server === If you remember, I'm trying to integrate Google Drive within our website, which is built on Elgg. Elgg already has its native file management system. What we would like to do is to copy a file from Drive to our server, you know, kind of : Send to My Files. The problem is that I don't see any URL in the file metadata indicating where the file is physically stored. I can see the copy function in Google Drive SDK but I don't think it allows to copy the file on our own server. Unless I've read it wrong. Can you help me? Thanks you.
0
[ 2, 4344, 21, 3893, 37, 8144, 1493, 20, 51, 258, 8128, 800, 3726, 3726, 100, 42, 1518, 15, 31, 22, 79, 749, 20, 18399, 8144, 1493, 363, 318, 2271, 15, 56, 25, 392, 27, 931, 4572, 9, 931, 4572, 614, 63, 82, 1275, 3893, 1097, 329...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
show images in html2pdf library === I have a table contains multiple rows and each row has an image. <table> <tr> <td style=""><img src="<?php echo $img_path; ?>" /><?php echo ucwords($name); ?></td> <td style=""><span style="border-bottom: 1px solid;margin-left: 98px;"><?php echo $date; ?></span></td> </tr> <tr> <td><?php echo $role; ?> Signature</td> <td style="">Date</td> </tr> </table> Is it possible in HTML2PDF to show images as shown in html rather than using his built in functions?
0
[ 2, 298, 3502, 19, 13, 15895, 135, 11124, 1248, 800, 3726, 3726, 31, 57, 21, 859, 1588, 1886, 11295, 17, 206, 3131, 63, 40, 1961, 9, 13, 1, 5924, 1, 13, 1, 6384, 1, 13, 1, 38, 43, 1034, 3726, 7, 7, 1, 1660, 263, 13, 18, 545...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Moving several objects in a NSMutableArray === Let's suppose I have an NSMutableArray like this: Object 0 Object 1 Object 2 Object 3 Object 4 and would like to take Object 0 and Object 1 and move them behind Object 4: Object 2 Object 3 Object 4 Object 0 Object 1 I have this rather long code to do this and as wondering if there is a more straightforward way to do this: int from = 0; int lastIndexOfObjectsToBeMoved = 1; NSMutableArray *objectsToBeMoved = [[NSMutableArray alloc] init]; for (int i = from; i < lastIndexOfObjectsToBeMoved; i++) { object *o = [self.objects objectAtIndex:i]; [objectsToBeMoved addObject:o]; } NSUInteger length = lastIndexOfObjectsToBeMoved-from; NSRange indicesToBeDeleted = NSMakeRange(from, length); [self.objects removeObjectsInRange:indicesToBeDeleted]; NSIndexSet *targetIndices = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(to, length)]; [self.objects insertObjects:objectsToBeMoved atIndexes:targetIndices];
0
[ 2, 1219, 238, 3916, 19, 21, 13, 2172, 7903, 579, 8576, 93, 800, 3726, 3726, 408, 22, 18, 5787, 31, 57, 40, 13, 2172, 7903, 579, 8576, 93, 101, 48, 45, 3095, 713, 3095, 137, 3095, 172, 3095, 203, 3095, 268, 17, 83, 101, 20, 247...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wordpress - User Image not Outputting inside li tags === I am attempting to display the authors of my site in a jquery carousel but for some reason my images are outputted outwith the `li` tags and I don't know why. __Code__ `functions.php` function contributors() { global $wpdb; $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users ORDER BY display_name"); foreach($authors as $author) { // display user image for each author echo '<li class="author" id="author-'.$author->ID.'">'.userphoto($author->ID).'</li>'; } } __Template File__ <?php while ( have_posts() ) : the_post(); ?> <div id="authorlist"><ul id="authorcarousel"><?php contributors(); ?></ul></div> <?php endwhile; // end of the loop. ?> __Output__ <div id="authorlist"> <ul id="authorcarousel"> <img src="/wordpress/wp-content/uploads/userphoto/1.jpg" alt="admin" width="143" height="150" class="photo" /> <li class="author" id="author-1"></li> <img src="/wordpress/wp-content/uploads/userphoto/3.png" alt="" width="128" height="128" class="photo" /> <li class="author" id="author-3"></li> <img src="/wordpress/wp-content/uploads/userphoto/2.png" alt="" width="128" height="128" class="photo" /> <li class="author" id="author-2"></li> </ul> </div> What I am aiming for is the image to be outputted between the `li` tags. A bonus question if someone knows the answer - how to edit the query so that only authors are displayed and not site admins? I tried adding a `WHERE` clause to the query but it didn't work. Any help is much appreciated as I am a WordPress n00b.
0
[ 2, 833, 5890, 13, 8, 4155, 1961, 52, 5196, 1203, 572, 2093, 3383, 18, 800, 3726, 3726, 31, 589, 6314, 20, 3042, 14, 5152, 16, 51, 689, 19, 21, 487, 8190, 93, 27374, 47, 26, 109, 1215, 51, 3502, 50, 5196, 1427, 70, 1410, 14, 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...
Failing to inflate a png inside a plist with Windows using Cocos2D-X === I am running the particleWithFile() function of Coco2D-X, with a plist file created with Mac. The image data is embedded in the plist file, using the "textureImageData" key. With Mac it works fine, but with Windows it fails, on CCAssert(isOK), see Coco2D-X code below (CCParticleSystem.cpp): char *textureData = (char*)valueForKey("textureImageData", dictionary); CCAssert(textureData, ""); int dataLen = strlen(textureData); if(dataLen != 0) { // if it fails, try to get it from the base64-gzipped data int decodeLen = base64Decode((unsigned char*)textureData, (unsigned int)dataLen, &buffer); CCAssert( buffer != NULL, "CCParticleSystem: error decoding textureImageData"); CC_BREAK_IF(!buffer); int deflatedLen = ZipUtils::ccInflateMemory(buffer, decodeLen, &deflated); CCAssert( deflated != NULL, "CCParticleSystem: error ungzipping textureImageData"); CC_BREAK_IF(!deflated); image = new CCImage(); bool isOK = image->initWithImageData(deflated, deflatedLen); CCAssert(isOK, "CCParticleSystem: error init image with Data"); CC_BREAK_IF(!isOK); m_pTexture = CCTextureCache::sharedTextureCache()->addUIImage(image, fullpath.c_str()); } It seems the the decoding passes successfully, and the problem is inside inflate() function of zlib, failing to unzip the png file. Any suggestions?
0
[ 2, 7250, 20, 19, 13830, 62, 21, 351, 2723, 572, 21, 351, 5739, 29, 1936, 568, 22470, 18, 135, 43, 8, 396, 800, 3726, 3726, 31, 589, 946, 14, 11534, 1410, 16877, 5, 6, 1990, 16, 22470, 135, 43, 8, 396, 15, 29, 21, 351, 5739, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Delphi Tadocommand parameters === I have a Tadocommand on my datamodule which is connected to a MSSQL storedproc. The storedproc is used to update a table. In my code I call the the tadocommand in the beforeupdaterecord method of one of my Tclientdatasets. first I supply values to the tadocommand parameters using the deltads.fieldbyname().newvalue of the Tclientdataset then I call the execute procedure. It works ok for the first update but if i try to do a next update it generates "error changing varchar to datetime". if i dynamically create the tadocommand in the beforeupdaterecord method i.e `sp1_editcontract:=Tadocommand.Create(nil);` `sp1_editcontract.CommandType:=cmdStoredProc;` `sp1_editcontract.Connection:=DMDBconn.DBConn;` `sp1_editcontract.CommandText:='EditContract';` `sp1_editcontract.Parameters.Refresh; ` `--assign parameter values` `sp1_editcontract.execute` `sp1_editcontract.free` it works without any errors. I think there is some problem with the parameters values when using the static Tadocommand on the datamodule.
0
[ 2, 23422, 23030, 13, 38, 5672, 16239, 12905, 800, 3726, 3726, 31, 57, 21, 13, 38, 5672, 16239, 27, 51, 1054, 19673, 62, 56, 25, 2587, 20, 21, 4235, 18, 22402, 8214, 15617, 9, 14, 8214, 15617, 25, 147, 20, 11100, 21, 859, 9, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I compile php-cgi binary using a custom glibc for suse enterprise linux out of cygwin? === Pretty straight to the point I think. Is this do-able? Background: I'm doing this because I need to run php-cgi on suse enterprise 9 and can't get LD_PRELOAD or LD_LIBRARY_PATH to use other-than-system version of glibc. php-cgi: /lib/tls/libc.so.6: version `GLIBC_2.7' not found I downloaded 2.7 from here http://rpmfind.net/linux/rpm2html/search.php?query=libc.so.6(GLIBC_2.7) more precisely ftp://rpmfind.net/linux/sourceforge/r/ro/roblinux/64-32_pkg/core/i686/glibc-2.7-2rt.i686.rpm and unpacked it using rpm2cpio. I need php-cgi because I can't install php and want to try JavaBridge for running php out of tomcat.
0
[ 2, 184, 92, 31, 26561, 13, 26120, 8, 150, 2234, 14171, 568, 21, 5816, 13, 6441, 7229, 26, 13, 18, 3699, 6002, 13024, 70, 16, 6728, 263, 4181, 60, 800, 3726, 3726, 1772, 1599, 20, 14, 454, 31, 277, 9, 25, 48, 107, 8, 579, 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...
OpenGL: Vertex attribute arrays per primitive? === I'm wondering if it's possible in OpenGL (via extensions or otherwise) to have an attribute array specified by the `glVertexAttribPointer`type functions that advances by one for every primitive (or N vertices) instead of one for every vertex? For example, if I have an array of triangles which have a solid color currently I'm having to repeat the same color data for every vertex, what I would like instead is something along these lines: struct pos { uint8_t x, y; } positions[NUM_VERTICES]; struct col { uint8_t r, g, b; } colors[NUM_VERTICES / 3]; Where one element of the `colors` array is reused for every 3 consecutive `positions` elements when both arrays are submitted to OpenGL with `glVertexAttribPointer` and renderered with a single `glDrawArrays(GL_TRIANGLES, ...);` I found the `ARB_instanced_arrays` extension, which provides the `glVertexAttribDivisorARB` function which seemed promising at first, but I don't think it works the way I've described.
0
[ 2, 368, 8430, 45, 22895, 35, 14755, 7718, 18, 416, 11473, 60, 800, 3726, 3726, 31, 22, 79, 5712, 100, 32, 22, 18, 938, 19, 368, 8430, 13, 5, 5034, 17529, 54, 3190, 6, 20, 57, 40, 35, 14755, 7718, 9931, 34, 14, 13, 1, 8430, 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...
Tracking Pixel - PHP Issue === How can i add a statement to this code where it stops if qty = 0. I got this code from here but it is displaying an additional ITEM after the last one. for example https://www.emjcd.com/u?CID=1521607&OID=100000393&TYPE=type&ITEM1=401000305964&AMT1=16.9900&QTY1=1&ITEM2=401000305964&AMT2=0.0000&QTY2=0**&TYPE=347774&CURRENCY=USD&METHOD=IMG It added **ITEM2=401000305964&AMT2=0.0000&QTY2=0** although the database and invoice only have one item <?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData =$order->getData(); $_sub = $_totalData['subtotal'];//USD ==> global_currency_code,base_currency_code order_currency_code // Incase if it is simple do this ==> https://www.emjcd.com/u?AMOUNT= $_sub; //print_r($order); print_r($_totalData); $_order = $this->getOrder(); $allitems = $order->getAllItems(); $index = 1; $cjData = "";//Needed format ==> &ITEM1=3214sku&AMT1=13.49&QTY1=1&ITEM2=6577sku&AMT2=7.99&QTY2=2& foreach($allitems as $item) { $cjData.="&ITEM".$index."=".$item->getSku()."&AMT".$index."=".$item->getPrice()."&QTY".$index."=".$item->getQtyToShip(); $index++; } ?> <div style="display:none;"> <img src="https://www.emjcd.com/u?CID=1&OID=<?php echo $this->getOrderId(); ?>&TYPE=3<?php echo $cjData; ?>&CURRENCY=USD&METHOD=IMG" height="1" width="20"> </div>
0
[ 2, 10353, 18146, 13, 8, 13, 26120, 1513, 800, 3726, 3726, 184, 92, 31, 3547, 21, 3331, 20, 48, 1797, 113, 32, 6604, 100, 2593, 1084, 800, 713, 9, 31, 330, 48, 1797, 37, 235, 47, 32, 25, 17418, 40, 1351, 9101, 75, 14, 236, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Are websockets suitable for use with PHP? === I have seen it mentioned in various places around the internet that HTML5 websockets do not work well with PHP, that PHP by it's nature is just suitable for use with them. On the other hand, I see multiple tutorials on using PHP with websockets and Ive noticed some PHP websocket implementation such as http://code.google.com/p/phpwebsocket/ So does anyone have any definitive information on using websockets with PHP. Are they usable with PHP, what are the advantages/disadvantages of using them with PHP as opposed to Java or Python, and why have I read numerous people saying they don't work well together?
0
[ 2, 50, 2741, 18, 5668, 6095, 6445, 26, 275, 29, 13, 26120, 60, 800, 3726, 3726, 31, 57, 541, 32, 2211, 19, 617, 1489, 140, 14, 2620, 30, 13, 15895, 264, 2741, 18, 5668, 6095, 107, 52, 170, 134, 29, 13, 26120, 15, 30, 13, 26120...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error when trying to shuffle an NSMutableArray === I'm trying to shuffle an NSMutableArray so that its order will be mixed up every-time someone loads the view. In my `-(void)viewDidLoad` I'm putting the following code (as suggested by other users): NSMutableArray *shuffleTwo = [self.chosenTeamDict objectForKey:@"clubs"]; int random = arc4random() % [shuffleTwo count]; for (int i = 0; i < [shuffleTwo count]; i++) { [shuffleTwo exchangeObjectAtIndex:random withObjectAtIndex:i]; } NSLog(@"%@", shuffleTwo); But when I do this and try and run the page, I get the following error: 2012-07-09 18:42:16.126 Kit-Quiz[6505:907] (null) libc++abi.dylib: terminate called throwing an exception Can anyone advice either a new way of shuffling this array, or advice me on how to avoid this error..!? I'm building for iOS 5 and I'm using Xcode45-DP1. Thanks in advance!
0
[ 2, 7019, 76, 749, 20, 23682, 40, 13, 2172, 7903, 579, 8576, 93, 800, 3726, 3726, 31, 22, 79, 749, 20, 23682, 40, 13, 2172, 7903, 579, 8576, 93, 86, 30, 82, 389, 129, 44, 2198, 71, 352, 8, 891, 737, 19069, 14, 1418, 9, 19, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails and Devise, how to inherit method registrations#update for use json callback? === I create fullajax app, and i need to change user settings with json callback. I tried to use this [solution][1] (with RegistrationsController#update), but it doesn't work. [1]: http://stackoverflow.com/questions/5973327/using-devise-1-3-to-authenticate-json-login-requests/8402035#8402035
1
[ 2, 2240, 18, 17, 29276, 15, 184, 20, 17569, 2109, 8587, 18, 5910, 576, 8209, 26, 275, 487, 528, 645, 1958, 60, 800, 3726, 3726, 31, 1600, 503, 6881, 7522, 4865, 15, 17, 31, 376, 20, 753, 4155, 12410, 29, 487, 528, 645, 1958, 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...
Iplimage to List<byte[]> === I am trying to pass a set of iplimage from OpenCV to another program (.net) that does not use iplimage but uses list of byte[] instead through c++/cli. Any idea how to add/convert iplimage to the list of byte[] ? Thanks.
0
[ 2, 31, 5727, 22039, 20, 968, 1, 23246, 2558, 500, 1, 800, 3726, 3726, 31, 589, 749, 20, 1477, 21, 309, 16, 31, 5727, 22039, 37, 368, 12732, 20, 226, 625, 13, 5, 9, 2328, 6, 30, 630, 52, 275, 31, 5727, 22039, 47, 2027, 968, 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...
random mysql errors? === Okay so I installed a handy little script on a website. When in local host there are never any errors, However when I am hosting it on my vps, I occasionally and purely randomly get random mysql errors and U think it is murdering my traffic. Is this happening because of a bad vps? or are there other reasons? Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on line 1383 Lost connection to MySQL server during query Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on line 17 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) MySQL server has gone away All these are purely random and none are permanent. Usually happen when there are many pages being open at once and Logs the current account out
0
[ 2, 5477, 51, 18, 22402, 11908, 60, 800, 3726, 3726, 1705, 86, 31, 4066, 21, 20277, 265, 3884, 27, 21, 2271, 9, 76, 19, 375, 2015, 80, 50, 243, 186, 11908, 15, 207, 76, 31, 589, 10637, 32, 27, 51, 13, 10924, 18, 15, 31, 4533, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tricky range based for loop implementation for an XML Element class in c++11 === How can I make something like this work with range based loops for both Elements and Attributes? #include <list> #include "XMLAttribute.h" namespace XML { class Element { private: typedef std::list<Attribute> attribute_container; typedef std::list<Element> element_container; public: XMLElement(); bool has_attributes() const; bool has_elements() const; bool has_data() const; const std::string &name() const; const std::string &data() const; private: std::string _name; std::string _data; attribute_container _attributes; element_container _elements; }; } I would like to be able to use something like: for (XML::Element &el : element) { .. } for (XML::Attribute &at : element) { .. } And block something like `for (auto &some_name : element) { .. } //XML::Element or XML::Attribute?`. Is it a good idea to implement it like this or should I change my design?
0
[ 2, 5514, 93, 978, 432, 26, 5293, 6123, 26, 40, 23504, 4520, 718, 19, 272, 20512, 1306, 800, 3726, 3726, 184, 92, 31, 233, 301, 101, 48, 170, 29, 978, 432, 19661, 26, 156, 2065, 17, 13422, 60, 6926, 22640, 13, 1, 5739, 1, 6926, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Matplotlib - Stepped histogram with already binned data === I am trying to get a histrogram with already binned data. I have been trying to use `bar()` for this, but I cant seem to figure out how to make it a stepped histogram (like this one http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/histogram_demo_extended_02.png) instead of a filled histogram. Thanks a lot in advance!
0
[ 2, 4277, 13221, 38, 8326, 13, 8, 1973, 33, 38, 20476, 29, 614, 4511, 3725, 1054, 800, 3726, 3726, 31, 589, 749, 20, 164, 21, 33, 3996, 6295, 29, 614, 4511, 3725, 1054, 9, 31, 57, 74, 749, 20, 275, 13, 1, 1850, 5, 6, 1, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Twisted client protocol - attaching an interface frontend === I am following the tutorial on writing a client/server pair in Twisted located here: http://twistedmatrix.com/documents/current/core/howto/clients.html I have everything working for the communication of my client and server, the system uses custom prefixes to denote how far it is into the 'conversation'. It sends a json string initially to set up the session, and then sends a file line by line. It's really just an exercise more than anything else. Client.py: class ClientProtocol(protocol.Protocol): def connectionMade(self): json_string = json.dumps({ 'uid':ObjectId(), 'lat':43.78, 'lon':-72.5831 },cls=Encoder) self.transport.write('OPN|'+json_string) self.fileObject = open('test.csv') def sendFile(self): lineData = self.fileObject.readline() if lineData != '': self.transport.write('UPD|') self.transport.write(lineData) else: self.transport.write('EOF|done') def dataReceived(self,data): if data in ['ELLO','RECVD']: self.sendFile() class ClientFactory(protocol.Factory): def buildProtocol(self,addr): return ClientProtocol() if __name__ == '__main__': point = TCP4ClientEndpoint(reactor,'localhost',5000) d = point.connect(ClientFactory()) reactor.run() Server: class TransferProtocol(protocol.Protocol): ran = 0 def connectionLost(self,reason): print reason def connectionMade(self): self.fileObject = open('output','w') def dataReceived(self,data): methods = {'OPN':'open','UPD':'upload','EOF':'endfile'} if data[0:3] in methods.keys(): func = getattr(self,methods[data[0:3]]) func(data[4:]) def open(self,data): print 'OPEN %s' % data self.transport.write('ELLO') def endfile(self,data): print 'END %s' % data self.transport.loseConnection() def upload(self,data): self.ran+=1 self.fileObject.write(data) self.transport.write('RECVD') class myProtocolFactory(protocol.Factory): protocol = TransferProtocol def doStart(self): pass def startedConnecting(self, connectorInstance): print connectorInstance def buildProtocol(self, address): print address return self.protocol() def clientConnectionLost(self, connection, reason): print reason print connection def clientConnectionFailed(self, connection, reason): print connection print reason def doStop(self): pass if __name__ == '__main__': reactor.listenTCP(5000, myProtocolFactory()) reactor.run() Currently, I run the server in one terminal and the client in another. As expected, both reactors start and communicate once, the client transmits it's identity json followed by the file contents and then terminates the connection. What I can't understand is how to 'hook up' this protocol to something like the `cmd` interface, to make it spawn these processes on command after one ends. Because the reactor in the client runs indefinitely, it performs the network conversation once and then just loops through continuously in the reactor. Everything I've ever build with Twisted, client or server, just responded to network calls, so I am wondering what would be the correct approach to making this a "one-shot" client protocol that would activate on input commands from `cmd`. Would one even use the reactor for something like this? Or Twisted at all for that matter as opposed to just manually opening sockets that follow the protocol?
0
[ 2, 5308, 6819, 8494, 13, 8, 19514, 68, 40, 6573, 431, 2451, 800, 3726, 3726, 31, 589, 249, 14, 29724, 27, 1174, 21, 6819, 118, 10321, 106, 2146, 19, 5308, 335, 235, 45, 7775, 6903, 26284, 69, 540, 17224, 9, 960, 118, 28132, 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...
Should I use Backbone.emulateHTTP or php file_get_contents === I'm using Backbone JS with a CodeIgniter backend. It seems I have two choices: - Set backbone to: Backbone.emulateHTTP = true; Backbone.emulateJSON = true; Which sends everything as Form Data, which I can pick up on the server with $this->input->post() - or I can leave Backbone on normal settings, in which case it gets sent in the request payload and I have to use: $data = json_decode(file_get_contents('php://input')); Is there a right answer to this? Does the first one mean it's not technically RESTful? And does that matter??
0
[ 2, 378, 31, 275, 24036, 9, 1503, 12383, 21127, 54, 13, 26120, 3893, 1, 3060, 1, 25424, 18, 800, 3726, 3726, 31, 22, 79, 568, 24036, 487, 18, 29, 21, 1797, 9693, 242, 106, 97, 2451, 9, 32, 2206, 31, 57, 81, 10978, 45, 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...
How to return workable filepath? === I have an activity that when users press "share" on a file it would open my app and start uploading the file. Now this works perfectly with images because the URI returned is for MediaStore. But I want to be able to return the URI from any source such as from ES File Explorer Here is the current code: public String getPath(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; Cursor cursor = managedQuery(uri, projection, null, null, null); int column_index = cursor .getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); return cursor.getString(column_index); } How can I make this so instead of MediaStore it will be used for any type of file?
0
[ 2, 184, 20, 788, 170, 579, 3893, 8353, 60, 800, 3726, 3726, 31, 57, 40, 2358, 30, 76, 3878, 901, 13, 7, 16608, 7, 27, 21, 3893, 32, 83, 368, 51, 4865, 17, 799, 71, 16866, 14, 3893, 9, 130, 48, 693, 5759, 29, 3502, 185, 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...
Unable to run Android application on phone === I've been developing an Android app using Eclipse and the Android plug-in for Eclipse and all these days, I would just plug in my phone into the computer and hit Run and would see my app run on my Samsung Galaxy Phone. But now it shows me a window like the following and am unable to choose my phone as the device because under the "State" column it says "Offline" even when the phone is plugged into my computer. I can't even use the emulator because its painfully slow on my computer.
0
[ 2, 2343, 20, 485, 13005, 3010, 27, 1132, 800, 3726, 3726, 31, 22, 195, 74, 3561, 40, 13005, 4865, 568, 11652, 17, 14, 13005, 10922, 8, 108, 26, 11652, 17, 65, 158, 509, 15, 31, 83, 114, 10922, 19, 51, 1132, 77, 14, 1428, 17, 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...
Is runtime-compiled-class instantiation&usage possible in Java without reflexion? === I would like to know if do exist any kind of library or workaround to use my runtime compiled classes ( I dynamically generate my classes, writing .java, then compiling them in .class all of this happens at runtime) without using reflexion library? Loading with reflexiong i always have to work like this //path where my newly generated classes are File file = new File("e:\\tmp"); // Convert File to a URL URL url = file.toURI().toURL(); URL[] urls = new URL[] { url }; ClassLoader cl = new URLClassLoader(urls); Class cls = cl.loadClass("eu.dataaccess.footballpool.TGoal"); // Create an instance of the class just loaded Object o = cls.newInstance(); Method method2 = cls.getDeclaredMethod ("getIMinute"); Object result2 = method2.invoke(o); My question is if it's somehow possible to use at runtime TGoal x = new TGoal(); and x.getIMinute();
0
[ 2, 25, 485, 891, 8, 11103, 49, 1294, 8, 1898, 6322, 49, 857, 1569, 267, 1303, 938, 19, 8247, 366, 14349, 872, 60, 800, 3726, 3726, 31, 83, 101, 20, 143, 100, 107, 3182, 186, 825, 16, 1248, 54, 170, 10037, 20, 275, 51, 485, 891...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
xtext generator forward input to output === How to forward the part of the parsed tree from input to output in xtend generator? For instance, in some cases of output code generation, I do not need to parse the parameters of some constructor/functions. I only need to put this constants, variables names, expessions, etc. directly to the output code (forward all inside braces): input DSL code: CREATE_OBJECT_O(3, a, 5+6 ) output(may be some Java or C++ code): Object o = new Object_Impl(3, a, 5+6 ) some part of xtext grammar: ParameterList: (parameter+=Parameter ( "," parameter+=Parameter)* )? ; Parameter: variableExpression=VariableExpression |(texts+=TextInParameter | macroSubstitutions+=MacroSubstitution)*;
0
[ 2, 993, 11969, 15286, 917, 6367, 20, 5196, 800, 3726, 3726, 184, 20, 917, 14, 141, 16, 14, 2017, 18, 69, 1541, 37, 6367, 20, 5196, 19, 993, 1316, 43, 15286, 60, 26, 4851, 15, 19, 109, 1871, 16, 5196, 1797, 2782, 15, 31, 107, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery Long Polling (With PHP server side) === I'm having a bit of a nightmare here, so any help would be gratefully appreciated! Firstly, I'll explain what I'm trying to do: I'm trying to implement a system like described here: http://stackoverflow.com/a/1086448/1034392 on my localhost MAMP server using Yii framework. I have a function that checks if there are any new notifications in the DB - if so, it parses them and json encodes them. I have this function called on a while loop every 5 secs. So: going to /user/unreadNotifications triggers the following Yii::log('test'); // to check it's getting called $this->layout=false; header('Content-Type: application/json'); // LONG POLLING while (Yii::app()->user->getNotifications() == null) { sleep(5); } echo Yii::app()->user->getNotifications(); // prints out json if new notification Yii::app()->end(); return; This works fine - gone to the link in browser and verified json response - all good. I have then tried all sorts of jQuery stuff to get it working... The ONLY way I have found to work is using `$.ajax` with type POST but ONLY when there is a waiting notification (so some json is returned). `$.get` or `$.post` gets "aborted" (displayed in firebug) but the URL is called (because I can see the log file is updated) - odd. My original setup using `$.get` is: <script type="text/javascript"> function notificationPoll() { $.get('<?php echo Yii::app()->createUrl('user/unreadNotifications') ?>','', function(result) { $.each(result.events, function(events) { alert('New Notification!'); }); notificationPoll(); }, 'json'); } </script> <script type="text/javascript"> $(document).ready(function() { $.ajaxSetup({ timeout: 60 //set a global ajax timeout of a minute }); notificationPoll(); }); </script> This just gets "aborted" for some reason. I've tried with 'jsonp' even though it is not a CORS request.. but that doesn't work either. Can't seem to get anywhere with this! Can anyone chip in? Many thanks
0
[ 2, 487, 8190, 93, 175, 20734, 13, 5, 1410, 13, 26120, 8128, 270, 6, 800, 3726, 3726, 31, 22, 79, 452, 21, 1142, 16, 21, 10586, 235, 15, 86, 186, 448, 83, 44, 8083, 102, 13746, 187, 64, 102, 15, 31, 22, 211, 3271, 98, 31, 22,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
annotation pins === So, I have a problem with making positions for annotation pins on MKMapView. I just write a class heritable from NSObject, called "Annotation", which uses <MKAnnotations> protocol. so, here's code: Annotation.h #import <Foundation/Foundation.h> @interface Annotation : NSObject <MKAnnotation> { CLLocationCoordinate2D _coordinate; NSUInteger _pinID; } @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; - (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate andID:(NSUInteger)pinID; @end Annotation.m #import "Annotation.h" @implementation Annotation @synthesize coordinate=_coordinate; - (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate andID:(NSUInteger)pinID{ self = [super init]; if (self != nil) { _coordinate = coordinate; _pinID = pinID; } return self; } - (NSString *)title { return [NSString stringWithFormat:@"Pin %u", _pinID]; } - (NSString *)subtitle { return [NSString stringWithFormat:@"%.4f, %.4f", _coordinate.latitude, _coordinate.longitude]; } @end Then, I tried to connect it to my map with foloowing code MapViewController.m - (void)viewDidLoad { [super viewDidLoad]; CLLocationCoordinate2D coordinate; coordinate.latitude = 49.2802; coordinate.longitude = -123.1182; mapView.delegate = self; mapView.region = MKCoordinateRegionMakeWithDistance(coordinate, 2000, 2000); CLLocationCoordinate2D newCoord = {2000, 2000}; Annotation* annotation = [[Annotation alloc] initWithCoordinate:newCoord andID:1]; [mapView addAnnotation:annotation]; } But this don't make any sence, pins not even shows. What am I doing wrong? I looked to help and lessons, but no working results.
0
[ 2, 40, 1270, 857, 18869, 800, 3726, 3726, 86, 15, 31, 57, 21, 1448, 29, 544, 3062, 26, 40, 1270, 857, 18869, 27, 10804, 15022, 4725, 9, 31, 114, 2757, 21, 718, 36, 242, 579, 37, 13, 2172, 23793, 15, 227, 13, 7, 210, 1270, 857,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
make always passes the same input-file === I'm trying to compile a large project with GNU-Win make under Windows 7. CCFLAGS = -D__forceinline -D__GCC__ -D__PC -Wno-multichar -DCOMPILE_CODEBLOCKS -Wattributes -Winvalid-offsetof SOURCES = $(wildcard c4d/*.cpp) OBJECTS = $(subst .cpp,.o,$(subst c4d/,c4d/obj/,$(SOURCES))) all: $(OBJECTS) $(OBJECTS):$(SOURCES) python pr.py $< $@ The `python pr.py` program just prints all passed commands to the command-line. (`@echo` and `echo` don't work?!) But what I see in the console is this: python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basebitmap.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basebitmap.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basechannel.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basechannel.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basecontainer.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basecontainer.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basedocument.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basedocument.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basedraw.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basedraw.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_baseeffectorplugin.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_baseeffectorplugin.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_baselist.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_baselist.o python pr.py c4d/c4d_basebitmap.cpp c4d/obj/c4d_basematerial.o c4d/c4d_basebitmap.cpp c4d/obj/c4d_basematerial.o You can see, that the input file is always `c4d/c4d_basebitmap.cpp` while the output file always differs (as desired). Why is the input file always the same?
0
[ 2, 233, 550, 3789, 14, 205, 6367, 8, 16877, 800, 3726, 3726, 31, 22, 79, 749, 20, 26561, 21, 370, 669, 29, 26092, 8, 4181, 233, 131, 1936, 453, 9, 8093, 22868, 18, 800, 13, 8, 43, 1, 8774, 108, 1143, 13, 8, 43, 1, 263, 3384,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Msbuild how to generate Desktop Build === **Scenario:** I have a TFS Build (TFS2008) that has several targets override: **BuildNumberOverrideTarget, AfterGet, BeforeCompileConfiguration, AfterCompileConfiguration, AfterCompile, AfterDropBuild and AfterEndToEndIteration**. Everything works fine. But now I am porting all CI to Jenkins server. I use MSBuild plugin to invoke TFSBuild.proj using these parameters: > /fileLogger > /fileLoggerParameters:LogFile=TFSBuild_DesktopBuild.log;Create;Encoding=UTF-8;verbosity=normal > /verbosity:normal **Problem Description:** My problem is that only some of the custom tasks are being executed: **BeforeCompileConfiguration, AfterCompileConfiguration, AfterCompile**. As you can see I need **BuildNumberOverrideTarget, AfterGet, AfterDropBuild and AfterEndToEndIteration** to be executed. It seems like only compile task and custom tasks about it are being executed. **What I have tried until now.** * If I run the build from a local .cmd file, same behaviour happens. So I think is a problem with IsDesktopBuild property. Further reading of this [msdn link][1] gave me the clue to when read > "Only the compilation and testing (if they are enabled) are performed" . So I have tried to add property myself to force a DesktopBuild: > /fileLogger > /fileLoggerParameters:LogFile=TFSBuild_DesktopBuild.log;Create;Encoding=UTF-8;verbosity=normal > /verbosity:normal **/property:IsDesktopBuild=true** But behavior is the same, only executed tasks: **BeforeCompileConfiguration, AfterCompileConfiguration, AfterCompile** **So my question is double:** 1. Anyone know how to force a Desktop Build from command line? (Seems that */property:IsDesktopBuild=true* is not enough) 2. If IsDesktopBuild is not the problem, any idea of clue on why some custom tasks are not triggering? [1]: http://msdn.microsoft.com/en-us/library/ms181292%28v=vs.90%29.aspx
0
[ 2, 4235, 29361, 184, 20, 7920, 17404, 1895, 800, 3726, 3726, 13, 1409, 18, 8172, 8756, 45, 1409, 31, 57, 21, 13, 11720, 18, 1895, 13, 5, 11720, 18, 2753, 6, 30, 63, 238, 7767, 84, 11891, 45, 13, 1409, 29361, 16299, 2549, 11891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 do Performance testing at protocol level === I was told that it is better to performance test at protocol level. Can anyone explain why this is?
1
[ 2, 483, 107, 956, 4431, 35, 8494, 662, 800, 3726, 3726, 31, 23, 470, 30, 32, 25, 574, 20, 956, 1289, 35, 8494, 662, 9, 92, 1276, 3271, 483, 48, 25, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Can't get data when merging tables === I have the following query: SELECT shelf.label, books.label FROM booksOnShelves LEFT JOIN shelf ON (shelf.id = booksOnShelves.shelf_id) LEFT JOIN books ON (books.id = booksOnShelves.book_id) WHERE booksOnShelves.project_id = ".$pid." AND booksOnShelves.user_id = ".$uid." For some odd reason I can't seem to be able to get shelf.label data, but if I remove books.label even without making any additional changes to the rest of the query, shelf.label values appear. I tried using JOIN, LEFT, RIGHT, INNER... stumped. Here are my tables: shelf --------------- id project_id label books --------------- id project_id label booksOnShelves --------------- id shelf_id book_id project_id user_id
0
[ 2, 92, 22, 38, 164, 1054, 76, 18842, 7484, 800, 3726, 3726, 31, 57, 14, 249, 25597, 45, 5407, 12424, 9, 21018, 15, 964, 9, 21018, 37, 964, 4710, 9180, 195, 18, 225, 1865, 12424, 27, 13, 5, 1079, 9641, 9, 1340, 800, 964, 4710, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
On-demand web page loading in Android custom browser === Well, I'm currently working on a project to build an application, in order to optimize internet surfing. So the thing is, in the Android custom browser(the one i'm implementing), I need to load only the visible area of the webpage to display the user. Once, its done downloading, then the subsequent area's of the webpage should be downloaded. Is this possible? if so how can I implement it? If it's not possible, I'm sure that we can download the HTML file first and then download the resource files of that web page. According to my research this is possible through [WebViewClient.shouldInterceptRequest][1]. But im not sure how to implement it. Could you please help me through this. Thanks for your time! :) [1]: http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest%28android.webkit.WebView,%20java.lang.String%29
0
[ 2, 27, 8, 25358, 2741, 2478, 12797, 19, 13005, 5816, 16495, 800, 3726, 3726, 134, 15, 31, 22, 79, 871, 638, 27, 21, 669, 20, 1895, 40, 3010, 15, 19, 389, 20, 22864, 2620, 22449, 9, 86, 14, 584, 25, 15, 19, 14, 13005, 5816, 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...
cx_oracle - Failed to load DLL === I have written several scripts to load data into our Oracle database. Recently, our database was upgraded to 11g (from 10g). I decided to upgrade our software from Python 2.6 to Python 2.7 as well as the cx_Oracle module. I have installed the following on a new Vista blade server (no previous python installations): python-2.7.3.msi cx_Oracle-5.1.1-11g.win32-py2.7.msi pywin32-217.win32-py2.7.exe I have the full Oracle Client installed and it shows up in my SYSTEM path variable (along with the 10g full Client): PATH=C:\oracle\10g\FullClient\bin\;C:\Oracle\11g\FullClient\BIN\;C:\Windows\syst em32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Windows Imaging\ ;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x 86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Java\jre1.6 .0_12\bin;C:\Program Files\Axalto\Access Client\v5\;C:\Program Files (x86)\Axalt o\Access Client\v5\;C:\Program Files (x86)\1E\SMSNomad\;C:\Program Files (x86)\A ctivIdentity\SecureLogin\;C:\Program Files (x86)\TRIM Context\;C:\Program Files (x86)\Open Text\Livelink Explorer\ I don't have Administrator rights, so I'm hampered in how to handle this. When I start Python Idle, I can do the import no problem. When I try to run the script, I get the error. Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:\Apps\SDAS\Python Scripts\SDAS_Crawl.py", line 80, in <module> import cx_Oracle ImportError: DLL load failed: The specified module could not be found. >>> I tried setting %ORACLE_HOME% to the 11g\bin in the terminal window but I still get the same error when I run the script. I aslo tried setting ORACLE_HOME with python: os.environ['ORACLE_HOME'] = r'C:\Oracle\11g\FullClient\BIN' No success there either. Does anyone have any ideas that would solve this problem? Thanks, -Greg
0
[ 2, 272, 396, 1, 6055, 5615, 13, 8, 1702, 20, 6305, 13, 43, 211, 800, 3726, 3726, 31, 57, 642, 238, 17505, 20, 6305, 1054, 77, 318, 15759, 6018, 9, 1989, 15, 318, 6018, 23, 9958, 20, 547, 263, 13, 5, 2665, 332, 263, 6, 9, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to make JTextPane the size of a piece of paper? === OK, So i finally figured out how to print a JTextPane, and really have a fully functioning document editor. Anyway, Can I make the JTextPane the size of a piece of paper (with page breaks) So you can easily predict the appearance of the document you are typing? Any tips/hints would be helpful! edit: format of the JTextPane is 'text/rtf', if that helps.
0
[ 2, 184, 20, 233, 487, 11969, 16660, 14, 1072, 16, 21, 1855, 16, 1397, 60, 800, 3726, 3726, 5854, 15, 86, 31, 722, 5700, 70, 184, 20, 4793, 21, 487, 11969, 16660, 15, 17, 510, 57, 21, 2337, 14175, 4492, 1835, 9, 2774, 15, 92, 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...
Only allow specific emails to register to user role drupal 7 === I am trying to find out how to allow only .ac.uk emails register to a spcific user role in drupal 7 Every where i have looked gives options with access control in earlier drupal versions but not DR7 Any hack/ module suggestions appreciated
0
[ 2, 104, 1655, 1903, 8517, 18, 20, 2243, 20, 4155, 597, 15708, 6720, 453, 800, 3726, 3726, 31, 589, 749, 20, 477, 70, 184, 20, 1655, 104, 13, 9, 1738, 9, 2185, 8517, 18, 2243, 20, 21, 3782, 1892, 15261, 4155, 597, 19, 15708, 6720...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I get the architecture of a '.a' file? === I have a .a file from which I want to get architecture information. Running `file myFile.a` results in `file.a: current ar archive`. How can I get more information on what architecture the file contains?
0
[ 2, 184, 92, 31, 164, 14, 2607, 16, 21, 13, 22, 9, 58, 22, 3893, 60, 800, 3726, 3726, 31, 57, 21, 13, 9, 58, 3893, 37, 56, 31, 259, 20, 164, 2607, 676, 9, 946, 13, 1, 16877, 51, 16877, 9, 58, 1, 1736, 19, 13, 1, 16877, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 open application with notification from LocalNotifications plugin in PhoneGap === I'm developing a PhoneGap/Cordova application, I've succesfully added LocalNotifications using this plugin: https://github.com/phonegap/phonegap-plugins/tree/master/Android/LocalNotification; however, I've one little issue, when I tap the notification in the Notifications window my application isn't opened, I mean, nothing happens, could someone explain me how to open it when someone tap on a notification from my app? Thank you!
0
[ 2, 184, 20, 368, 3010, 29, 52, 4634, 37, 375, 1270, 4634, 18, 10922, 108, 19, 1132, 1136, 306, 800, 3726, 3726, 31, 22, 79, 3561, 21, 1132, 1136, 306, 118, 17213, 3496, 3010, 15, 31, 22, 195, 21792, 5052, 5655, 905, 375, 1270, 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...
PHP passing a variable to array_walk_recursive === This code works but $vars can`t be defined in the call() function. Why do $vars ca`nt be passed to the array_walk_recursive? <?PHP class lib{ private $library; function __construct($lib="") { $this->library = $lib; } function set($vars) { $decoded_classes = json_decode($this->library,true); array_walk_recursive($decoded_classes,function(&$f) {$f = create_function($vars,$f);}); return $decoded_classes; } } $json = ' { "class1": { "function1":"return \"$a<b>$b</b>!\";" }, "class2": { "function2":"return $b;", "function3":"return $c;" }, "function1":"return \"test\";" }'; $lib = new lib($json); $lib = $lib->set("$a,$b"); $lib = $lib["class1"]["function1"]("asdasasd","asdasasd"); echo $lib; ?>
0
[ 2, 13, 26120, 2848, 21, 7612, 20, 7718, 1, 10915, 1, 99, 24244, 800, 3726, 3726, 48, 1797, 693, 47, 5579, 3311, 18, 92, 1, 38, 44, 2811, 19, 14, 645, 5, 6, 1990, 9, 483, 107, 5579, 3311, 18, 1658, 1, 2877, 44, 1100, 20, 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...
Updated Eclipse, cannot remove Jar === I deleted a jar from my libs file and now I cannot build the project and the jar will not go away. I've tried cleaning the project, fixing the android properties now I'm stuck. Has anyone else had this problem? Description Resource Path Location Type Archive for required library: 'C:/apps/APP/libs/imagecrop.jar' in project 'APP' cannot be read or is not a valid ZIP file APP Build path Build Path Problem
0
[ 2, 6372, 11652, 15, 1967, 4681, 5112, 800, 3726, 3726, 31, 19584, 21, 5112, 37, 51, 13, 8326, 18, 3893, 17, 130, 31, 1967, 1895, 14, 669, 17, 14, 5112, 129, 52, 162, 229, 9, 31, 22, 195, 794, 9724, 14, 669, 15, 20047, 14, 1300...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 images from facebook album === I have albumID,I did the following code but not able to get the result (photos). I think m missing something in facebook.request try { //wallAlbumID is variable having album id. response = facebook.request("me/album."+wallAlbumID+"/photos"); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } JSONObject json = null; try { json = Util.parseJson(response); } catch (FacebookError e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } JSONArray photos = null; try { photos = json.getJSONArray("data"); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } for (int i =0; i < photos.length(); i++) { JSONObject a = null; try { a = photos.getJSONObject(i); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } looking for code in response.
0
[ 2, 184, 20, 164, 3502, 37, 9090, 244, 800, 3726, 3726, 31, 57, 244, 1340, 15, 49, 144, 14, 249, 1797, 47, 52, 777, 20, 164, 14, 829, 13, 5, 25445, 18, 6, 9, 31, 277, 307, 2863, 301, 19, 9090, 9, 99, 10351, 1131, 13, 1, 128...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Understand SolrInputDocument's addField method with boost value === I am still new to solr (i feel silly to ask simple questions, blush), but what are the differences between the two methods below? which one should i use? what if i set the boost value to 1.0f for all of the fields in a document? 1. add field without boost public void addField(String name, Object value) Add a field with implied null value for boost. 2. add field with boost value public void addField(String name, Object value, float boost) Adds a field with the given name, value and boost. If a field with the name already exists, then it is updated to the new value and boost. Thanks a lot for your help :-)
0
[ 2, 1369, 7176, 2445, 4881, 28132, 22, 18, 3547, 1109, 2109, 29, 10419, 1923, 800, 3726, 3726, 31, 589, 174, 78, 20, 7176, 139, 13, 5, 49, 583, 10752, 20, 1349, 1935, 2346, 15, 18183, 6, 15, 47, 98, 50, 14, 4921, 128, 14, 81, 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...
Move to a new page after entering a character in input textbox holding the input === I want to implement in my webpage something similar to google search page. The link http://www.google.com shows the search field at the middle of the page and on typing a character it moves to the top of the page holding the input entered. Would be great if someone can demonstrate to achieve this using jquery/javascript or html
0
[ 2, 780, 20, 21, 78, 2478, 75, 4604, 21, 925, 19, 6367, 1854, 5309, 1337, 14, 6367, 800, 3726, 3726, 31, 259, 20, 8713, 19, 51, 2741, 6486, 301, 835, 20, 8144, 2122, 2478, 9, 14, 3508, 7775, 6903, 6483, 9, 16111, 4875, 9, 960, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
extjs4 column hide in treepanel shared across tabs === My application (mvc) is designed as such with 3 tabs in my view Ext.define('App.view.cube.MainView', { extend : 'Ext.panel.Panel', .... layout : 'card', ... dockedItems : [ { xtype : 'panel', items : [{ // a drop down containing 2 choices }] }], items : [{ xtype:'tabpanel', itemId:'mmtabs', activeTab : 1, items : [{ title : 'Served', xtype : 'treepanel', // my own xtype extending this xtype id:'Served :', itemId : '1'}, { title : 'UnServed', xtype : 'treepanel', // my own xtype extending this xtype id:'UnServed :', itemId : '0'}, { title : 'Total', xtype : 'treepanel', // my own xtype extending this xtype id:'Total :', itemId : '2'}] }]}); Basically a drop down with two choices should allow the user to view the required columns within the grid (treepanel). The very first time the app is loaded and the user changes to a different choice in the dropdown the columns do not hide as they should. But if he were to navigate to another tab and then do the same thing everything works as it is supposed to. I cannot figure out the problem. In the code above i am reusing xtype : 'treepanel', // my own xtype extending this xtype across the three tabs by having different itemIds ( i hope this is fine ). In my controller i have a function to toggle to the view (hide/show specific columns) initialview (iterate over all columns in all tabs and set the appropriate view) changeview invoked on the combobox within my view. toggleView : function(cubemwwar,viewId) { if ("2" == viewId) { cubemwwar.columns[1].setVisible(false); cubemwwar.columns[2].setVisible(false); cubemwwar.columns[3].setVisible(false); cubemwwar.columns[4].setVisible(true); cubemwwar.columns[5].setVisible(true); cubemwwar.columns[6].setVisible(true); } if ("1" == viewId) { cubemwwar.columns[1].setVisible(true); cubemwwar.columns[2].setVisible(true); cubemwwar.columns[3].setVisible(true); cubemwwar.columns[4].setVisible(false); cubemwwar.columns[5].setVisible(false); cubemwwar.columns[6].setVisible(false); } }, // on controller's onlaunch initialView : function() { var numTabs = this.getCubeMainView().query('#mmtabs') [0].items.length; for(var i=0;i<numTabs ; i++) { var tab = this.getCubeMainView().query('#mmtabs')[0].items.items[i]; this.toggleView(tab,1); } }, // change views based on user selection // from the combobox's select event changeView : function(combo, rec, idx) { // first time somehow the columns do not hide // hide/show appropriate columns // rec[0].data.id .. .possible values 1 and 2 only. this.toggleView(this.getCubeMainView().query('#mmtabs')[0].getActiveTab(),rec[0].data.id); }, Thanks in advance
0
[ 2, 1396, 38, 728, 18, 300, 4698, 3077, 19, 1541, 3206, 532, 2592, 464, 6523, 18, 800, 3726, 3726, 51, 3010, 13, 5, 79, 8990, 6, 25, 1006, 28, 145, 29, 203, 6523, 18, 19, 51, 1418, 1396, 38, 9, 546, 7509, 5, 22, 7753, 9, 4725...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple Listboxes to Select Data(table1) and Insert to MySQL Table2 === I have two tables, incldues and TIncludes which are used for storing three columns of data; An ID, macro_num, macro The includes(table1) has all of the items possible to list, these are shown by macro_num in a listbox on the form (select1). The user can add the wanted items to the second box, select2. The listboxes populate and move the data to eachother, add/remove buttons using javascript. I can't seem to get the data from select2 to insert into my database. Not sure what I setup incorrectly or overlooked. Are there any working examples of such a thing? I have only seen where one item is inserted and that is fine, but I have some reports which need 40 items. Thanks in advance for reading this. I hope there may be a quick solution as I have not dealt with this problem before.. my first large form item requirement.
0
[ 2, 1886, 968, 5309, 160, 20, 5407, 1054, 5, 5924, 165, 6, 17, 14692, 20, 51, 18, 22402, 859, 135, 800, 3726, 3726, 31, 57, 81, 7484, 15, 19, 5316, 12633, 18, 17, 13, 38, 22640, 18, 56, 50, 147, 26, 25615, 132, 7498, 16, 1054, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 downs linger on mega hover out === I am using this script: http://www.teylyn.com/wp-content/uploads/2012/03/MegaMenuScript.txt The drop downs linger / stay down after I mouse off the navigation buttons. Here is my code: <ul id="topnav" style="z-index: 1000;"> <li class="toplevel about"> <asp:HyperLink runat="server" ID="lnkAbout" NavigateUrl="~/Aboutus/Default.aspx" Text="About Us" CssClass="about" /> <div class="sub"> <asp:Menu ID="mnAboutUs" runat="server" DataSourceID="smdsAboutUs" RenderingMode="List" SkipLinkText="" Orientation="Vertical" StaticEnableDefaultPopOutImage="false" DynamicEnableDefaultPopOutImage="false" /> </div> </li> <li class="toplevel equipment"> <asp:HyperLink runat="server" ID="lnkEquipment" NavigateUrl="~/Equipment/Default.aspx" Text="Equipment" /> <div class="sub"> <asp:Menu ID="mnEquipment" runat="server" DataSourceID="smdsEquipment" RenderingMode="List" SkipLinkText="" Orientation="Vertical" StaticEnableDefaultPopOutImage="false" DynamicEnableDefaultPopOutImage="false" /> </div> </li> </ul> The styles are: div.sub { height: 1500px; display: none; z-index: 99999; position: absolute; } li.toplevel { float: left; display: block; position: relative; z-index: 99999; } li.toplevel a { color: #000000; display: block; font-size: 1.6em; font-weight: normal; line-height: 36px; position: relative; z-index: 99999; text-align: center; text-decoration: none; border-left: 1px solid #FD3; border-right: 1px solid #D90; } How can I make the second equipment div class "sub" hide itself when I mouse over about?
0
[ 2, 2804, 125, 18, 13, 13683, 27, 5957, 21350, 70, 800, 3726, 3726, 31, 589, 568, 48, 3884, 45, 7775, 6903, 6483, 9, 38, 1436, 4859, 9, 960, 118, 13790, 8, 25424, 118, 576, 8294, 18, 118, 3212, 118, 3601, 118, 22168, 755, 291, 87...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Mac terminal ~ (END) === I'm running through the gitimmersion.com labs and every time I run a: git hist --all command it seems to break terminal and throw this: >~<br/> >~<br/> >~<br/> >~<br/> >(END) and I'm not able to type any more commands. So I end up closing that terminal window and starting over. Anyone know why this happens and how to resolve it? Thanks!
0
[ 2, 1572, 3855, 13, 1, 13, 5, 2451, 6, 800, 3726, 3726, 31, 22, 79, 946, 120, 14, 13, 10404, 13788, 5991, 9, 960, 17020, 17, 352, 85, 31, 485, 21, 45, 13, 10404, 33, 38, 13, 8, 8, 1233, 1202, 32, 2206, 20, 1442, 3855, 17, 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...
Unresolved external symbol vftable c++ === I am using visual studio 2008 in my MFC + vtk project. There I am getting a linking error as below: > vtkPBFEAView.obj : warning LNK4217: locally defined symbol ?DrawDC@vtkMFCWindow@@QAEXPAVCDC@@@Z (public: void __thiscall vtkMFCWindow::DrawDC(class CDC *)) imported in function "protected: virtual void __thiscall CvtkPBFEAView::OnDraw(class CDC *)" (?OnDraw@CvtkPBFEAView@@MAEXPAVCDC@@@Z) > 1>vtkMDIView.obj : warning LNK4049: locally defined symbol ?DrawDC@vtkMFCWindow@@QAEXPAVCDC@@@Z (public: void __thiscall vtkMFCWindow::DrawDC(class CDC *)) imported 1>vtkPBFEAView.obj : warning LNK4217: locally defined symbol ??0vtkMFCWindow@@QAE@PAVCWnd@@@Z (public: __thiscall vtkMFCWindow::vtkMFCWindow(class CWnd *)) imported in function "public: void __thiscall vtkPBFEAViewImpl::initialize(class CWnd *)" (?initialize@vtkPBFEAViewImpl@@QAEXPAVCWnd@@@Z) > > 1>vtkMDIView.obj : warning LNK4049: locally defined symbol ??0vtkMFCWindow@@QAE@PAVCWnd@@@Z (public: __thiscall vtkMFCWindow::vtkMFCWindow(class CWnd *)) imported 1>vtkPBFEAView.obj : warning LNK4217: locally defined symbol ??1vtkMFCWindow@@UAE@XZ (public: virtual __thiscall vtkMFCWindow::~vtkMFCWindow(void)) imported in function "public: virtual void * __thiscall vtkMFCWindow::`scalar deleting destructor'(unsigned int)" (??_GvtkMFCWindow@@UAEPAXI@Z) > > 1>vtkMDIView.obj : warning LNK4217: locally defined symbol ??1vtkMFCWindow@@UAE@XZ (public: virtual __thiscall vtkMFCWindow::~vtkMFCWindow(void)) imported in function "public: void __thiscall vtkMDIViewImpl::adjust_contours(int,double,double)" (?adjust_contours@vtkMDIViewImpl@@QAEXHNN@Z) > > 1>vtkMFCWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) const vtkMFCWindow::`vftable'" (__imp_??_7vtkMFCWindow@@6B@) referenced in function "public: __thiscall vtkMFCWindow::vtkMFCWindow(class CWnd *)" (??0vtkMFCWindow@@QAE@PAVCWnd@@@Z) Can anyone explain me the reason for this error? Thanks in advance.
0
[ 2, 367, 99, 5594, 4763, 4886, 4678, 13, 21441, 5924, 272, 20512, 800, 3726, 3726, 31, 589, 568, 3458, 1120, 570, 19, 51, 307, 7061, 2754, 566, 38, 197, 669, 9, 80, 31, 589, 1017, 21, 12585, 7019, 28, 1021, 45, 13, 1, 566, 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...
Is GC_FOR_ALLOC more "serious" when investigating memory usage? === I'm currently investigating garbage collection problems with my Android app, and I'm curious to know if GC_FOR_ALLOC is indicative of a bigger problem than other GC messages, such as GC_CONCURRENT. From my understanding, GC_CONCURRENT is doing what the garbage collector should do. The heap has reached a particular limit, better go clean up memory. GC_FOR_ALLOC suggests to me something more serious is happening if I'm trying to create an object and there's no memory left to do it. Is there a priority or "seriousness" level for the GC messages?
0
[ 2, 25, 13, 10362, 1, 1106, 1, 192, 10799, 91, 13, 7, 29119, 7, 76, 12490, 1912, 7514, 60, 800, 3726, 3726, 31, 22, 79, 871, 12490, 15024, 1206, 1716, 29, 51, 13005, 4865, 15, 17, 31, 22, 79, 7686, 20, 143, 100, 13, 10362, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is "if ( somefunction( ) )" blocking in node.js? === test = function(x){ if ( some conditions ) { return true; } else { return false; } } if (test(y)) {document.write("You have done this before!")​}​;​ console.log("Checked!"); The intention is to check if the user performed some action in the past. These are just mock up codes that do not really reflect what I am actually doing though. **Question:** I am relatively new to node.js so please forgive me if this sounds trivial. Suppose test(y) is true. Can I be sure that the console.log will be executed after the document.write? Even if test(y) takes a long time to run? In other words, I need "if (test(y))..." to be blocking. I understand that passing a function as an argument, e.g. setInterval(test(y),100); can be async and non-blocking. But what about "if(test(y))..."?
0
[ 2, 25, 13, 7, 821, 13, 5, 109, 22359, 5, 13, 6, 13, 6, 7, 11828, 19, 15421, 9, 728, 18, 60, 800, 3726, 3726, 1289, 800, 1990, 5, 396, 6, 1, 100, 13, 5, 109, 2039, 13, 6, 13, 1, 788, 1151, 73, 13, 1, 962, 13, 1, 788, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 batch file renaming === I have a bunch of files named like this... full-file(1).jpg full-file(10).jpg full-file(11).jpg full-file(12).jpg full-file(2).jpg etc... I'm trying to figure out the most efficient way to rename all these files using PHP so that they get renamed like this... full-file0001.jpg full-file0010.jpg full-file0011.jpg full-file0012.jpg full-file0002.jpg I've got as far as reading all the files from a folder and looping through them but not sure about the best way to remove the brackets and make the number 4 digits with leading 0. $image_files = get_files($thumbpath); foreach($image_files as $index=>$file) { echo $file; }
0
[ 2, 13, 26120, 13064, 3893, 25934, 800, 3726, 3726, 31, 57, 21, 7653, 16, 6488, 377, 101, 48, 9, 9, 9, 503, 8, 16877, 5, 165, 6, 9, 12851, 263, 503, 8, 16877, 5, 1036, 6, 9, 12851, 263, 503, 8, 16877, 5, 1306, 6, 9, 12851, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to handle an event by the handler defined in the javascript which creates the event? === I open a html page with a myApp.js included like this: <html> <body> ...... <div id="dynamicForm"></div> ...... <script type="text/javascript" src="myPath/myApp.js"></script> ...... </body> </html> and then I want to load a form defined in myApp.js dynamically on this html page at ("#dynamicForm"), the myApp.js has some lines like this: ..... //load the form on the html page $('#dynamicForm').html(createDynamicForm()).show(); ..... //the function creating the form function createDynamicForm(){ var jqForm=$('<form id="dynamicFormId">' ...... + '<button id="btn">OK</button>' + '</form>'); $('body').append(jqForm); return jqForm; } ..... //click the button on the form to trigger the alert box ("#btn").click(function(){ alert("you click the button"); }); I can load the form on the html page, but when I click the "OK" button on this dynamically loaded form, the alert doesn't pop up, apparently this is because myApp.js is loaded with the html page before the dynamic form is created, the "click" event can not be handled by the handler defined in myApp.js that creates the form. how can I fix this problem? thanks.
0
[ 2, 184, 20, 3053, 40, 807, 34, 14, 24641, 2811, 19, 14, 8247, 8741, 56, 9695, 14, 807, 60, 800, 3726, 3726, 31, 368, 21, 13, 15895, 2478, 29, 21, 51, 7753, 9, 728, 18, 506, 101, 48, 45, 13, 1, 15895, 1, 13, 1, 9760, 1, 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...
Prevent "this page has insecure content" message on Chrome with HTTPS enabled === I am trying to avoid "this page has insecure content" message of Chrome in my web with HTTPS. The problem is that I have a widget to Flickr and it has http connection, is there any way to force the https connection or to avoid this message? I have been told that may work with Java, but I don't know if it's possible. Thanks in advance!
0
[ 2, 2501, 13, 7, 1565, 2478, 63, 19, 22917, 2331, 7, 2802, 27, 13, 12985, 29, 7775, 18, 9338, 800, 3726, 3726, 31, 589, 749, 20, 2658, 13, 7, 1565, 2478, 63, 19, 22917, 2331, 7, 2802, 16, 13, 12985, 19, 51, 2741, 29, 7775, 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...
Best encrypting-decrypting algorithm in JAVA for data exahange using XML b/w two systems === My requirement is to find best algorithm use to secure data sent using XML over network. This is important data which is to be exchanged between third parties. I know about DES which is quite outdated these days. MD5 appeared as another option but this does not allow decryption to get data back(please correct me if I am wrong) What other options do we have to accomplish above task and which is best and most standard way to do it?
0
[ 2, 246, 1957, 11435, 68, 8, 546, 11435, 68, 9083, 19, 8247, 26, 1054, 1396, 17346, 834, 568, 23504, 334, 118, 499, 81, 1242, 800, 3726, 3726, 51, 8981, 25, 20, 477, 246, 9083, 275, 20, 4315, 1054, 795, 568, 23504, 84, 982, 9, 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...
Set Dynamic Field Once === I want to call and set a dynamic field $cment (as outlined below) once (it's dynamic as it's dynamically references the comment ID for each comment this code appears in.) I then want to exclude this process from the loop, i.e. I dont want the loop to loop the dynamic comment ID creation for every post it analyses. Is this possible? <?php $cment = comment_ID();?> <?php $args = array( 'post_type' => 'paidbriefs', 'meta_key' => 'test', 'meta_value' => $cment , 'posts_per_page' => 10 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <?php the_title(); ?> <?php the_meta(); ?> <?php endforeach; ?>
0
[ 2, 309, 7782, 575, 382, 800, 3726, 3726, 31, 259, 20, 645, 17, 309, 21, 7782, 575, 5579, 150, 1130, 13, 5, 472, 16978, 1021, 6, 382, 13, 5, 242, 22, 18, 7782, 28, 32, 22, 18, 7782, 1326, 7231, 14, 6484, 4924, 26, 206, 6484, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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: Partitioning a cv::Mat === I'm trying to partition a cv::Mat into smaller cv::Mat's using OpenCV. I found this method online but I can't get it to work. I want to partition a cv::Mat of, say 640 x 480 into blocks of say, 32 x 32 and operate on each block individually as I go along. Here is my code. curr_frame contains the total image as a cv::Mat. N_per_col and N_per_row contain the number of mb_sz x mb_sz blocks per column and row respectively. void ClassName::partition( void ) { for( i = 0; i < N_per_col; i += mb_sz ) { for( j = 0; j < N_per_row; j += mb_sz ) { cv::Mat tmp_img( curr_frame, cv::Rect( i, j, mb_sz, mb_sz ) ); // Do stuff with tmp_img here } } } This compiles fine but at runtime I get an image full of NULL pixels in tmp_img. curr_frame is definitely OK, as I can view it with imshow(). The documentation is not very clear on this, so any help would be greatly appreciated.
0
[ 2, 368, 12732, 45, 10711, 68, 21, 13, 12732, 45, 45, 5146, 800, 3726, 3726, 31, 22, 79, 749, 20, 10711, 21, 13, 12732, 45, 45, 5146, 77, 2012, 13, 12732, 45, 45, 5146, 22, 18, 568, 368, 12732, 9, 31, 216, 48, 2109, 2087, 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...
Share Fruits Fairly (Dynamic Programming) === I'm having a very hard time trying to figure out how to solve this problem efficiently. Let me describe how it goes: "A hard working mom bought several fruits with different nutritional values for her 3 kids, Amelia, Jessica and Bruno. Both girls are overweight, and they are very vicious and always leave poor Bruno with nothing, so their mother decided to share the food in the following manner: - Amelia being the heaviest one gets the most amount of fruits - Jessica gets an amount equal or less than Amelia - Bruno gets an amount equal or less than Jessica, but you need to find a way to give him the highest possible nutritional value while respecting the rule ( A >= J >= B )" Note: The original problem is described differently but the idea is the same, I don't want my classmates to find this post when they google for help hehe. One of the test cases given by my teacher is the following: The fruit list has the following values { 4, 2, 1, 8, 11, 5, 1} Input: 7 -----> Number of Fruits 4 2 1 8 11 5 1 ----> Fruits Nutritional Values Output: 1 11 ----> One fruit, their nutritional values sum for Amelia 5 ----> Position of the fruit in the list 3 11 ----> Three fruits, their nutritional values sum for Jessica 1 2 6 ----> Position of the fruits in the list 3 10 ----> Three fruits, their nutritional values sum for Bruno 3 4 7 ----> Position of the fruits in the list Note: I am aware that there are several ways of diving the fruits among the kids, but it doesn't really matter as long as it follows the rule A >= J >= B. At first I made an algorithm that generated all the subsets, each one had their sums, and the positions that were in use. That method was quickly discarded because the list of fruits can have up to 50 fruits, and the subset algorithm is O(2^n). I ran out of memory. The second idea that I have is to use Dynamic Programming. In the columns header I would have the positions of the Fruit's List, in the row header the same, it's kind of hard to explain with letters so I'll ahead an do the table for the previous example { 4, 2, 1, 8, 11, 5, 1}. 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07 Each time we advance to the row below we add the positions 1,2,3,...,7 00 01 02 03 04 05 06 07 00 00 <---No positions in use 01 04 <---RowPosition 1 + Column Position(Column 0) (4+0) 02 06 <---RowPosition 1 + RowPosition 2 + Column Position (4+2+0) 03 07 <---RP(1) + RP(2) + RP(3) + CP(0) (4+2+1+0) 04 15 <--- (4+2+1+8+0) 05 26 06 31 07 32 <--- (4+2+1+8+11+5+1+0) Now that you know how it goes lets add the first row 00 01 02 03 04 05 06 07 00 00 04 02 01 08 11 05 01 <-- Sum of RP + CP 01 04 00 06 05 12 15 09 05 <-- Sum of RP(0..1) + CP 02 06 03 07 04 15 05 26 06 31 07 32 I put the 00 because the 1st position is already in use. The completed table would look like this. 00 01 02 03 04 05 06 07 00 00 04 02 01 08 11 05 01 01 04 00 06 05 12 15 09 05 02 06 00 00 07 14 17 11 07 03 07 00 00 00 15 18 12 08 04 15 00 00 00 00 26 20 16 05 26 00 00 00 00 00 31 32 06 31 00 00 00 00 00 00 32 07 32 00 00 00 00 00 00 00 Now that we have the table. I divide the sum of the Nutritional Values by the amount of kids, 32/3 = 10.6667, the ceiling would be 11. I try to check for 11, if it's in the table, I choose it and mark the position of the row and columns of the tables as used, then I would try to check for 11 again, if it's in the table I choose it otherwise look the 10, or 9, etc until I find it. Afterwards I would mark the respective positions as used then sum the unused positions to get Bruno's fruits. I know that there has to be better way to do this because I found a flaw in my method, the table only has the sum of a few subsets. So maybe that will be detrimental in a few test cases. Maybe a 3D Memoization Cube?, I think it would consume too much memory, and I have a limit too 256MB. Wow, I didn't realize I typed this much x.X. I hope I don't get a lot of tl; dr. Any help / guide would be greatly appreciated :D
0
[ 2, 1891, 12505, 6647, 13, 5, 20985, 3143, 6, 800, 3726, 3726, 31, 22, 79, 452, 21, 253, 552, 85, 749, 20, 1465, 70, 184, 20, 8402, 48, 1448, 20519, 9, 408, 55, 4996, 184, 32, 1852, 45, 13, 7, 58, 552, 638, 1641, 2448, 238, 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...
Regular Expression failing in Response Assertion and Regular Expression Extractor Jmeter === The response data in my test has this line: <head><title> My Title </title><meta charset I checked this regex in the inbuilt regex tester in Jmeter and it found the title. (?m)(?is)<title>\n\tMy Title\n</title> However, when I use it as a response assertion, the assertion always fails. I have tried all settings in "Apply to" section. "Text Response" is selected for "Response Field to Test". I selected "Contains" for "Pattern Matching Rules". I have a very similar issue with a regular expression extractor as well - the selected expression passes in the tester, but fails with regular expression extractor. I believe it may have something to do with the multi-line nature of the response. Any pointers?
0
[ 2, 1290, 1803, 7250, 19, 1627, 20878, 17, 1290, 1803, 10962, 248, 487, 7307, 800, 3726, 3726, 14, 1627, 1054, 19, 51, 1289, 63, 48, 293, 45, 13, 1, 1743, 1, 22235, 1, 51, 581, 13, 1, 118, 22235, 1, 5909, 58, 4892, 3554, 31, 65...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
nullptr and checking if a pointer points to a valid object === In a couple of my older code projects when i had never heard of smart pointers, whenever i needed to check whether the pointer still pointed to a valid object, i would always do something like this... object * meh = new object; if(meh) meh->member; or when i needed to delete the object safely, something like this if(meh) { delete meh; meh = 0; } well, now i have learned about the problems that can arise from using objects and pointers in bollean expressions both with literal numbers, the hard way :\ . And now i've also learned of the not so new but pretty cool feature of c++, the nullptr keyword. But now i'm curious. I've already gone through and revised most of my code so that, for example, when deleting objects i now write if(meh) { delete meh; meh = nullptr; } but now i'm wondering about the boolean. when you pass just say an int into an if statement like this, int meh; if(meh) then it implicitly checks for zero without you needing to write it. if(meh == 0) // does the exact same check but now, will c++ do the same for pointers? if pass in a char * like this to an if statement? char * meh; if(meh) then will it implicitly compare it with nullptr? Because of how long I have been writing these ifs like this, it is second nature at this point to check if the pointers valid before using by typing if(object *) and then calling it's members. If this is not the functionality why not? too difficult to implement? would solve some problems by removing yet another tiny way you could mess up your code.
0
[ 2, 16203, 4417, 139, 17, 9886, 100, 21, 454, 106, 819, 20, 21, 7394, 3095, 800, 3726, 3726, 19, 21, 1335, 16, 51, 1234, 1797, 2314, 76, 31, 41, 243, 752, 16, 3978, 454, 445, 15, 6634, 31, 851, 20, 2631, 1472, 14, 454, 106, 174...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Gps Routing system === I'm developing an android application that would locate the user(assuming that the user is on the road) and the app will create the shortest route for the user to take to be able to go to the users chosen destination. Locating the user isn't the question since there's an API for that here: http://www.vogella.com/articles/AndroidLocationAPI/article.html so here's the catch. The roads ,intersections and their distances can be mapped or declared via variables in the code but my problem is that the GPS APIs i found so far would only return a longitude and latitude and not the road names or the graphs that can be used for mapping the shortest path. I need help as to how i can create the shortest route with the given Android GPS resources we have now. Assuming: 3G or wifi connection is always available
0
[ 2, 13005, 18298, 19880, 329, 800, 3726, 3726, 31, 22, 79, 3561, 40, 13005, 3010, 30, 83, 12717, 14, 4155, 5, 9755, 723, 68, 30, 14, 4155, 25, 27, 14, 383, 6, 17, 14, 4865, 129, 1600, 14, 23576, 858, 26, 14, 4155, 20, 247, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
HTML table: keep center aligned, regardless of browser width === This is a follow-on from a previous SO question http://stackoverflow.com/questions/11260986/anchoring-css-repeating-background-image but sufficiently different to treat as a separate question. The jsFiddle http://jsfiddle.net/By2xj/ demonstrates the concept. I have a banner image (center) which then requires repeating images on the left and right which will display and repeat depending on the width of the browser window. The proviso is that the left and right images must be locked to the edge of the center banner image. You can see this effect if you expand the jsFiddle Result window - the left and right repeating images always remain locked to the side of the center banner image and expand out from that point. So all this is working, but I have used a table to achieve this effect, as the CSS suggested in the previous SO question didn't fully work and was a bit browser dependant, particularly not playing with older browsers. With this table based solution, I would like to always keep the centre banner image centered, even when the browser width is smaller than the banner. If you reduce the size of the jsFiddle Result window you will see that when the browser width is smaller than the banner, the banner sticks to left-alignment rather than being centered. So my question is how can I always keep the center banner center aligned (or perhaps, more correctly, the entire table center aligned), even when the browser width is smaller than the banner width (and containing table cell)? Thanks in anticipation for any assistance.
0
[ 2, 13, 15895, 859, 45, 643, 459, 13, 12740, 15, 7148, 16, 16495, 9456, 800, 3726, 3726, 48, 25, 21, 1740, 8, 218, 37, 21, 1158, 86, 1301, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 1306, 13675, 3804, 12626, 210, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RowStyle From DataTable as ItemsSource === I have a RadGridView that its ItemsSource is a DataTable (because the columns are dynamic and AutoGeneratedColumn is True). Now I want depend on a value with cellName 'RowFontWeight' and type of FontWeight, in DataRow of DataTable the row style makes Bold, I wrote:<br /> <pre> &lt;Style TargetType="telerik:GridViewRow"> &lt;Setter Property="FontWeight" Value="{Binding RowFontWeight}" /> &lt;/Style> </pre> but it doesn't work and just add a RowFontWeight column to the grid.
0
[ 2, 3131, 4381, 37, 1054, 5924, 28, 3755, 12097, 800, 3726, 3726, 31, 57, 21, 4944, 16375, 4725, 30, 82, 3755, 12097, 25, 21, 1054, 5924, 13, 5, 4451, 14, 7498, 50, 7782, 17, 3108, 25314, 716, 4404, 103, 25, 1151, 6, 9, 130, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
php:for loop in date function === i wrote a date function in PHP using 'mktime(0,0,0,date("m"),date("d"),date("y"))',and got the result,but I want a series of next five consecutive dates using for loop .What should I do?
0
[ 2, 13, 26120, 45, 1106, 5293, 19, 1231, 1990, 800, 3726, 3726, 31, 738, 21, 1231, 1990, 19, 13, 26120, 568, 13, 22, 79, 197, 891, 5, 387, 15, 387, 15, 387, 15, 8209, 5, 7, 79, 7, 6, 15, 8209, 5, 7, 43, 7, 6, 15, 8209, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Field must be secret but subclass must override the method using this field? === I have a design problem: - Question class: have a question and answer (String) - TextQuestion class: normal text question and answer - NumberQuestion class: question (String), answer (number - int, float...), and check answer using an epsilon value But I have a problem with NumberQuestion. I must take the right answer, convert it into number, and compare to the answer from user. So how can I get the answer? Use getter method is not secure. Or my design is not good? How can I change? > public abstract class Question { > private String question; > private String answer; > > public Question(String question, String answer) { > this.question = question; > this.answer = answer; > } > > public boolean checkAnswer(String yourAnswer) { > // default implementation > } > } > > class TextQuestion extends Question { > // Answer and Question is always string type, it's OK, not problem > } > > class NumberQuestion extends Question { > // Question is String, OK > // Answer: input is number, accept approximately > // Ex: Question: 1/3 = ? > // Answer: 0.3 or 0.33 or 0.333 are accepted (using an Epsilon value) > > // so must override checkAnswer > public boolean checkAnswer(String yourAnswer) { > // HOW can I do? > } > }
0
[ 2, 575, 491, 44, 1699, 47, 972, 1898, 491, 84, 11891, 14, 2109, 568, 48, 575, 60, 800, 3726, 3726, 31, 57, 21, 704, 1448, 45, 13, 8, 1301, 718, 45, 57, 21, 1301, 17, 1623, 13, 5, 11130, 6, 13, 8, 1854, 24652, 718, 45, 1826, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a registry key change that will by-pass the Windows Domain Join Welcome page? === I'm scripting some Windows Server 2008 R2 builds using Power Shell. Some software needs to be installed after the server has joined the domain. Since I want to automate everything, I'm looking to by-pass the domain controllers Welcome page using a registry hack script. I work for a large company and the Active Directory people are unwilling to change group policy. I figure if it's a registry key I can script the change, install the software, replace the key and reboot as the final step. Is there a registry key change that will by-pass the Domain Join Welcome page?
2
[ 2, 25, 80, 21, 18269, 1246, 753, 30, 129, 34, 8, 6201, 14, 1936, 4603, 1865, 5575, 2478, 60, 800, 3726, 3726, 31, 22, 79, 3884, 68, 109, 1936, 8128, 570, 761, 135, 1895, 18, 568, 414, 3593, 9, 109, 2306, 2274, 20, 44, 4066, 75...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Do These Divs Overlap? === This makes no sense to me. I've been trying to research this, but I have no idea why it's overlapping. I have a feeling that it is because I used the 'img' tag or because I need to use some kind of position type somewhere, but I have tried them and it didn't work. http://jsfiddle.net/FhU3r/ #picdiv { height:405px; width:320px; border:1px solid black; margin:15px; float:left; } #rightdiv { width:620px; height:320px; border:1px solid black; } ​ <div id="picdiv"> <center><img src="img.png" /></center> <div id="quote"> "Here's Some Inspirational Text Like OMG!" </div> <!-- end quote --> </div> <!-- end pic container --> <div id="rightdiv"> "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." </div>​
0
[ 2, 483, 107, 158, 13, 12916, 18, 15406, 60, 800, 3726, 3726, 48, 1364, 90, 1259, 20, 55, 9, 31, 22, 195, 74, 749, 20, 527, 48, 15, 47, 31, 57, 90, 882, 483, 32, 22, 18, 23854, 9, 31, 57, 21, 1249, 30, 32, 25, 185, 31, 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...
htaccess redirect parked domains and main domain to different wordpress folders === This might sound a little confusing but I have 3 Domain names one main domain and 2 parked domains. www.main1.com www.parked1.com www.parked2.com I have 3 wordpress installed inside `www` folder : www.main1.com/site1 www.main1.com/site2 www.main1.com/site3 I want to browse them as fallows: www.main1.com >> www.main1.com/site1 www.parked1.com >> www.main1.com/site2 www.parked2.com >> www.main1.com/site3 I have managed to do the first one **`www.main1.com >> www.main1.com/site1`** by following the tutorials "Giving WordPress Its Own Directory" on worpress.org I have copied the index.php and .htaccess files from the wordpress folder to the www folder but only the main domain name worked. Please Help me to solve this. Is it even possible? Kind Regards
0
[ 2, 13, 9020, 20604, 302, 14706, 8951, 15544, 17, 407, 4603, 20, 421, 833, 5890, 19294, 18, 800, 3726, 3726, 48, 530, 646, 21, 265, 18084, 47, 31, 57, 203, 4603, 1817, 53, 407, 4603, 17, 172, 8951, 15544, 9, 13, 6483, 9, 6232, 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...
Copy files from server to windows mobile === I am creating a windows mobile application in c#. I want to move files from http server to windows mobile. I dont know where and how to start? Can some one tell me ideas and share some links? I am using .net compact framework 3.5
0
[ 2, 4344, 6488, 37, 8128, 20, 1936, 3241, 800, 3726, 3726, 31, 589, 2936, 21, 1936, 3241, 3010, 19, 272, 5910, 9, 31, 259, 20, 780, 6488, 37, 7775, 8128, 20, 1936, 3241, 9, 31, 1049, 143, 113, 17, 184, 20, 799, 60, 92, 109, 53,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Accessing a window scoped bean inside a servlet === I would like to retrieve in my servlet a bean with scope window. does anybody know how to do it? many thanks for your help.
0
[ 2, 1381, 68, 21, 1463, 9914, 43, 15322, 572, 21, 13, 10321, 1336, 800, 3726, 3726, 31, 83, 101, 20, 11917, 19, 51, 13, 10321, 1336, 21, 15322, 29, 9914, 1463, 9, 630, 11181, 143, 184, 20, 107, 32, 60, 151, 3669, 26, 154, 448, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
scott account locked in SQL Plus === i am trying to log to Orcale Sql plus. When i enter scott as username and tiger as password, it shows the account is locked. How to unlock it.![The screen shot is given below][1] [1]: http://i.stack.imgur.com/0DiMc.png
0
[ 2, 1824, 2176, 4011, 19, 4444, 255, 3123, 800, 3726, 3726, 31, 589, 749, 20, 6738, 20, 54, 3430, 62, 4444, 255, 3123, 9, 76, 31, 2830, 1824, 28, 4155, 7259, 17, 5825, 28, 20884, 15, 32, 1285, 14, 2176, 25, 4011, 9, 184, 20, 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...
squid3 and Zend\Http\Client\Adapter\Proxy === I have a working proxy that I'm trying to connect to from a client using Zend\Http\Client\Adapter\Proxy in ZF2. Squid config: http_port [server_ip_address]:3128 transparent access_log /var/log/squid3/access.log acl our_networks src [client_ip] [other_ip_range] acl localnet src 127.0.0.1/32 http_access allow our_networks http_access allow localnet Controller test code: <?php namespace MyModule\Controller; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; use Zend\Http\Client\Adapter\Proxy; use Zend\Uri\Uri; class IndexController extends AbstractActionController { public function testAction() { $proxy = new Proxy; $proxy->connect('[server_ip_address]', 3128); $request = $proxy->write('GET', new Uri('http://www.example.com')); die(var_dump($request)); } } I get an exception on the row with "$proxy->connect('[server_ip_address]', 3128);", with the following message: Unable to Connect to tcp://[serv_ip_address]:3128. Error #110: Connection timed out I know the proxy works since I'm able to connect to it from the other IP range, and I've double and triple checked the IP-address of the client.
0
[ 2, 25756, 240, 17, 10526, 43, 1, 21127, 1, 150, 18513, 38, 1, 27576, 106, 1, 4899, 9229, 800, 3726, 3726, 31, 57, 21, 638, 27188, 30, 31, 22, 79, 749, 20, 6379, 20, 37, 21, 6819, 568, 10526, 43, 1, 21127, 1, 150, 18513, 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...
Is === in PHP binary-safe in string comparison? === Php functions `strcmp`, `strcasecmp` and other from this family are binary-safe. Are operators `==` and `===` binary-safe? And if yes what should be used in binary-safe string comparison: functions or operator?
0
[ 2, 25, 800, 3726, 3726, 19, 13, 26120, 14171, 8, 18166, 19, 3724, 6050, 60, 800, 3726, 3726, 13, 26120, 3719, 13, 1, 9729, 150, 2554, 1, 15, 13, 1, 9729, 10325, 150, 2554, 1, 17, 89, 37, 48, 190, 50, 14171, 8, 18166, 9, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MongoDB copyDatabase runs index creation on foreground not background === I have 700M rows / 1.3TB MongoDB instance, version 1.6.3. I tried to copy it to new 2.0 instance with `copyDatabase` command. 'Just copying' was done by 2 hours. But after that, new MongoDB collection locked and `db.currentOp()` returns below result. { "opid" : 5, "active" : true, "lockType" : "write", "waitingForLock" : false, "secs_running" : 22138, "op" : "query", "ns" : "nerv", "query" : { "copydb" : 1, "fromhost" : "<some host>", "fromdb" : "<some db>", "todb" : "<some db>" }, "client" : "127.0.0.1:50689", "desc" : "conn", "threadId" : "0x7f5094005700", "connectionId" : 1, "msg" : "index: (2/3) btree bottom up 214887968/715742197 30%", "progress" : { "done" : 214887968, "total" : 715742197 }, "numYields" : 5591738 }, I'm waiting about 5 hours and it looks this will not be ended within 24 hours. Do I have to wait this or is there any other options? ( like running index creation in background )
0
[ 2, 3521, 5474, 220, 4344, 18768, 8436, 1461, 4348, 2502, 27, 26, 62, 8810, 52, 2395, 800, 3726, 3726, 31, 57, 10954, 79, 11295, 13, 118, 137, 9, 240, 11872, 3521, 5474, 220, 4851, 15, 615, 137, 9, 379, 9, 240, 9, 31, 794, 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...