unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Spring RestTemplate gives "500" error but same URL, credentails works in RestClient and Curl === An Url, Credentails works in RestClient UI as well as with Curl where as i'm getting "500" error when access the same via Spring RestTemplate? Example, MultiValueMap<String, Object> map = new LinkedMultiValueMap<String, Object>(); map.add("name", user); map.add("password", password); restTemplate.postForObject(url, request, employee.class, map); Please let me know your suggestions or comments to fix the problem? Thanks In Advance, Kathir
0
[ 2, 1573, 760, 9577, 6554, 2352, 13, 7, 6000, 7, 7019, 47, 205, 287, 6362, 15, 5059, 817, 8682, 18, 693, 19, 760, 150, 18513, 38, 17, 14320, 800, 3726, 3726, 40, 287, 6362, 15, 5059, 817, 8682, 18, 693, 19, 760, 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...
which one is faster to retrieve data using WPF? === here is my next question. lets say i have a .net application want to access the database at my website. Which one is faster to retrieve the data? 1. connect the database directly from my .net application? 2. using third party like php that return the xml/json?
0
[ 2, 56, 53, 25, 4233, 20, 11917, 1054, 568, 619, 7721, 60, 800, 3726, 3726, 235, 25, 51, 328, 1301, 9, 6884, 395, 31, 57, 21, 13, 9, 2328, 3010, 259, 20, 1381, 14, 6018, 35, 51, 2271, 9, 56, 53, 25, 4233, 20, 11917, 14, 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...
How to create a double bottom border in CSS === I want to create a double boarder at the bottom of a title with two lines of different thicknesses and a 1px space in between. Specifically a top line with a thickness of 2px and a bottom line of 1px. Enclosed is an image example of what I am aiming to achieve aesthetically - http://tinypic.com/view.php?pic=hs8jli&s=6 Other website which have used this design aspect - http://www.rollingstone.com/ So far I have tried - "border-bottom: 1px Solid #000;" with no luck. I would appreciate any further suggestions Many Thanks
0
[ 2, 184, 20, 1600, 21, 1494, 2129, 1862, 19, 272, 18, 18, 800, 3726, 3726, 31, 259, 20, 1600, 21, 1494, 686, 106, 35, 14, 2129, 16, 21, 581, 29, 81, 1560, 16, 421, 16008, 160, 17, 21, 137, 306, 396, 726, 19, 128, 9, 3524, 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...
Liferay: Is it possible to define the order of initialization of portlets by start of portal? === I would like to specify the order of initialization of portlets by portal start. Is it possible?
0
[ 2, 201, 2787, 45, 25, 32, 938, 20, 9267, 14, 389, 16, 2104, 1829, 16, 1295, 11045, 34, 799, 16, 8281, 60, 800, 3726, 3726, 31, 83, 101, 20, 19077, 14, 389, 16, 2104, 1829, 16, 1295, 11045, 34, 8281, 799, 9, 25, 32, 938, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Creating a spline curve between 2 points in Three.js === I'm trying to link points with a spline using Three.js for a visualization I'm trying to make. As far as I can tell, I add points to an array, pass that to THREE.SplineCurve3, step through the spline points to get the geom coords and render. It works if I only add the start/end points to the array but if I try to add a mid-point, I get an error. Example is here: http://jsfiddle.net/sLQK9/4/ I'm sure it's something simple but I can't spot it - can anyone help me? Ultimately, the points will be on the surface of a sphere and the splines between 2 points will take the route an aircraft would take - I.E. sort of great circle but further away from the center of the sphere at the midpoint of the spline. Many thanks in advance.
0
[ 2, 2936, 21, 3782, 1143, 7101, 128, 172, 819, 19, 132, 9, 728, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 3508, 819, 29, 21, 3782, 1143, 568, 132, 9, 728, 18, 26, 21, 28873, 31, 22, 79, 749, 20, 233, 9, 28, 463, 28, 31, 92,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to setup server and local host in CODA 2? === I am using my own Mac as the web server. I am keeping two copies of the web page files. One in `Applications/MAMP/htdocs/`, for the real web pages; the other one in `Users/me/Sites/`, for "local" edit before "publish" to the web server. I also set password for the web server. How do I setup site in CODA 2? It requires: Server User Name Password Root URL Local URL Local Root It keeps asking user name and password
0
[ 2, 184, 20, 18161, 8128, 17, 375, 2015, 19, 326, 593, 172, 60, 800, 3726, 3726, 31, 589, 568, 51, 258, 1572, 28, 14, 2741, 8128, 9, 31, 589, 2882, 81, 3298, 16, 14, 2741, 2478, 6488, 9, 53, 19, 13, 1, 2552, 20669, 18, 118, 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...
Cloud Zoom on click show fancybox gallery === I have read accros stackexchange and google to enable Cloud Zoom on click show fancybox gallery. the problem is since both the fancybox and cloud zoom use rel to works. someone has solution for fancybox with cloud zoom innermode . but what i need is like this gallery http://goo.gl/dmcW8 coludzoom on click show fancybox gallery that create using cloudzoom gallery
0
[ 2, 4005, 19469, 27, 10840, 298, 12251, 5309, 2246, 800, 3726, 3726, 31, 57, 1302, 7602, 3171, 7566, 1706, 16229, 17, 8144, 20, 9240, 4005, 19469, 27, 10840, 298, 12251, 5309, 2246, 9, 14, 1448, 25, 179, 156, 14, 12251, 5309, 17, 400...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Benchmarks for different processors === I'm developing a completely cpu intensive single threaded application on a fairly old laptop, Dell Inspiron 1545 using a pentium dual core T4200 with 3 Gbytes of ram. I've done some benchmarks on the performance but I need to know what kind of improvements (order of magnitude 5x, 10x, 100x etc.) I could get on newer more powerful processors. Can someone point me to some on-line performance comparisons of the different chips, pentium,i3,i5,i7 that will give me even a very rough idea of what order of magnitude of performance improvement I could get with these newer more powerful chips.
0
[ 2, 25324, 18, 26, 421, 21034, 800, 3726, 3726, 31, 22, 79, 3561, 21, 1524, 17578, 13633, 345, 9322, 69, 3010, 27, 21, 6647, 315, 12294, 15, 13, 5491, 19, 3401, 11803, 357, 2520, 568, 21, 11734, 2187, 5747, 2884, 13, 38, 300, 4621,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NSMutableDictionary returning (null) for valid key/forget its values? === Ok. I have a class "Game", which creates an instance of my class "Board", and tests it. The "Board" class has a dictionary, which seems to somehow not being able to keep it's values(?) Tried to strap down the code to the minimal: The Game class: <!-- language: lang-c --> @interface Game : UIViewController{ Board *board; } -(void)testAgain; @implementation Game -(void)setup{ board = [Board alloc]createBoard]; [board test]; //returns right value [self testAgain]; //returns (null), see output below } -(void)testAgain{ [board test]; } -(void)didLoad{ [self setup]; } The Board Class: <!-- language: lang-c --> @interface Board : NSObject{ @property(nonatomic, retain) NSMutableDictionary *dict; -(Board *)createBoard; -(void)test; @implementation Board @synthesize dict; -(Board *)createBoard{ dict = [[NSMutableDictionary alloc]init]; [dict setObject:@"foo1" forKey:@"1"]; [dict setObject:@"foo2" forKey:@"2"]; [dict setObject:@"foo3" forKey:@"3"]; [dict setObject:@"foo4" forKey:@"4"]; [dict setObject:@"foo5" forKey:@"5"]; } -(void)test{ NSLog(@"Test return: %@", [dict objectForKey:@"4"]); } The following output: 2012-06-23 01:05:28.614 Game[21430:207] Test return: foo4 2012-06-23 01:05:32.539 Game[21430:207] Test return: (null) In advance, thanks for any help!
0
[ 2, 13, 2172, 7903, 579, 22595, 1857, 2485, 13, 5, 4215, 211, 6, 26, 7394, 1246, 118, 1106, 3060, 82, 4070, 60, 800, 3726, 3726, 5854, 9, 31, 57, 21, 718, 13, 7, 5128, 7, 15, 56, 9695, 40, 4851, 16, 51, 718, 13, 7, 2806, 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...
Receive files on a REST web service using a POST request === I'm trying to get files making a POST request to an action. The web service is working fine but I can't retrieve that file "as it is". Cake automatically transfoms the $this->request->data into an array and that's not what I need. I need to save that file into a BLOB column in my db. Please help me!!! Thanks in advance for you help!! this is my controller code, I'm on CakePHP 2.1.0: class TransfersController extends AppController { public $name = 'Transfers'; public $components = array('RequestHandler'); public function record($rfc = null, $numop = null, $source = null) { if ($this->request->is('post')) { if (strlen($rfc) > 0) { if ($numop > 0) { $this->loadModel('Client'); $client = $this->Client->findByRfc($rfc); if (!empty($client)) { if ($client['Client']['enabled'] == 1) { // if (!empty($this->request->data)) { // // $bin = pack("H*",$this->request->data); // $bin = $this->request->data; // $this->Transfer->set('xml', $bin); // } $this->Transfer->set('client_id', $client['Client']['id']); $this->Transfer->set('num_operacion', $numop); $this->Transfer->set('source', $source); // $this->Transfer->set('xml', $this->request->data); if ($this->Transfer->save($this->request->data)) { //$message = 'Ok'; $message = $data; } else { $message = 'No se pudo registrar la transmisión'; } } else { $message = 'Su cuenta ha sido suspendida. Póngase en contacto con Aduanasoft para resolver éste inconveniente.'; } } else { $message = 'El RFC ' . $rfc . ' no está registrado con Aduanasoft'; } } else { $message = 'El número de operación no es válido'; } } else { $message = 'El RFC no es válido'; } } else { $message = 'La petición es inválida'; } $this->set('message', $message); } }
0
[ 2, 2588, 6488, 27, 21, 760, 2741, 365, 568, 21, 678, 3772, 800, 3726, 3726, 31, 22, 79, 749, 20, 164, 6488, 544, 21, 678, 3772, 20, 40, 1028, 9, 14, 2741, 365, 25, 638, 1123, 47, 31, 92, 22, 38, 11917, 30, 3893, 13, 7, 472, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Check if all reserved jobs have been completed using beanstalkc === I want one of my scripts to know if all of the remaining queued jobs in beanstalkd have been completed. I'm currently planning to iterate through every job id and run peek() to see if anything is returned. Is there a more elegant way to do this?
0
[ 2, 2631, 100, 65, 9430, 4844, 57, 74, 1066, 568, 14685, 9718, 150, 800, 3726, 3726, 31, 259, 53, 16, 51, 17505, 20, 143, 100, 65, 16, 14, 1846, 22521, 43, 4844, 19, 14685, 9718, 43, 57, 74, 1066, 9, 31, 22, 79, 871, 2334, 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...
Get the sum of the outerHeight of all elements of the same class === I think this is a pretty straightforward problem but... var outerHeight = $('.profile').outerHeight(); $("#total-height").text(outerHeight + 'px'); Right now the var `outerHeight` gives me the outerHeight of only the first element with the class `.profile`. How can I get the sum of the outerHeights of *all* elements with the class `.profile`?
0
[ 2, 164, 14, 3907, 16, 14, 4896, 252, 7748, 16, 65, 2065, 16, 14, 205, 718, 800, 3726, 3726, 31, 277, 48, 25, 21, 1772, 22262, 1448, 47, 9, 9, 9, 4033, 4896, 252, 7748, 800, 5579, 5, 22, 9, 14503, 22, 6, 9, 1320, 106, 252, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
entity framework - working with several edmx files === I am using entity framework 4 and I have many tables (500). My edmx file is very large and I find it really hard to open it and make changes on it. I found that in my project there are "groups" of tables that related to specific business so I would like to saperate the edmx into several files. I am using repository pattern and unit of work pattern and work with POCOs this way: This is my container public partial class MyEntities : ObjectContext { #region Private Methods private void SetContextOptions() { ContextOptions.LazyLoadingEnabled = false; } #endregion #region Constructors public MyEntities() : base("name=MyConnection", "MyEntities") { SetContextOptions(); OnContextCreated(); } #endregion #region Partial Methods partial void OnContextCreated(); #endregion } For each edmx I will set the Entity Container Name property to MyEntities. This is my generic repository: public class Repository<T> : IRepository<T> where T : class, IDataEntity { ObjectContext _context; IObjectSet<T> _objectSet; protected ObjectContext Context { get { if (_context == null) { _context = GetCurrentUnitOfWork<EFUnitOfWork>().Context; } return _context; } } protected IObjectSet<T> ObjectSet { get { if (_objectSet == null) { _objectSet = this.Context.CreateObjectSet<T>(); } return _objectSet; } } public TUnitOfWork GetCurrentUnitOfWork<TUnitOfWork>() where TUnitOfWork : IUnitOfWork { return (TUnitOfWork)UnitOfWork.Current; } public virtual IQueryable<T> GetQuery(IEnumerable<Expression<Func<T, object>>> includes) { return ObjectSet.IncludeMultiple(includes); } public virtual IPaged<T> GetQuery(IQueryable<T> query, Func<IQueryable<T>, IOrderedQueryable<T>> orderBy, int pageNumber, int pageSize) { if (orderBy != null) { query = orderBy(query); } IPaged<T> page = new Paged<T>(query, pageNumber, pageSize); return page; } public virtual IPaged<T> GetQuery(IEnumerable<T> query, Func<IEnumerable<T>, IOrderedEnumerable<T>> orderBy, int pageNumber, int pageSize) { if (orderBy != null) { query = orderBy(query); } IPaged<T> page = new Paged<T>(query, pageNumber, pageSize); return page; } public virtual IEnumerable<T> GetObjectStateManagerChanges() { return this.Context.ObjectStateManager. GetObjectStateEntries(EntityState.Added | EntityState.Modified). Select(e => e.Entity). OfType<T>(); } public virtual void Insert(T entity) { this.ObjectSet.AddObject(entity); } public virtual void Delete(T entity) { this.ObjectSet.DeleteObject(entity); } public virtual void MarkModified(T entity) { this.Context.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); } public virtual void Attach(T entity) { ObjectStateEntry entry = null; if (this.Context.ObjectStateManager.TryGetObjectStateEntry(entity, out entry) == false) { this.ObjectSet.Attach(entity); } } public virtual void Detach(T entity) { ObjectStateEntry entry = null; if (this.Context.ObjectStateManager.TryGetObjectStateEntry(entity, out entry) == true) { this.ObjectSet.Detach(entity); } } public virtual T GetOriginalEntity(Func<T, bool> predicate) { T originalEntity = null; EFUnitOfWorkFactory factory = new EFUnitOfWorkFactory(); using (EFUnitOfWork uow = (EFUnitOfWork)factory.Create()) { originalEntity = uow.Context.CreateObjectSet<T>().Single(predicate); } return originalEntity; } } And this is my unit of work implementation: public class EFUnitOfWorkFactory : IUnitOfWorkFactory { private static int Counter = 0; private static Func<ObjectContext> _objectContextDelegate; private static readonly Object _lockObject = new object(); public static void SetObjectContext(Func<ObjectContext> objectContextDelegate) { _objectContextDelegate = objectContextDelegate; } public IUnitOfWork Create() { ObjectContext context; lock (_lockObject) { Counter++; context = _objectContextDelegate(); } return new EFUnitOfWork(context, Counter); } } public class EFUnitOfWork : IUnitOfWork, IDisposable { public ObjectContext Context { get; private set; } public int Id { get; private set; } public EFUnitOfWork(ObjectContext context, int id) { Id = id; Context = context; Context.ContextOptions.LazyLoadingEnabled = false; } public int Commit() { return Context.SaveChanges(); } public void Dispose() { if (Context != null) { Context.Dispose(); Context = null; } GC.SuppressFinalize(this); } } will my plan work to divide the edmx work with this code? What is the best practices for my case (I have read the two parts of http://blogs.msdn.com/b/adonet/archive/2008/11/24/working-with-large-models-in-entity-framework-part-1.aspx)?
0
[ 2, 9252, 6596, 13, 8, 638, 29, 238, 13, 69, 79, 396, 6488, 800, 3726, 3726, 31, 589, 568, 9252, 6596, 268, 17, 31, 57, 151, 7484, 13, 5, 6000, 6, 9, 51, 13, 69, 79, 396, 3893, 25, 253, 370, 17, 31, 477, 32, 510, 552, 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...
Where an index applies === In my basic understanding of indexes and running of the `explain` statement, it seems that they only apply to `WHERE` and `ORDER BY`. Are there any other places / instances where indexes apply in `SELECT` statements?
0
[ 2, 113, 40, 4348, 13169, 800, 3726, 3726, 19, 51, 2125, 3260, 16, 4348, 160, 17, 946, 16, 14, 13, 1, 6899, 10792, 1, 3331, 15, 32, 2206, 30, 59, 104, 5645, 20, 13, 1, 2798, 1, 17, 13, 1, 7861, 34, 1, 9, 50, 80, 186, 89, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Xalan alongside Saxon === I use Xalan in my application, but need to use Saxon with a reference implementation to generate test output to compare with. I want to use them both during unit tests. However, as soon as I add an dependency on Saxon in the project .pom, the application seems to use Saxon for all xslt and XPath operations during tests: <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> <version>9.4</version> <scope>test</scope> </dependency> This makes the main application fail when generating output due to a different XPath behaviour. When running the main application outside of test scope it works. How can I run the main application using Xalan, but the tests using Saxon, during tests? I have tried setting the following property before running the Xalan and Saxon parts: System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl "); System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl"); I have also tried to put the Xalan and Saxon parts in different projects, and I have also tried to use them both from a third project, with the same result.
0
[ 2, 568, 993, 17095, 2387, 13878, 800, 3726, 3726, 31, 275, 993, 17095, 19, 51, 3010, 15, 47, 376, 20, 275, 13878, 29, 21, 2801, 6123, 20, 7920, 1289, 5196, 20, 11590, 29, 9, 31, 259, 20, 275, 105, 156, 112, 1237, 4894, 9, 207, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
issues installing perl DBI-mysql in windows === I have downloaded and installed **ActivePerl** on my Windows 7-64 machine. Everything went smooth, and also loaded the `perl` interpreter into my `Eclipse` platform. However, when I try to access a `localhost` MySQL database, I got the following error: $database = "<database>"; $host = "localhost"; $user = "<user>"; $password = "<password>"; #connect to MySQL database my $db = DBI->connect( "DBI:mysql:database=$db:host=$host", $user, $password ) or die "Can't Connect to database: $DBI::errstr\n"; then I get the following error: install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/Users/souzamor/workspace/.metadata/.plugins/org.epic.debug C:/Users/souzamor/workspace/Parser C:/Perl64/site/lib C:/Perl64/lib .) at (eval 3) line 3. Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right. Available drivers: CSV, DBM, ExampleP, File, Gofer, ODBC, Oracle, Pg, Proxy, SQLite, Sponge. at C:/Users/souzamor/workspace/Parser/Parser.pl line 14. Also, when I try to install DBD-Mysql I get: C:\Perl64\bin>ppm install DBD-Mysql ppm install failed: Can't find any package that provides DBD-Mysql I have installed `DBI`, `Data-Table`, but I can't install `DBD-Mysql`. Any thoughts? Thanks
0
[ 2, 1549, 25429, 416, 255, 13, 43, 2161, 8, 915, 18, 22402, 19, 1936, 800, 3726, 3726, 31, 57, 23887, 17, 4066, 13, 1409, 7889, 1432, 255, 1409, 27, 51, 1936, 453, 8, 3470, 1940, 9, 796, 296, 3905, 15, 17, 67, 8572, 14, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Amazon DynamoDB and relationship many-to-many === I have two tables, and some fields between that tables has many-to-many relationships. How can i implement this feature in Amazon DynamoDB?
0
[ 2, 8059, 18120, 9007, 17, 1429, 151, 8, 262, 8, 14842, 800, 3726, 3726, 31, 57, 81, 7484, 15, 17, 109, 2861, 128, 30, 7484, 63, 151, 8, 262, 8, 14842, 5833, 9, 184, 92, 31, 8713, 48, 1580, 19, 8059, 18120, 9007, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Jump forward in andengine Android === I am developing a Game in which sprite have to jump forward . I already explore it and used MoveYModifier for up and then MoveYModifier for down again it is working right except on more then one tap on the screen.But I want to move him forward as well while jump. final Entity playerEntity = move; final float jumpDuration = 3; final float startX = playerEntity.getX(); final float jumpHeight = 100; final MoveXModifier moveUpModifier = new MoveXModifier(jumpDuration / 2, startX, startX - jumpHeight); // - since we want the sprite to go up. final MoveXModifier moveDownModifier = new MoveXModifier(jumpDuration / 2,startX - jumpHeight, startX); final SequenceEntityModifier modifier = new SequenceEntityModifier(moveUpModifier, moveDownModifier); playerEntity.registerEntityModifier(modifier); return true;
0
[ 2, 3936, 917, 19, 17, 16847, 13005, 800, 3726, 3726, 31, 589, 3561, 21, 250, 19, 56, 27902, 57, 20, 3936, 917, 13, 9, 31, 614, 8594, 32, 17, 147, 780, 93, 13670, 16292, 26, 71, 17, 94, 780, 93, 13670, 16292, 26, 125, 188, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Backbone.RelationalModel using requireJs === I would like to use [`RelationalModel`](https://github.com/PaulUithol/Backbone-relational) using [`requireJs`](http://requirejs.org/). Here my code(*) When I run my module, I get the following warning message: Relation=d; no model, key or relatedModel (function (){a.apply(this,arguments)}, "tasks", undefined). My questions are: 1) what does the warning message means? 2) `relatedModel` and `collectionType` are well defined in my `relations` or should I export the `model` and the `collection` in `define` call? --- (*) define([ 'backbone', 'relationalModel' ], function (Backbone) { "use strict"; var User = Backbone.RelationalModel.extend({ relations: [{ type: Backbone.HasMany, key: 'tasks', relatedModel: 'Task', collectionType: 'TaskCollection', reverseRelation: { key: 'hasUser', includeInJSON: 'id' // 'relatedModel' is automatically set to 'User'; the 'relationType' to 'HasOne'. } }] }); return User; });
0
[ 2, 24036, 9, 99, 10832, 192, 13998, 568, 4077, 728, 18, 800, 3726, 3726, 31, 83, 101, 20, 275, 636, 1, 99, 10832, 192, 13998, 1, 500, 5, 21127, 18, 6903, 10404, 20926, 9, 960, 118, 9606, 11193, 5342, 118, 1958, 8640, 8, 99, 1083...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Converting Vegur to be used for font-face === I need to use [Vegur](http://www.fontspace.com/arro/vegur) font, which is available in otf format, for a website. However, when I try to convert it using font squirrel or any other similar font-face generator (e.g. http://fontface.codeandmore.com/) font immediately loses all smoothness and quality... Is anyone aware of where I could get a pre-converted version of the font? Or what else could I use to convert the font.
0
[ 2, 19583, 13, 195, 11147, 20, 44, 147, 26, 9978, 8, 6413, 800, 3726, 3726, 31, 376, 20, 275, 636, 195, 11147, 500, 5, 21127, 6903, 6483, 9, 21931, 5582, 9, 960, 118, 14238, 118, 195, 11147, 6, 9978, 15, 56, 25, 904, 19, 635, 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...
Could not find class 'com.google.gdata.client.calendar.CalendarService' === I am trying to use CalenderService from this class but it is giving me " Could not find class 'com.google.gdata.client.calendar.CalendarService' " error at runtime, i have imported gdata.client libraries. Have tested on both android versions 2.0 and 4.0, but still getting this error. Any suggestions? thanks
0
[ 2, 110, 52, 477, 718, 13, 22, 960, 9, 16111, 4875, 9, 263, 18768, 9, 150, 18513, 38, 9, 3430, 219, 2542, 9, 3430, 219, 2542, 11449, 22, 800, 3726, 3726, 31, 589, 749, 20, 275, 1658, 21607, 11449, 37, 48, 718, 47, 32, 25, 1438,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Building Makefiles from Eclipse === I am looking a simple and reliable way to build downloaded code in Eclipse using MinGW on Windows. For this I am trying to build one of the sample applications that come with wxWidgets. I am using Eclipse Indigo (SDK 3.7.2) with CDT (8.0.2), wxWidgets 2.9.3 and MinGW install set 20120426. I have successfully install and built wxWidget from the command line, and build my own managed code application in Eclipse, so I think things are correctly set up. If I build a sample from the command line by navigating to project directory "C:\wxWidgets-2.9.3\samples\calendar" and executing "mingw32-make -f makefile.gcc" all works fine. Now I want to learn how to do that from within Eclipse. I have tried starting Eclipse. Clicking on File/New/Makefile Project with existing code. I then selecting "C:\wxWidgets-2.9.3\samples\calendar" as my project directory and selecting MinGW C++ toolchain and then clicking on Finish. The from the project properties C/C++ Build page I de-selected "Use default command build" and entered "mingw32-make -f makefile.gcc". I also deselected the Generate Makefile automatically option and set the build directory to be ${ProjDirPath}. When I try and build the project I get the following error `** Build of configuration Default for project Sample_calendar ** mingw32-make -f makefile.gcc -k all if not exist gcc_mswud mkdir gcc_mswud process_begin: CreateProcess(NULL, -c "if not exist gcc_mswud mkdir gcc_mswud", ...) failed. make (e=2): The system cannot find the file specified. mingw32-make: [gcc_mswud] Error 2 (ignored) windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\calendar_sample_rc.o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gcc_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../samples --define NOPCH windres: gcc_mswud\calendar_sample_rc.o: No such file or directory` If I create the "gcc_mswud" manually then the build work fines. It is as if Eclipse is trying to read the output from mingw32-make and then execute it its self instead of just letting mingw get on with it. When run from the command prompt MinGW creates the directory but does still show "if not exist gcc_mswud mkdir gcc_mswud". I know I could just make the directory manually or modify the makefile or several other possible work arounds. But I am trying to look for a clean solution that I can use with several much bigger projects. Thanks Al.
0
[ 2, 353, 233, 16877, 18, 37, 11652, 800, 3726, 3726, 31, 589, 699, 21, 1935, 17, 11398, 161, 20, 1895, 23887, 1797, 19, 11652, 568, 12069, 499, 27, 1936, 9, 26, 48, 31, 589, 749, 20, 1895, 53, 16, 14, 5717, 3767, 30, 340, 29, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Problems accessing databases on remote postgresql sever === I have a postgresql (9.1.4) server running on a remote machine (Ubuntu 12.04), and I'm having trouble accessing it on my local machine. Specifically, on my local machine, I can access the remote server using only the username "postgres" and the database name "postgres", even though I have other user names and databases. First some of the background information. While in the interactive environment invoked with "psql" on the remote machine, I created another user, called "mxtxdb", and set the password for that user. I also created a database called "mxtxdb". To demonstrate their existence, I logged onto the remote machine and ran: sudo su postgres Password: postgres@myhost:~$ psql psql (9.1.4) Type "help" for help. postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------+----------- mxtxdb | | {} postgres | Superuser, Create role, Create DB, Replication | {} postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+-------------+-------------+----------------------- mxtxdb | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres + | | | | | postgres=CTc/postgres+ | | | | | mxtxdb=CTc/postgres postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows) Furthermore, while still on the remote machine, I can access the database from the "mxtxdb" postgresql account: postgres@myhost:~$ psql -h localhost -U mxtxdb -d mxtxdb Password for user mxtxdb: psql (9.1.4) Type "help" for help. mxtxdb=> But when I try to do the same on the local machine, I get this: psql -h <server's address> -U postgres -d "postgres" -p 5432 Password for user postgres: psql (9.1.4) Type "help" for help. postgres=# and psql -h <server's address> -U "postgres" -d "mxtxdb" -p 5432 Password for user postgres: psql: FATAL: database "mxtxdb" does not exist and psql -h <server's address> -U "mxtxdb" -d "mxtxdb" -p 5432 Password for user mxtxdb: psql: FATAL: role "mxtxdb" does not exist The last two lines of my pg_hba.conf file are: host all mxtxdb 0.0.0.0/0 trust host all postgres 0.0.0.0/0 trust and the listen_addresses is set to '*' (and uncommented) in the postgresql.conf file. Any idea why I cannot access other accounts or databases remotely, but I can when ssh'd into the remote machine?
0
[ 2, 1716, 1381, 68, 6018, 18, 27, 5388, 678, 6879, 18, 22402, 15114, 800, 3726, 3726, 31, 57, 21, 678, 6879, 18, 22402, 13, 5, 518, 9, 165, 9, 300, 6, 8128, 946, 27, 21, 5388, 1940, 13, 5, 4502, 1020, 2473, 390, 9, 3277, 6, 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...
Big-Endian binary 4-bytes to IEEE floating point conversion in C# === I want to convert **binary (Big-Endian) 4-Bytes** to **IEEE floating point** using C#, How to do it? I need Help
0
[ 2, 580, 8, 2451, 806, 14171, 268, 8, 23246, 18, 20, 19215, 8319, 454, 6263, 19, 272, 5910, 800, 3726, 3726, 31, 259, 20, 8406, 13, 1409, 4772, 1857, 13, 5, 6407, 8, 2451, 806, 6, 268, 8, 23246, 18, 1409, 20, 13, 1409, 660, 285...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Why does z-index: -1; appear above z-index: 1;? === Explain this behavior: http://jsfiddle.net/2VexH/2/ Only difference is the first div has z-index: 1 set.
0
[ 2, 483, 630, 2052, 8, 25671, 45, 13, 8, 165, 73, 1893, 784, 2052, 8, 25671, 45, 137, 73, 60, 800, 3726, 3726, 3271, 48, 3257, 45, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 15718, 195, 396, 252, 118, 9298, 104, 2841, 25, 14, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
How To Port an iPad Application to the iPhone === I have an existing iPad - Application, no I want to make an universal App. There are many Tutorials with making iPhone Apps universall, but i dont find how to make iPad apps Universal. Is there somebody having experienxce with this? No Storyboards are used, yust normal xib. I've readed this tutorial, and porting iPhone apps to universal seems to be better supported by xcode: http://www.raywenderlich.com/1111/how-to-port-an-iphone-application-to-the-ipad
0
[ 2, 184, 20, 1295, 40, 31, 8240, 3010, 20, 14, 21024, 800, 3726, 3726, 31, 57, 40, 3149, 31, 8240, 13, 8, 3010, 15, 90, 31, 259, 20, 233, 40, 4172, 4865, 9, 80, 50, 151, 29724, 18, 29, 544, 21024, 4865, 18, 4172, 255, 15, 47,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
css div positioning correction needed === I just embedded the Jquery News Ticker in my site <a href="http://www.thekashmirscenario.com" > The Kashmir Scenario </a>, but i want the ticker to take the 60% width of the page so that the div with class ".threecol_three" shifts up to acquire the left over space above it but some how it does'nt do that , i tried applying 'float and display' commands in the css.....but it does'nt seem to work.. Here's the css code : .threecol_three { width:303px; float:right; margin-bottom:56px; } .ticker-wrapper.has-js { margin: 20px 0px 20px 0px; padding: 0px 20px; width: 580px; height: 32px; display: block; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; background-color: #f8f0db; font-size: 0.75em; }
0
[ 2, 272, 18, 18, 13, 12916, 649, 68, 14608, 851, 800, 3726, 3726, 31, 114, 12138, 14, 487, 8190, 93, 996, 8809, 106, 19, 51, 689, 13, 1, 58, 746, 14057, 3726, 7, 21127, 6903, 6483, 9, 124, 10534, 8635, 18, 8172, 8756, 9, 960, 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...
Unable to sync with Oracle Standby database === I have created a standby database on Windows machine with version 10.2.0.1 For the first time for the database to sync I have copied the archive from primary database. But on the switch from the primary database. The archive log doesn't ships to the standby database. SQL> recover standby database; ORA-00279: change 1248007 generated at 07/29/2012 22:46:37 needed for thread 1 ORA-00289: suggestion : E:\ARCHIVE\ARC00043_0778845461.001 ORA-00280: change 1248007 for thread 1 is in sequence #43 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} ORA-00308: cannot open archived log 'E:\ARCHIVE\ARC00043_0778845461.001' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\STANDBY\SYSTEM01.DBF' Earlier I have taken the cold backup to move the files. Waiting for your response.
0
[ 2, 2343, 20, 6063, 150, 29, 15759, 1261, 779, 6018, 800, 3726, 3726, 31, 57, 679, 21, 1261, 779, 6018, 27, 1936, 1940, 29, 615, 332, 9, 135, 9, 387, 9, 165, 26, 14, 64, 85, 26, 14, 6018, 20, 6063, 150, 31, 57, 18225, 14, 925...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Switching to postgresql for heroku deployment of rails application === I have a rails application currently using sqlite3. Following this guide: https://devcenter.heroku.com/articles/rails3 I'm trying to switch to postgresql. I changed my gemfile but when I run bundle install I get this error: Errno::EACCES: Permission denied - /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.0/.gemtest An error occured while installing pg (0.14.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.14.0'` succeeds before bundling. so I try gem install pg -v '0.14.0' and get this error: ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/me/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.0/.gemtest I found a few people with similar problems but I couldn't get it working. This is my first time trying to deploy a rails application so I don't have much intuition about what I'm doing.
0
[ 2, 13027, 20, 678, 6879, 18, 22402, 26, 36, 9266, 10475, 16, 2240, 18, 3010, 800, 3726, 3726, 31, 57, 21, 2240, 18, 3010, 871, 568, 4444, 10601, 240, 9, 249, 48, 3378, 45, 7775, 18, 6903, 14438, 12641, 9, 1694, 9266, 9, 960, 118...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
regex.replace in c# === <br>I was wondering how to do a Regex.replace on a string every 2 digits. <br>Example: user types 111213 <br>I want my replace to look at the "111213" and replace the 11 with c, 12 with o, 13 with m, <br>Obviously I have already assigned the values to each letter previously, I just don't know enough about regex to tell it to do the replace every 2 digits. <br>Any help or pointer to a good article would be appreciated. <br>Rafael Ruales.
0
[ 2, 7953, 1706, 9, 99, 5119, 19, 272, 5910, 800, 3726, 3726, 13, 1, 5145, 1, 49, 23, 5712, 184, 20, 107, 21, 7953, 1706, 9, 99, 5119, 27, 21, 3724, 352, 172, 19076, 9, 13, 1, 5145, 1, 29041, 45, 4155, 2551, 14091, 20240, 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...
How to bind to a collection without using an index of the collection? === I am trying to learn the MVVM pattern in WPF and I am running into some issues with bindings and collections. I don't like binding to the index of the collection because the collection changes. I have `MyModelClass : ObservableCollection<MyData>` The `MyData` class has a property called `DataValue` in it to hold my custom information. I fill the `MyModelClass` with `MyData` objects. In the view model class (`MyViewModel`) I have a property `CurrentData` of type `MyModelClass`. Now in this case, my binding is to a combo box. Here is what the binding looks like: <ComboBox Name="cmbxData" ItemsSource="{Binding Path=CurrentData}" DisplayMemberPath="DataValue" SelectedValuePath="DataValue" SelectedValue="{Binding Path=CurrentData[0].DataValue}"/> This all works fine and the `MyViewModel` class has the interface setup for PropertyChanged notifications. I need to refresh the information this holds every few seconds. I am refreshing the collection by doing something like this inside the `MyModelClass`: public Class MyModelClass : ObservableCollection<MyData> { private static MyModelClass current = null; public static MyModelClass Current { get { if(current == null) current = new MyModelClass(); return current; } } private void UpdateModel(MyData newData) { MyModelClass newModel = new MyModelClass(); newModel.Add(newData); current = newModel; } } Inside `MyViewModel` there is this: MyModelClass CurrentData = MyModelClass.Current; I tried my best to give as much code as I could and keep it simple. Please let me know if there is more needed to clarify. Thank you for any suggestions on how to fix my issue. In case you missed it: Problem: How can I bind to the collection, or the value I want to display in the collection, without using the index like I have shown above (`SelectedValue="{Binding Path=CurrentData[0].DataValue}"`)? How can I fix this or change my implementation to be correct? Thanks,
0
[ 2, 184, 20, 10193, 20, 21, 1206, 366, 568, 40, 4348, 16, 14, 1206, 60, 800, 3726, 3726, 31, 589, 749, 20, 2484, 14, 17967, 20147, 3732, 19, 619, 7721, 17, 31, 589, 946, 77, 109, 1549, 29, 8728, 18, 17, 5721, 9, 31, 221, 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...
Google Docs Spreadsheet formula stopped working === I have been using the following formula in a google docs spreadsheet for the past few months. About 4 weeks ago it stopped working. I can't figure out why - haven't found anything stating that there has been a change to how the formula works, and haven't made and changes to my data. The error is get is: "Error: argument is blank", not very helpful. Here is the formula: =arrayformula( sum( (Sheet1!$B$2:$B$100458=$A3) * (arrayformula( month(Sheet1!$A$2:$A$100458) ) = month(C$1) ) * (arrayformula( year(Sheet1!$A$2:$A$100458) ) =year(C$1) ) ) ) It has a unique ID in the first column, and a date (1st of each month) in the top row. It then goes through sheet 1, looking for how many records match that ID in the month and year and returns the count. It was working fine for a while, no idea what happened. Even tried going back to the revision history and haven't found any differences.
0
[ 2, 8144, 9765, 18, 1789, 17627, 3729, 1175, 638, 800, 3726, 3726, 31, 57, 74, 568, 14, 249, 3729, 19, 21, 8144, 9765, 18, 1789, 17627, 26, 14, 640, 310, 818, 9, 88, 268, 1342, 1464, 32, 1175, 638, 9, 31, 92, 22, 38, 1465, 70, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
send query results in email on condition === I would like to send the results of a query via email and it works fine but I need to only execute the email if the results is not null. EXEC msdb.dbo.sp_send_dbmail @profile_name='GDB Admin', @recipients = 'joe@mail.com', @subject = 'GDB Warning - THIS IS A TEST', @body ='Key', @query = 'select clientkey as apikey, ImportDate from QueryDData.dbo.QueryData where clientkey not in(''blablablabla'')' so if clientkey is empty do not send the email
0
[ 2, 2660, 25597, 1736, 19, 8517, 27, 2874, 800, 3726, 3726, 31, 83, 101, 20, 2660, 14, 1736, 16, 21, 25597, 1197, 8517, 17, 32, 693, 1123, 47, 31, 376, 20, 104, 15644, 14, 8517, 100, 14, 1736, 25, 52, 16203, 9, 1396, 3319, 4235, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cocoa Drawing Mouse Position === I have written my own solution for drawing charts and graphs. It is based on NSGraphicsContext, NSRectFill, etc. and it uses NSAffineTransform to position individual elements. I use stacked NSGraphicsContext states to draw individual parts of the graph like so: 1. Push (Save) Graphic state 2. Apply (concat) a NSAffineTransform to move where I want to draw 3. Draw at (0,0) using NSRectFill() for example 4. Pop the Graphics state Now this solution works perfectly for drawing, but I want to be able to translate mouse coordinates in the view to individual columns in the graph. But this seems to be an impossible task, because using NSAffineTransform's invert method I can only get the coordinates relative to the parent saved state, not the view itself. So at the time of drawing I don't know the actual coordinates of the rect being drawn relative to the parent NSView. Now my question is: Is it possible to find out the coordinates several stacks deep relative to the parent NSView? Or alternatively, is there any other drawing mechanism (NSLayers?) that would make this easier? I just want to draw some value at the cursor when hovering over a graph column. Thanks a lot!
0
[ 2, 24507, 3533, 7567, 649, 800, 3726, 3726, 31, 57, 642, 51, 258, 4295, 26, 3533, 5158, 17, 7210, 18, 9, 32, 25, 432, 27, 13, 2172, 12084, 18, 1126, 11969, 15, 13, 2172, 14673, 38, 19971, 15, 2722, 9, 17, 32, 2027, 13, 2172, 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...
Getting the value from usercontrol in javascript on button click === I have this following scenario. I have a usercontrol in my page which has a radio button. This control is placed in a page, on click of a button in the page I need to know if the radio button is selected. This is a client event click event of the button as I have to show a confirmation message box i.e. if user clicks yes only then I have to do the remaining operation. Can you guide me what would be the best way to find if the radio button in the userControl is selected. Thanks
0
[ 2, 1017, 14, 1923, 37, 4155, 12898, 19, 8247, 8741, 27, 5167, 10840, 800, 3726, 3726, 31, 57, 48, 249, 12705, 9, 31, 57, 21, 4155, 12898, 19, 51, 2478, 56, 63, 21, 603, 5167, 9, 48, 569, 25, 1037, 19, 21, 2478, 15, 27, 10840, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL select: random order values from one table for each row in another === I have two tables in my database: **(1) PHRASES:** t_phrase ======== I like They prefer ... Somebody else wants and **(2) PLACES:** n_id t_place ==== ======= 1 London 2 Paris ... N New York Table `PHRASES` has at least as many rows as `PLACES`. I need to join these two tables in such a way as to select all `place`s with one `phrase` for each of them - but phrases need to be randomly distributed across places. The overall `places` table isn't too big: maybe, about 3-4 thousand rows, however there will be an additional `WHERE` clause on it that will limit the output to about 200 places at most. Ideally, I'd like this to be in one SQL statement, but so far I haven't been able to get my head around this. Therefore the second option is a stored function returning a row of `(int, varchar, varchar)`. For this, I was thinking of something along the lines of: 1. select all phrases in random order into an array of varchar) 2. loop over places taking one at a time and returning it along with the next phrase from the array Somehow this seems to me very inefficient, but I can't come up with anything better. Can you suggest any better idea? Or, even better, one statement SQL, maybe? Thanks in advance.
0
[ 2, 4444, 255, 5407, 45, 5477, 389, 4070, 37, 53, 859, 26, 206, 3131, 19, 226, 800, 3726, 3726, 31, 57, 81, 7484, 19, 51, 6018, 45, 13, 1409, 5, 165, 6, 18492, 45, 1409, 13, 38, 1, 13314, 870, 800, 3726, 3726, 3726, 3726, 3726,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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++ working with smart pointers === In my code, I have function prototype void AddBenchNode(ref_ptr<Group> root ,ref_ptr<Node> benches, bool setAttitude = false, float scale_x =.15, float scale_y =15, float scale_z = 15, int position_x = 250, int position_y = 100, int position_z =0 ); where ref_ptr is a smart pointer. In my main function, I define 2 smartpointers of type ref_ptr<Group> and ref_ptr<Node> and pass them to a call to my function, AddBenchNode. ref_ptr<Group> root = new Group(); ref_ptr<Node> benches = readNodeFile("Models/test.ive"); AddBenchNode(root, benches, true); When the call executes, nothing happens. As in no changes are made to the root pointer. What I want to know is if I am making this call correctly as I have it? Or do I have to re-define my function to take pointers to these smartpointers?
0
[ 2, 272, 20512, 638, 29, 3978, 454, 445, 800, 3726, 3726, 19, 51, 1797, 15, 31, 57, 1990, 7063, 11364, 3547, 26359, 251, 546, 5, 14057, 1, 4417, 139, 1, 8024, 1, 5900, 13, 15, 14057, 1, 4417, 139, 1, 251, 546, 1, 22905, 15, 160...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 IP address validation failed === Below is the code snippet where I have written the code to have the IP address masked and validate it using jQuery. But, I am getting error message for valid IP addresses (like 222.222.222.222). Can someone please help? //Validate the form $('#form').validate({ rules: { ip: { required: true, IP4Checker: true }, subnet: { required: true, IP4Checker: true }, gateway: { required: true, IP4Checker: true }, dns1: { required: true, IP4Checker: true }, dns2: { required: true, IP4Checker: true } }, messages: { ip: "Please enter a valid IP Address", subnet: "Please enter a valid Subnet Mask Address", gateway: "Please enter a valid Gateway Address", dns1: "Please enter a valid DNS1 Address", dns2: "Please enter a valid DNS2 Address" } }); //Validate the IP addresses $(function() { $.validator.addMethod('IP4Checker', function(value) { var ip = "^(?:(?:25[0-5]2[0-4][0-9][01]?[0-9][0-9]?)\\.){3}" + "(?:25[0-5]2[0-4][0-9][01]?[0-9][0-9]?)$"; return value.match(ip); }); }); //Set mask for IP address fields $(".ip").mask("999 . 999 . 999 . 999"); //Store numbers in hidden field $(".ip").blur(function () { //Create char array from phone number field var charArray = $(this).val().split(""); var num = ""; //taking the input $.each(charArray, function(index, value) { num = num + value; }); });
0
[ 2, 487, 8190, 93, 15735, 3218, 27999, 1702, 800, 3726, 3726, 1021, 25, 14, 1797, 13, 29061, 113, 31, 57, 642, 14, 1797, 20, 57, 14, 15735, 3218, 20354, 17, 7394, 1373, 32, 568, 487, 8190, 93, 9, 47, 15, 31, 589, 1017, 7019, 2802...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convert draw2d.Workflow to html canvas element === in documentation I read that a workflow has method getDocument() who returns a draw2d.CanvasDocument. A property of CanvasDocument is canvas object, but it is not the html canvas element obviously. There is a way to convert my workflow in html canvas? My goal is to convert workflow in static image, and a canvas element can be easily converted to static image. Thanks in advance.
0
[ 2, 8406, 2003, 135, 43, 9, 3783, 9990, 20, 13, 15895, 9696, 4520, 800, 3726, 3726, 19, 13945, 31, 1302, 30, 21, 170, 9990, 63, 2109, 164, 28132, 5, 6, 72, 4815, 21, 2003, 135, 43, 9, 1245, 8471, 28132, 9, 21, 1354, 16, 9696, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Query Transaction Started but never Ends === I run a query sometimes and it just hangs. I go look at processes in the Activity Monitor (SQL Server 2008 R2) and it shows it and just that the transaction is open and it hoses the entire server. This makes no sense, even if this was a long running query it should at some point time out one would assume. Any suggestions?
0
[ 2, 25597, 12799, 373, 47, 243, 3451, 800, 3726, 3726, 31, 485, 21, 25597, 1030, 17, 32, 114, 4546, 18, 9, 31, 162, 361, 35, 5102, 19, 14, 2358, 7626, 13, 5, 18, 22402, 8128, 570, 761, 135, 6, 17, 32, 1285, 32, 17, 114, 30, 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...
Validating forms using javascript only and preventing users from submitting JS disabled forms? === I am trying to create a validated registration form for my website and am currently coding up a demo of it for practice. I was able to validate the form using javascript. However, I read somewhere that forms should be validated both client and server side because JS can be disabled. I was wondering if there is a way to simply disable the submit button if all javascript validations aren't satisfied (I noticed that eBay uses a similar method with their registration forms) and if so, how would I go about doing accomplishing this? This is where I am at so far: <script type="text/javascript"> function validateEmail(email) { var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; if(re.test(email)) { document.getElementById('result').innerHTML = '<img src="http://iconlet.com/icons/kensaunders/4/CheckMark.png" style="width:15px;"/> Valid'; } else { document.getElementById('result').innerHTML = '<img src="http://biglistbigsales.com/m/templates/GPT/images/x_xMarkRed4.png" style="width:15px;"/> Invalid'; } } function validatePass(pass){ if(pass.length < 6){ document.getElementById('pass-result').innerHTML='<img src="http://biglistbigsales.com/m/templates/GPT/images/x_xMarkRed4.png" style="width:15px;"/>Your password must be at least 6 characters'; }else{ document.getElementById('pass-result').innerHTML='<img src="http://iconlet.com/icons/kensaunders/4/CheckMark.png" style="width:15px;"/>valid'; } } function validateCPass(cpass){ var pass = document.getElementById('pass').value; if(cpass != pass){ document.getElementById('cpass-result').innerHTML="Passwords must match"; }else{ document.getElementById('cpass-result').innerHTML='<img src="http://iconlet.com/icons/kensaunders/4/CheckMark.png" style="width:15px;"/>'; } } </script> </head> <body> <form action="practice.php" method="post"> e-mail:<br/><input id="email" type="text" onblur="validateEmail(this.value)" /><span id="result"></span> <br/><br/>Password:<br/><input type="password" id="pass" onblur="validatePass(this.value)"><span id="pass-result"> </span> <br/><br/>Confirm Password:<br/><input type="password" id="confpass" onblur="validateCPass(this.value)"> <span id="cpass-result"></span> <br/><input type="submit"> </form> </body>
0
[ 2, 7394, 1880, 1997, 568, 8247, 8741, 104, 17, 11520, 3878, 37, 28848, 487, 18, 10154, 1997, 60, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 7394, 1669, 8587, 505, 26, 51, 2271, 17, 589, 871, 13, 15458, 71, 21, 8376, 16, 32, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The quantization parameter QP in VLC codec === I just installed the codec vlc compilation mode. I documented the process of video compression and I found that video compression goes through several stages. The step of quantization step is the most impotent because this is when we decide the rate of compression. The quantization step manipulates a parameter called: The quantization parameter. I want to extract and learn which part of the code is implemented. Vlc code is in c + + I would be grateful to give me ideas on this problem. Thank you in advance. Toufik
2
[ 2, 14, 9836, 38, 1829, 18906, 2593, 306, 19, 566, 6109, 1797, 150, 800, 3726, 3726, 31, 114, 4066, 14, 1797, 150, 566, 6109, 4868, 3740, 9, 31, 8926, 14, 953, 16, 763, 14864, 17, 31, 216, 30, 763, 14864, 1852, 120, 238, 4891, 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...
Finding images within a PDF page === I'm creating a small app, in which I'd like to allow people to click on images within a PDF. Therefor, I need to find all the images on a PDF page, and get their X and Y coordinates, and height and width. I honestly don't know how to start, except parsing the pdf file byte by byte, and interpreting the pdf format, which I really would like to avoid. I'm using Cocoa, PDFkit and my app runs on OSX. I know, it's a very general question. I just need a hint in the right direction...
0
[ 2, 3007, 3502, 363, 21, 13, 11124, 2478, 800, 3726, 3726, 31, 22, 79, 2936, 21, 284, 4865, 15, 19, 56, 31, 22, 43, 101, 20, 1655, 148, 20, 10840, 27, 3502, 363, 21, 13, 11124, 9, 80, 1106, 15, 31, 376, 20, 477, 65, 14, 3502,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to avoid duplication of NuGet packages === Is there anyway to have a central location for local copies of various NuGet packages AND have different Visual Studio solution POINT at the single copy in the central location rather than copying the NuGet package(s) into each VS solutions \packages directory ? I know disk space is cheap, but having multiple copies of NUnit, EF, etc. just seems wasteful
0
[ 2, 184, 20, 2658, 1052, 20669, 16, 3152, 3060, 16875, 800, 3726, 3726, 25, 80, 2774, 20, 57, 21, 521, 1474, 26, 375, 3298, 16, 617, 3152, 3060, 16875, 17, 57, 421, 3458, 1120, 4295, 454, 35, 14, 345, 4344, 19, 14, 521, 1474, 864...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Format Date to iOS from DataContractJsonSerializer === I receive a date in the format below from a json file. Im not sure but i think its formatted by DataContractJsonSerializer Class in the .Net framework. The date looks like this \/Date(1255993200000+0100)\/ I was wondering if anyone would know how i would convert this into normal dates on iOS or if i have to do anything to change it. Thanks,
0
[ 2, 2595, 1231, 20, 13, 7760, 37, 1054, 23311, 728, 528, 4104, 2815, 11907, 800, 3726, 3726, 31, 2588, 21, 1231, 19, 14, 2595, 1021, 37, 21, 487, 528, 3893, 9, 797, 52, 562, 47, 31, 277, 82, 13, 29850, 34, 1054, 23311, 728, 528, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
onItemSelected() with nested switch... how to avoid it? === In my Android project, I prepare a dedicated class that listens to onClick(), onTouch() and onItemSelected() events (it's Controller of MVC) and the screen has several Spinner objects. In this case, I have to know, when an event is fired, 1) which Spinner is selected? and 2) which item is selected? and it results in having nested switch. The sample posted below already gave me a headache. I'll definitely love to know if there is some ways (using OOP, maybe) to avoid this mess. @Override public void onItemSelected(AdapterView<?> parent, View v, int position, long id) { switch(parent.getId()) { case R.id.spn1: switch (position) { case 0: // code break; case 1: // code break; case 2: // code break; } break; case R.id.spn2: switch (position) { case 0: // code break; case 1: // code break; case 2: // code break; } break; case R.id.spn3: switch (position) { case 0: // code break; case 1: // code break; case 2: // code break; } break; default: } }
0
[ 2, 27, 2119, 79, 18, 7138, 5, 6, 29, 5618, 69, 5521, 9, 9, 9, 184, 20, 2658, 32, 60, 800, 3726, 3726, 19, 51, 13005, 669, 15, 31, 5723, 21, 2360, 718, 30, 3834, 18, 20, 27, 150, 10129, 5, 6, 15, 27, 15725, 5, 6, 17, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TFS - Generate a Report for Hierarchical Work Items === I have a hierarchical work items linked to gather as follows: Parent-1 Child-1 sub-child-1 sub-child-2 Child-2 sub-child-3 Parent-2 Child-3 sub-child-4 now based on the hierarchy above I need to create a report using SSRS to show the number of children and sub-children for each parent work item.
0
[ 2, 13, 11720, 18, 13, 8, 7920, 21, 1330, 26, 21376, 4272, 170, 3755, 800, 3726, 3726, 31, 57, 21, 21376, 4272, 170, 3755, 4727, 20, 7442, 28, 2415, 45, 4766, 8, 165, 850, 8, 165, 972, 8, 11287, 8, 165, 972, 8, 11287, 8, 135, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
I need to remove the added class in list if I am clicking again on same link === <ul class="allcategorymenu"> <li class="menuheading menulink"><h1>All Categories</h1></li> <li class="mobile menulink"><a href="#"><span>Mobile &amp; Accessories</span></a> <div class="submenu" style="display:none;"> <ul> <li><a href="1.html">All Jewelry</a></li> <li><a href="2.html">Diamond Jewelry</a></li> <li><a href="3.html">Silver Jewelry</a></li> <li><a href="#">Pearl Jewelry</a></li> <li><a href="#">Fashion Jewelry</a></li> <li><a href="#">Gemstone Jewelry</a></li> <li><a href="#">Spiritual Jewelry</a></li> </ul> </div> </li> <li class="mens menulink"><a href="#"><span>Men's Apparel</span></a> <div class="submenu" style="display:none;"> <ul> <li><a href="1.html">All Jewelry</a></li> <li><a href="2.html">Diamond Jewelry</a></li> <li><a href="3.html">Silver Jewelry</a></li> <li><a href="#">Pearl Jewelry</a></li> <li><a href="#">Fashion Jewelry</a></li> <li><a href="#">Gemstone Jewelry</a></li> <li><a href="#">Spiritual Jewelry</a></li> </ul> </div> </li> </ul>
1
[ 2, 31, 376, 20, 4681, 14, 905, 718, 19, 968, 100, 31, 589, 25590, 188, 27, 205, 3508, 800, 3726, 3726, 13, 1, 1287, 718, 3726, 7, 1233, 14375, 93, 755, 291, 7, 1, 13, 1, 1210, 718, 3726, 7, 755, 291, 1743, 68, 11379, 6258, 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...
unix redirect tail to file === I store data from a nc output in a file 24/7 hours. It is a datalogger of temperature. This file 'amroutput' will be over the time very big. (Every 10 seconds a line). For one app I will have the last entry in a file 'amr_last_output'. So I use: tail -f -n1 amroutput > amr_lastoutput. With '>' i will overwrite the file 'amr_lastoutput' everytime when tal make an output. On mac osx the output of tail to the output file is appended, as in '>>' command. What can I do? Thanks for answers!
0
[ 2, 22540, 302, 14706, 3424, 20, 3893, 800, 3726, 3726, 31, 1718, 1054, 37, 21, 9276, 5196, 19, 21, 3893, 937, 118, 465, 974, 9, 32, 25, 21, 1054, 29480, 16, 3348, 9, 48, 3893, 13, 22, 765, 139, 1320, 4881, 22, 129, 44, 84, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to achieve ItemSelection and IsMouseOver effect in ItemsControl WPF? === I am using ItemsControl in my application, applied Itemtemplate and ItemPanelTemplate to it with Scrollviwere style. All is fine. Binding is working pretty fine but here the issue is i want to select an Item in ItemsControl i am not able to do so as we do in Listbox using IsSelected property in triggers. How can i achieve item Selection and IsMouseOver in ItemsControl similar to Listbox, is there any way, as i did not find any resource on net useful enough so thought to ask for some help here. Please help me its very urgent Thanks VJ
0
[ 2, 184, 20, 4689, 3755, 5033, 17, 25, 14002, 62, 2549, 1590, 19, 3755, 12898, 619, 7721, 60, 800, 3726, 3726, 31, 589, 568, 3755, 12898, 19, 51, 3010, 15, 2435, 9101, 9577, 6554, 17, 9101, 3206, 532, 9577, 6554, 20, 32, 29, 12159,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MVC OutputCache based on Session values === Is it possible to vary the output cache in MVC based on certain values in the session? I've read a lot about using the varybycustom functionality and overriding GetVaryByCustomString in Global.asax but the session is not available at this point. public override string GetVaryByCustomString(HttpContext context, string custom) { if (custom == "somekey") //Want to check the session here (but it isn't available). return base.GetVaryByCustomString(context, custom); } I understand this is because the Session isn't created until later in the request pipeline. My concern is that without varying the cache based on the user's session, the page (which changes based on what the user has in the session, has additional HTML specific to that user etc) will get cached (as the URL is the same) and served by our load balancer, proxy servers etc. and then served to other requests with other people's session information on the page! The reason the URL is the same is that the user comes in as a 'guest', enters some information (POST), this is validated and stored in the session and then they are re-directed back to the same page (which should now be specific to the user based on the session data). The page itself should be cached normally because if a 'guest' visits the same URL, it should serve the same 'standard' page every time. Is is possible to vary the caching in this way?
0
[ 2, 307, 8990, 5196, 793, 2569, 432, 27, 3723, 4070, 800, 3726, 3726, 25, 32, 938, 20, 7392, 14, 5196, 16522, 19, 307, 8990, 432, 27, 1200, 4070, 19, 14, 3723, 60, 31, 22, 195, 1302, 21, 865, 88, 568, 14, 7392, 779, 4636, 6015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Use LINQ to SQL generated classes in RDLC report === I'm working now for a long while on anapplication. Now that most forms and logic is implemented, it is time to add reporting. The application uses many different assemblies. One is specific for database access and contains all the LINQ to SQL tables,views and stored procedures. In another assembly that will be used solely for reporting, I want to use those classes. When I create the report and datsource, you can use objects and select one of those classes. This generate a datasource with some XML. When i run the report i get no result. Is there still custom code needed to get results? Thanks in advance, Joeri
1
[ 2, 275, 6294, 1251, 20, 4444, 255, 6756, 2684, 19, 13, 897, 6109, 1330, 800, 3726, 3726, 31, 22, 79, 638, 130, 26, 21, 175, 133, 27, 40, 2552, 20669, 9, 130, 30, 127, 1997, 17, 7085, 25, 6807, 15, 32, 25, 85, 20, 3547, 6670, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add data from Gridveiw which is on RADWindow to a GridView which is on Main Page === In a RadGrid which is in **RADWindow** Suppose i have 3 coulmns 1st-CheckBox 2nd-UserID 3rd-UserName and a button as Add so whenever user check the checkBox in this gvSearchUser(which is in radWindow), the respective Username should to be displayed on the other grid "gvAddedUser" in the main page. Time span for me to complete this task was short so couldnt study from scratch :( So if u hv some links or code respective to this problem will be very helpful for me. Thanks.
0
[ 2, 184, 20, 3547, 1054, 37, 7354, 195, 49, 499, 56, 25, 27, 4944, 27508, 20, 21, 7354, 4725, 56, 25, 27, 407, 2478, 800, 3726, 3726, 19, 21, 4944, 16375, 56, 25, 19, 13, 1409, 8278, 27508, 1409, 5787, 31, 57, 203, 19595, 79, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
YII CJUIdatepicker Not Working With RenderPartial View === I don't know whether this is question is asked before or not but i Strucked in this code. I have used Twitter Bootstrap Modal to show Pop Up. Now in my pop up window I have included following code (in View) <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'name'=>'publishDate', 'options'=>array( 'showAnim'=>'fold', ), 'htmlOptions'=>array( 'style'=>'height:20px;' ), )); ?> Now the problem is I have called this modal from Controller as $this->renderPartial('addLaunch', array('model' => $model), false, true); This date picker is not working Modal but working if I Added in Main layout.
0
[ 2, 7679, 49, 23396, 5661, 8209, 16855, 106, 52, 638, 29, 16535, 3091, 2815, 1418, 800, 3726, 3726, 31, 221, 22, 38, 143, 1472, 48, 25, 1301, 25, 411, 115, 54, 52, 47, 31, 3395, 69, 19, 48, 1797, 9, 31, 57, 147, 10623, 5894, 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...
Regular expression to match whole words === I am trying use a regular expression in JavaScript to match instances of the word 'icon-' in a string and return the entire attached word up to the delimiter (space). An example of the string would be ui-grid-ico-sort icon icon-up ui-icon-asc icon-user ui-icon ui-icon-triangle-1-n ui-sort-ltr In this case I am trying to match only 'icon-up' and 'icon-user'. So far I have tried \bicon- which appears to match every instance of icon- regardless of its placement in a word (4 matches) and \bicon-[^'"]+ which returns 1 match of everything after the first instance of icon-
0
[ 2, 1290, 1803, 20, 730, 979, 715, 800, 3726, 3726, 31, 589, 749, 275, 21, 1290, 1803, 19, 8247, 8741, 20, 730, 13946, 16, 14, 833, 13, 22, 49, 1126, 8, 22, 19, 21, 3724, 17, 788, 14, 1078, 3638, 833, 71, 20, 14, 121, 20565, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 combine two images into one in silverlight? === I have two images. I want to combine these two image files into one through code in silverlight. Image img1, img2, img3; how to combine img1 and img2 in img3 in silverlight?
1
[ 2, 184, 20, 12287, 81, 3502, 77, 53, 19, 1172, 3130, 60, 800, 3726, 3726, 31, 57, 81, 3502, 9, 31, 259, 20, 12287, 158, 81, 1961, 6488, 77, 53, 120, 1797, 19, 1172, 3130, 9, 1961, 797, 263, 165, 15, 797, 263, 135, 15, 797, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
font-family: inherit not working for IE === i have css class and i have used an attribute: font-family: inherit; but it is not working for IE. its working fine for mozilla. can anyone suggest me an workaround?
0
[ 2, 9978, 8, 13819, 45, 17569, 52, 638, 26, 13, 660, 800, 3726, 3726, 31, 57, 272, 18, 18, 718, 17, 31, 57, 147, 40, 35, 14755, 45, 9978, 8, 13819, 45, 17569, 73, 47, 32, 25, 52, 638, 26, 13, 660, 9, 82, 638, 1123, 26, 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, 0, 0, 0, 0...
Websphere MQ access to SSL certificate when running inside IIS7 as DefaultAppPool? === I have a csharp webservice which is running under IIS 7.5 on Windows Server 2008 R2 using the DefaultAppPool user as the application identity (IIS APPPOOL\DefaultAppPool). The webservice uses IBM Websphere MQ (7.0.1.2) to do it's stuff and uses the SSL certificates stored in a key.kdb setup via IBMs KeyMan utility. Normally (for csharp apps that are not running IIS) I need to label the personal certificate within the kdb so that it's name matches the user that is running the app i.e. the certificate would be labelled as ibmwebspheremqbs6mjb (see http://www-01.ibm.com/support/docview.wss?uid=swg21245474) and this allows the app to successfully access the SSL certificates within the key.kdb. But..... when running as a webservice and naming the certificate ibmwebspheremqdefaultapppool the application cannot access the SSL certs. If I change the AppPool identity to be bs6mjb then everything works (I'm not allowed to run the app pool as bs6mjb). I'd prefer not to setup a default certificate as mentioned in the link above, does anyone know what the certificate should be labelled as to work with DefaultAppPool?
0
[ 2, 2741, 14079, 307, 1251, 1381, 20, 13, 18, 18, 255, 6259, 76, 946, 572, 595, 18, 465, 28, 12838, 7753, 13378, 60, 800, 3726, 3726, 31, 57, 21, 272, 23646, 2741, 11449, 56, 25, 946, 131, 595, 18, 453, 9, 264, 27, 1936, 8128, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Call a function dynamically in jquery from an object === var animations = { slide : {enter:'slideDown('+settings.speed+')', exit:'slideUp('+settings.speed+')'}, fade : {enter:'fadeIn('+settings.speed+')', exit:'fadeOut('+settings.speed+')'} }; I currently have a literal object which has enter and exit animations defined within. Would it be possible to call these dynamically and how? Basically, i am trying to find a way to dynamically call functions whilst keeping the code as small as possible.
0
[ 2, 645, 21, 1990, 7782, 1326, 19, 487, 8190, 93, 37, 40, 3095, 800, 3726, 3726, 4033, 6236, 18, 800, 13, 1, 6464, 13, 45, 13, 1, 13679, 45, 22, 18, 1210, 546, 2968, 5, 22, 2430, 19831, 18, 9, 6708, 2430, 22, 6, 22, 15, 4350,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
box2d raycast backward compatibility issue === I recently upgraded the version of box2d to v2.2.1 in a long-running project, and it caused a number of backward-compatibility issues with existing project code. Most were resolved, except for this one b2Fixture *f = body->GetFixtureList(); b2RayCastOutput output; b2RayCastInput input; f->RayCast(&output, input) // broken call is now broken, expecting a 3rd argument. I see in the box2d source code that the function signature is inline bool b2Fixture::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, int32 childIndex) const; but I can't find any examples of what `childIndex` is supposed to be. Can someone provide an example of how to use this updated RayCast function?
0
[ 2, 1649, 135, 43, 2375, 6146, 8540, 13, 21618, 1513, 800, 3726, 3726, 31, 1989, 9958, 14, 615, 16, 1649, 135, 43, 20, 566, 135, 9, 135, 9, 165, 19, 21, 175, 8, 11325, 669, 15, 17, 32, 1497, 21, 234, 16, 8540, 8, 21618, 1549, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Registering "HP SmartMenu" as hotkey? === I have an HP Pavilion dv6, which has some useless keys on the keyboard. So I decided to give them some meaning by registering them as global hotkeys. So far I succeeded with the launch mail, webbrowser and calculator keys, but the "HP SmartMenu" key just won't work as expected. Pressing the key while my app has focus gives two keypress events, with keycodes 255 and 7. Registering 255 works, but printscreen also triggers it, which I don't want. Registering 7 also works but a bunch of other keys trigger that too, f.e. volume up/down. If I register both, I never get keycode 7 for some reason. Any ideas how to get it to work? (I use RegisterHotkey() and PeekMessageW() functions. Also, I think my problem is language-independent, but I use VB 2010.)
0
[ 2, 2243, 68, 13, 7, 12491, 3978, 755, 291, 7, 28, 1047, 4237, 60, 800, 3726, 3726, 31, 57, 40, 5301, 9593, 13, 17905, 379, 15, 56, 63, 109, 12858, 5534, 27, 14, 8896, 9, 86, 31, 868, 20, 590, 105, 109, 1813, 34, 2243, 68, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use openSSL with VisualStudio === I am trying to port my C code console application which runs perfect on linux/mac with openssl. The port is for the visual studio 2010. Can anyone point to a sample or help me how to link OpenSSL libs in a VS program. Thanks !
0
[ 2, 184, 20, 275, 8965, 18, 255, 29, 3458, 21026, 800, 3726, 3726, 31, 589, 749, 20, 1295, 51, 272, 1797, 8650, 3010, 56, 1461, 2107, 27, 13024, 118, 6893, 29, 8965, 18, 255, 9, 14, 1295, 25, 26, 14, 3458, 1120, 498, 9, 92, 127...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ToolStripMenuItem_Click(object sender, EventArgs e) - casting back to a DataGridView === I have a **WINFORM** app with a **DataGridView** control , hooked into a **ContextMenuStrip** control. The **ContextMenuStrip** fires events to essentially perform copy / paste between the **DataGridView** and the **Clipboard**. private void copyToolStripMenuItem_Click(object sender, EventArgs e) { CopyClipboard(); } private void CopyClipboard() { DataObject d = myGrid.GetClipboardContent(); Clipboard.SetDataObject(d); } private void pasteCtrlVToolStripMenuItem_Click(object sender, EventArgs e) { PasteClipboard(); } I've added another **DataGridView** to my application and wish to share **ContextMenuStrip** between them since, per my code above, it's hardcoded to my grid, **myGrid**. I believed it would simply be an easy exercise to modify my code to cast a new **DataGridView** control from the **sender**: private void copyToolStripMenuItem_Click(object sender, EventArgs e) { CopyClipboard(sender); } private void CopyClipboard(object sender) { var grid = (DataGridView)sender; DataObject d = grid.GetClipboardContent(); Clipboard.SetDataObject(d); } private void pasteCtrlVToolStripMenuItem_Click(object sender, EventArgs e) { var grid = (DataGridView)sender; PasteClipboard(grid); } but of course, I found that the **sender** was instead the **ToolStripMenuItem**. Is there a way to reference the original **DataViewGrid** via the **sender**, or **EventArgs e** ? And, thank you for reading :)
0
[ 2, 4672, 17851, 755, 11193, 1503, 1, 150, 10129, 5, 23793, 2660, 106, 15, 807, 10663, 18, 13, 62, 6, 13, 8, 9087, 97, 20, 21, 1054, 16375, 4725, 800, 3726, 3726, 31, 57, 21, 13, 1409, 4181, 4190, 1409, 4865, 29, 21, 13, 1409, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails 2 - no route matches for link_to method === This is for a Rails 2 app that I'm working on because the person who would normally work on it is on vacation. I know some ruby and almost nothing about rails. I've looked through other posts on this site but nothing is the silver bullet I need. I have this route set up in route.rb (I've pulled it out of the block its in just to highlight it here).: admin.resources :content_bundle_profiles, :member => { :publish => :put, :remove_from_sale => :put }, :collection => { :attach_bundles => :put, :search => :get } do |cbp| cbp.resources :description_book_icon_for_bundles, :controller =>'content_bundle_profiles/description_book_icon_for_bundles' end Which is part of this: map.namespace :admin do |admin| admin.root :controller => "content_bundle_profiles" admin.resources :content_bundle_profiles, :member => { :publish => :put, :remove_from_sale => :put }, :collection => { :attach_bundles => :put, :search => :get } do |cbp| cbp.resources :description_book_icon_for_bundles, :controller =>'content_bundle_profiles/description_book_icon_for_bundles' end admin.resources :tag_groups, :only => [:index, :edit, :create, :update, :update_all, :destroy], :collection => { :update_all => :put } do |tg| tg.resources :tags, :controller => 'tag_groups/tags' end admin.resources :content_bundle_versions, :only => [:new, :create] admin.resources :transaction_receipts, :only => [:index] admin.resources :transaction_stats, :only => [:index] admin.resources :content_type_mappings, :only => [:index, :new, :create] admin.resources :upgrades, :only => [:index, :new, :create], :collection => { :toggle_upgrade_path_available => :put } end When I output the routing info in the ruby console I get this: GET /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"index"} POST /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"create"} GET /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles/new(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"new"} GET /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles/:id/edit(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"edit"} GET /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles/:id(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"show"} PUT /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles/:id(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"update"} DELETE /admin/content_bundle_profiles/:content_bundle_profile_id/description_book_icon_for_bundles/:id(.:format)? {:controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles", :action=>"destroy"} Which looks correct to me. When I try to 'link_to' a new description_book_icon_for_bundles, I get the following error: No route matches {:action=>"new", :controller=>"admin/content_bundle_profiles/description_book_icon_for_bundles"} Or undefined method `new_admin_content_bundle_profiles_description_book_icon_for_bundles_path' for #<ActionView::Base:0x10cf35518> Depending on how I set up the 'link_to' options. The first way is <%= link_to 'Add description, book, and icon to content bundle profile', :controller => "admin/content_bundle_profiles/description_book_icon_for_bundles", :action => "new" %> The second way is <%= link_to 'Add description, book, and icon to content bundle profile', new_admin_content_bundle_profiles_description_book_icon_for_bundles_path(@content_bundle_profile) %> I've tried various permutations of the controller path just to see if something needed to be added or not, like a beginning / or new in a different place. Some other controller paths I've tried have been: admin/content_bundle_profiles/description_book_icon_for_bundle admin/content_bundle_profile/description_book_icon_for_bundles admin/content_bundle_profile/description_book_icon_for_bundle /admin/content_bundle_profiles/description_book_icon_for_bundles content_bundle_profiles/description_book_icon_for_bundles I've done similiar trials with the second way of using link_to with no luck. Some of those have been these: admin_content_bundle_profiles_description_book_icon_for_bundles_new_path(@content_bundle_profile), :method => :get admin_content_bundle_profiles_description_book_icon_for_bundle_new_path(@content_bundle_profile) new_admin_content_bundle_profiles_description_book_icon_for_bundle_path(@content_bundle_profile) new_admin_content_bundle_profiles_description_book_icon_for_bundles_path(@content_bundle_profile) The new method for the Admin::ContentBundleProfilesController is: def new @content_bundle_profile = ContentBundleProfile.new end The new method for Admin::ContentBundleProfiles::DescriptionBookIconForBundlesController is: def new @content_bundle_profile = ContentBundleProfile.find(params[:content_bundle_profile_id]) @description_book_icon_for_bundle = @content_bundle_profile.description_book_icon_for_bundle.build end I've seen both ways on the net and either should work (I think). I'm wondering if something else needs to be set up or if I've missed something. Thanks!
0
[ 2, 2240, 18, 172, 13, 8, 90, 858, 1717, 26, 3508, 1, 262, 2109, 800, 3726, 3726, 48, 25, 26, 21, 2240, 18, 172, 4865, 30, 31, 22, 79, 638, 27, 185, 14, 840, 72, 83, 4147, 170, 27, 32, 25, 27, 10057, 9, 31, 143, 109, 10811,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use sql math function in dql (symfony2) === I'm using this: $query = $em->createQuery('select cp from Temp\TempAppBundle\Entity\ClinicProfile cp INNER JOIN cp.users u left JOIN cp.specializations s where cp.latitude is not null and cp.city = ?1 order by (sqrt(pow((radians(cp.longitude) - radians(?2))*cos(radians(cp.latitude)+radians(?3)), 2) + pow((radians(cp.latitude) - radians(?4)), 2))*6367)'); But I'm getting error [Syntax Error] line 0, col 172: Error: Expected end of string, got 'sqrt' How do i use sql functions in dql?
0
[ 2, 184, 20, 275, 4444, 255, 5057, 1990, 19, 13, 43, 22402, 13, 5, 7261, 10229, 93, 135, 6, 800, 3726, 3726, 31, 22, 79, 568, 48, 45, 5579, 8190, 93, 800, 5579, 1503, 8, 1, 6037, 1373, 8190, 93, 5, 22, 18, 16964, 9750, 37, 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...
Elastic Search Hyphen issue with term filter === I have the following Elastic Search query with only a term filter. My query is much more complex but I am just trying to show the issue here. { "filter": { "term": { "field": "update-time" } } } When I pass in a hyphenated value to the filter, I get zero results back. But if I try without an unhyphenated value I get results back. I am not sure if the hyphen is an issue here but my scenario makes me believe so. Is there a way to escape the hyphen so the filter would return results? I have tried escaping the hyphen with a back slash which I read from the Lucene forums but that didn't help. Also, if I pass in a GUID value into this field which is hyphenated and surrounded by curly braces, something like - {ASD23-34SD-DFE1-42FWW}, would I need to lower case the alphabet characters and would I need to escape the curly braces too? Thanks
0
[ 2, 931, 9428, 2122, 4085, 16012, 1513, 29, 981, 11945, 800, 3726, 3726, 31, 57, 14, 249, 931, 9428, 2122, 25597, 29, 104, 21, 981, 11945, 9, 51, 25597, 25, 212, 91, 1502, 47, 31, 589, 114, 749, 20, 298, 14, 1513, 235, 9, 13, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Connect to Magento from a localhost === Beside setting up a custom Magento API, is there a way to connect from a localhost webapp to Magento? More specifically, I'm looking for a setup that will allow me to write codes like $products = Mage::getModel('catalog/category')->load($category_id) in a webapp running on localhost in our office. If this is not plausible, do I need to connect to the Magento store DB directly from my application and basically write my own queries? I would certainly create a new user with read-only access for the DB, if this was the case.
0
[ 2, 6379, 20, 4723, 17050, 37, 21, 375, 11694, 800, 3726, 3726, 2113, 2697, 71, 21, 5816, 4723, 17050, 21, 2159, 15, 25, 80, 21, 161, 20, 6379, 37, 21, 375, 11694, 2741, 7753, 20, 4723, 17050, 60, 91, 3524, 15, 31, 22, 79, 699, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 findContours allways finds two contours for every object === i just wrote a little programm which searches for contours in a color thresholded binary image which is processed with canny after thresholding, but somehow it allways finds two contours for every object in the image. The following picture shows my programm with the input image, thresholded and edge image, and the image where the found contours are drawn. http://img62.imageshack.us/img62/7935/doubleframe1.png In the bottom right image where the found contours are drawn, you can see that the biggest contour is drawn two times with a little offset between the two contours. The next image shows a detailed view of this image. http://img831.imageshack.us/img831/3641/doubleframe2.png Here just the biggest contour is drawn two times, but it happens randomly for every other one of the contours. I just want one contours for every object, how can i achieve that? :/
0
[ 2, 368, 12732, 477, 1126, 11648, 18, 65, 11000, 3797, 81, 23272, 18, 26, 352, 3095, 800, 3726, 3726, 31, 114, 738, 21, 265, 625, 79, 56, 19994, 26, 23272, 18, 19, 21, 1665, 11361, 69, 14171, 1961, 56, 25, 16697, 29, 92, 1536, 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...
Avoid Null value exception in LINQ === i'm tryong to filter a DataTable using LINQ DataTable DT=new DataTable(); DT = PinDicDAO.GetContractPOVD().AsEnumerable().Where(r => (r.Field<string>("ContractPOReference").ToUpper().Contains(text.ToUpper())) || (r.Field<string>("ContractPO").ToUpper().Contains(text.ToUpper())) || (r.Field<string>("ContractPOTitle").ToUpper().Contains(text.ToUpper())) || (r.Field<string>("Address").ToUpper().Contains(text.ToUpper())) ).AsDataView().ToTable(); query works fine.but when some fields have NULL values it gives a Exception. "Object Reference Not set to an instance of object" how can i avoid this exception?
0
[ 2, 2658, 16203, 1923, 5391, 19, 6294, 1251, 800, 3726, 3726, 31, 22, 79, 1131, 3279, 20, 11945, 21, 1054, 5924, 568, 6294, 1251, 1054, 5924, 13, 43, 38, 3726, 2681, 1054, 5924, 5, 6, 73, 13, 43, 38, 800, 3459, 4673, 17104, 9, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
One ScrollViewer for two ListBox === I've got 2 listbox and one scrollviewer and I want the scrollviewer to scroll the two listbox together. But i don't know how to do.. Here's my xaml : <ScrollViewer Grid.Row="1"> <Grid> <ListBox Name="listboxRSSFeedItems" Width="240" Height="644" Margin="0,0,240,0"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock TextWrapping="Wrap" Text="{Binding Title}" Grid.Row="0" FontSize="24" HorizontalAlignment="Left" /> <HyperlinkButton Content="Link to details" NavigateUri="{Binding Link}" HorizontalAlignment="Left" Grid.Row="1" Margin="0,0,0,30" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <ListBox Name="listboxRSSFeedItems2" Width="240" Height="644" Margin="240,0,0,0"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock TextWrapping="Wrap" Text="{Binding Title}" Grid.Row="0" FontSize="24" HorizontalAlignment="Left" /> <HyperlinkButton Content="Link to details" NavigateUri="{Binding Link}" HorizontalAlignment="Left" Grid.Row="1" Margin="0,0,0,30" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </ScrollViewer> Thanks a lot
0
[ 2, 53, 12159, 4725, 106, 26, 81, 968, 5309, 800, 3726, 3726, 31, 22, 195, 330, 172, 968, 5309, 17, 53, 12159, 4725, 106, 17, 31, 259, 14, 12159, 4725, 106, 20, 12159, 14, 81, 968, 5309, 429, 9, 47, 31, 221, 22, 38, 143, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In Tibco BusinessWorks Designer, how do one catch "record not found" when using database query? === I'm quite a newbie to Tibco BubinessWorks and sql database, but somehow I have to use Tibco to host a simple web service to query a local database. What I want to achieve is quite simple, my process in Tibco Designer will have a activity to query the database to find customername with input customerid. But in the case that no customer was found with specific input customerid, I would like to generate an error. And I've tried to use a "success with condition" to link my database query activity with generate error activity, but I don't know to set the xpath. The other question is, in the case that no customername of input id is found, does the database return me an null or an empty string? If it's a null, for the xpath, is there anything like: if(customername = null)? Thanks!!!
0
[ 2, 19, 4174, 220, 716, 508, 7684, 4742, 15, 184, 107, 53, 2949, 13, 7, 14953, 52, 216, 7, 76, 568, 6018, 25597, 60, 800, 3726, 3726, 31, 22, 79, 1450, 21, 78, 5893, 20, 4174, 220, 716, 334, 12439, 720, 7684, 17, 4444, 255, 601...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Escaping dots in groff === According to `info groff` (section 5.11 Character Translations), `\.` should print just the dot. However, this is not what seems to happen. If I render this manpage .TH x x x x \.SH foo I get `foo` rendered as a section heading, and `.SH` is not printed. So, why does this happen, and how do I escape the dot (and the apostrophe) at the begginning of the line in groff?
0
[ 2, 14700, 17900, 19, 3452, 2460, 800, 3726, 3726, 496, 20, 13, 1, 108, 4120, 3452, 2460, 1, 13, 5, 10579, 331, 9, 1306, 925, 13610, 6, 15, 13, 1, 9, 1, 378, 4793, 114, 14, 14123, 9, 207, 15, 48, 25, 52, 98, 2206, 20, 2384, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Break from for each loop in xslt === I have to break from for-each loop if @PercentOfAmountActive is not equal to 0 or 100 this is my xml <SamplePointSet Id="1" StartDate="2012-01-01T04:00:00Z" CalendarId="1" Cyclic="6" ForAttribute="0" ObjectId="0" ProbabilityFunctionId="0" TableNumber="0" TimePeriodId="4" ParentId="1"> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="1" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="2" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="3" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="4" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="5" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="6" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="7" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="8" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="9" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="10" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="100" Sequence="11" SamplePointSetId="1" /> <SamplePoint NumberOfActiveTimePeriods="30" PercentOfAmountActive="0" Sequence="12" SamplePointSetId="1" /> </SamplePointSet> Below is xslt code <xsl:for-each select=".../CM:SamplePointSet/CM:SamplePoint"> <xsl:variable name="varActiveTimePeriod" select="./@NumberOfActiveTimePeriods * $varMultiple"/> <xsl:variable name="varPercentOfAmountActive" select="./@PercentOfAmountActive"/> Some Condition To break if (percent of amount active) not 0 or 100 <xsl:value-of select="CMXsltExtObject:SetRecurenceRule($varActiveTimePeriod, $varPercentOfAmountActive, $varCalendarFrequency)"/> </xsl:for-each> Is there any way to do it?
0
[ 2, 1442, 37, 26, 206, 5293, 19, 993, 18, 255, 38, 800, 3726, 3726, 31, 57, 20, 1442, 37, 26, 8, 14322, 5293, 100, 13, 1, 1432, 5089, 1041, 58, 9780, 7889, 25, 52, 2747, 20, 713, 54, 808, 48, 25, 51, 23504, 13, 1, 6101, 5106,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adapter: Display the image and listview using adapter where listview not necessary display every time === I am trying to display the image which i received from the server and under that i am display the listview which shows the comments related to the particular image.Now,it is not necessary that i am receiving the comments in every photos so in that i case i am also not able to able to display the image.So what i need to do is if there is no comments then image should also get displayed. So how do i achieve this?? Here is my Code. :: public class EfficientAdapter extends BaseAdapter { private LayoutInflater mInflater; public ImageLoader imageLoader; public EfficientAdapter(Context context) { mInflater = LayoutInflater.from(context); imageLoader=new ImageLoader(Elvis_Photo_DetailActivity.this.getApplicationContext()); } public int getCount() { return photoCommetns.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder=new ViewHolder(); if(position==0) { convertView = mInflater.inflate(R.layout.test, null); holder.friend_img= (ImageView) convertView.findViewById(R.id.imageView1); Log.d("Hurray","I am in Image Part"); holder.friend_img.setTag(friend_img_src); imageLoader.DisplayImage(friend_img_src, Elvis_Photo_DetailActivity.this, holder.friend_img ); return convertView; } else if(convertView==null || convertView.getTag()==null) { convertView = mInflater.inflate(R.layout.friend_photo_comments_listing, null); holder.scrollview=(ScrollView)convertView.findViewById(R.id.scrollview); holder.txt_comment = (TextView) convertView.findViewById(R.id.friends_comment_list); holder.friend_display_name = (TextView)convertView.findViewById(R.id.friend_photo_comment_username); holder.img_friend_profile_image = (ImageView)convertView.findViewById(R.id.img_friend_profile_image); Log.d("Hurray","I am in Comment Section"); holder.scrollview.setVerticalScrollBarEnabled(true); holder.scrollview.setHorizontalScrollBarEnabled(true); } else { holder = (ViewHolder)convertView.getTag(); } holder.img_friend_profile_image.setTag(photoCommetns.get(position).profile_image); imageLoader.DisplayImage(photoCommetns.get(position).profile_image, Elvis_Photo_DetailActivity.this, holder.img_friend_profile_image); holder.friend_display_name.setText(photoCommetns.get(position).username); holder.txt_comment.setText(photoCommetns.get(position).body); convertView.setTag(holder); eAdapater.notifyDataSetChanged(); return convertView; } } class ViewHolder { TextView txt_add_date,friend_display_name, txt_comment, txt_title,txt_description; ImageView user_profile_image,img_friend_profile_image,txt_test; ScrollView scrollview; } Hope my Question is clear. Plz help me .. m desparately need the answer so plz rply asap.. Thnx in advance...
0
[ 2, 9924, 106, 45, 3042, 14, 1961, 17, 968, 4725, 568, 9924, 106, 113, 968, 4725, 52, 2378, 3042, 352, 85, 800, 3726, 3726, 31, 589, 749, 20, 3042, 14, 1961, 56, 31, 420, 37, 14, 8128, 17, 131, 30, 31, 589, 3042, 14, 968, 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...
Listing the tables content in the database === written a script to print the contents of all the tables present in the database... but unfortunately i am going wrong somewhere. could anyone please tell me where is the mistake? $sql = "SHOW TABLES FROM $dbName"; $result = mysql_query($sql); if (!$result) { echo "DB Error, could not list tables\n"; echo 'MySQL Error: ' . mysql_error(); exit; } for ($i=1; $i<=5; $i++) { while ($row = mysql_fetch_row($result)) { echo "Table: {$row[0]}\n"; $sql_1 = "SELECT * FROM {$row[0]}"; $result_1 = mysql_query($sql_1); $row_1 = mysql_fetch_row($result); echo "$row_1"; } } mysql_free_result($result); ?> thanks..
0
[ 2, 9554, 14, 7484, 2331, 19, 14, 6018, 800, 3726, 3726, 642, 21, 3884, 20, 4793, 14, 8478, 16, 65, 14, 7484, 734, 19, 14, 6018, 9, 9, 9, 47, 6200, 31, 589, 228, 1389, 3493, 9, 110, 1276, 2247, 494, 55, 113, 25, 14, 5643, 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...
Load my local image like a map in c# include tile loading, zoom, define simple overlay objects like pins === I want to load my own map in an image formats (bmp or png or jpg or any picture format) to a winform. and it should has zoom feature and i want to show it on multiple screen (for example : extended monitor) The second part of my question is about put overlay objects (may be only a clickable image) like google maps pins. if any other infos are needed, ask for them in comments Tnx dear experts
0
[ 2, 6305, 51, 375, 1961, 101, 21, 2942, 19, 272, 5910, 468, 13, 9802, 12797, 15, 19469, 15, 9267, 1935, 84, 4414, 3916, 101, 18869, 800, 3726, 3726, 31, 259, 20, 6305, 51, 258, 2942, 19, 40, 1961, 13767, 13, 5, 220, 2554, 54, 351...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Request for cheatsheet with cedet keybindings === As in title , I have had one page cheatsheet with the most useful bindings for cedet/emacs but lost it (which I cannot google out back ) . Please don't refer me to tutorials cause they are too painful and too long to extract several useful commands .
0
[ 2, 3772, 26, 18585, 17627, 29, 13, 11014, 1198, 1246, 22260, 18, 800, 3726, 3726, 28, 19, 581, 13, 15, 31, 57, 41, 53, 2478, 18585, 17627, 29, 14, 127, 4811, 8728, 18, 26, 13, 11014, 1198, 118, 62, 6893, 18, 47, 529, 32, 13, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use id-aes256-GCM with Node.JS crypto? "TypeError: DecipherFinal fail" === I want to encrypt some data in Node.js using an authenticated encryption scheme like AES-GCM. If I run the following sample code app.get("/test", function(req,res) { var key = "12345678901234567890123456789012"; var iv = "123456789012"; var cipher = crypto.createCipheriv("id-aes256-GCM",key.toString("binary"),iv.toString("binary")); var decipher = crypto.createDecipheriv("id-aes256-GCM",key.toString("binary"),iv.toString("binary")); console.log(decipher.update(cipher.update("bla"))); console.log(decipher.update(cipher.final())); console.log(decipher.final()); }); I don't get a console output but the error message "TypeError: DecipherFinal fail". If I use cipher AES-256-CTR instead of "id-aes256-GCM", this code works fine and prints "bla" on the console. What am I doing wrong?
0
[ 2, 184, 20, 275, 4924, 8, 58, 160, 16910, 8, 10362, 79, 29, 15421, 9, 728, 18, 16277, 60, 13, 7, 4474, 29992, 45, 25277, 4932, 7476, 7, 800, 3726, 3726, 31, 259, 20, 1957, 11435, 109, 1054, 19, 15421, 9, 728, 18, 568, 40, 1435...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
nested divs with display:table style are not strech to 100% height in IE === it's my first post, I'm sorry for my English :). I have a responsive layout, which works perfectly in FireFox, Chrome and Opera but not in IE. It stretches vertically and horizontally in those 3 modern browsers but not in IE. It's based on display:table css technic. This my code: <div id="container"> <div id="header"> header header header header header </div> <div id="contentWraper"> <div id="content"> <div id="columnsWraper"> <div id="leftPanel">left panel <br /> left panel <br /> left</div> <div id="rightPanel">right panel</div> </div> </div> </div> <div id="footer">footer</div> </div> CSS: html, body { height: 100%; background: gray; margin: 0; padding: 0; } #container { display: table; height: 100%; width: 100%;} #header { height: 0%; display: table-row;} #contentWraper {height: 100%; background: lightgray; display: table-row;} #content {height: 100%; background: lightgray; display: table; width: 100%;} #columnsWraper {height: 100%; display: table-row;} #footer { height: 0%; display: table-row;} #leftPanel { background: wheat; width: 100px; display: table-cell; } #rightPanel { background:yellowgreen; display: table-cell; } [http://jsfiddle.net/wftHq/6/][1] It works also in IE until I use nested divs with "display:table" style. I had to use it, otherwise "header" was only 100px wide (the width of "leftPanel"). Only in IE "leftPanel" and "rightPanel" doesn't fill the 100% height. Is there a way to fix it in IE ? Does anyone know how to change my code to work in IE. I'm trying to avoid using javaScript. Thanks for any help. [1]: http://jsfiddle.net/wftHq/6/
0
[ 2, 5618, 69, 13, 12916, 18, 29, 3042, 45, 5924, 1034, 50, 52, 12555, 673, 20, 12849, 2947, 19, 13, 660, 800, 3726, 3726, 32, 22, 18, 51, 64, 678, 15, 31, 22, 79, 1875, 26, 51, 486, 13, 45, 6, 9, 31, 57, 21, 13, 22153, 9106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Converting WAV Files to High Quality MP3 Using the Terminal in Linux === I converted some WAV files using the Terminal of Linux using LAME but the quality of the sound of the resulting MP3 files is very poor (the quality of the resulting mp3 files is less than the intial wav files), I changed the output quality that LAME has by default to a higher one but the results aren't good either. I'm searching for other alternatives besides this, the only requisite is that this convertion should be done using the terminal of Linux and the quality of the resulting files should be preserved if not improved. Any help will be welcome. Thanks!
0
[ 2, 19583, 3142, 710, 6488, 20, 183, 2190, 4628, 240, 568, 14, 3855, 19, 13024, 800, 3726, 3726, 31, 3494, 109, 3142, 710, 6488, 568, 14, 3855, 16, 13024, 568, 17182, 47, 14, 2190, 16, 14, 646, 16, 14, 2927, 4628, 240, 6488, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Programmig a "Lean left and Lean right" - Gesture in Kinect === i'm programming an game in unity 3d, where i am mapping the kinect skeleton on a 3d model. Now i have to check, if the player is leaning left or right... and here is my problem. I've followed this site: http://blogs.msdn.com/b/mcsuksoldev/archive/2011/08/08/writing-a-gesture-service-with-the-kinect-for-windows-sdk.aspx And now, i'm looking for a correct implementation of the lean-geasture. Does anyone of you have an idea, how i can solve this problem? I have to make this gesture in some parts, so i can recognize a leaning. I've tried something like: if left shoulder.x < hips_left.x or left.shoulder.x > hips_left.x but that doesnt work so good... i really need your help :)
0
[ 2, 625, 10183, 21, 13, 7, 413, 210, 225, 17, 6349, 193, 7, 13, 8, 7222, 19, 6399, 11557, 800, 3726, 3726, 31, 22, 79, 3143, 40, 250, 19, 8385, 203, 43, 15, 113, 31, 589, 13305, 14, 6399, 11557, 11714, 27, 21, 203, 43, 1061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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++ adding subclass to array of base class? === i have a class book and 2 subclass lerningbook,readingbook and i am trying to create a list of books book* listofbooks and add to it the subclass Book* listOfBooks; void Mang::addBookToList(Book b3) { Book* temp; temp=listOfBooks; lobsize++; listOfBooks=new Book[lobsize]; int i; for(;i<lobsize;i++) { listOfBooks[i]=temp[i]; } listOfBooks[i]=b3; } problem is when i am trying to send it the subclass this not accpecting it i tryed to use template so the function will be able to take any class but it didnt help <br>the error am geting is:<br> **no suitable user defined conversion from lerningbook to book exsists**<br> guessing i need to implement same type of function that will allow me to do this but i dont know wich one hope one of you can help me out thx in adv :) <br> (i know i am missing the delete[] on the temp array sort of got stuck on this problem)
0
[ 2, 272, 20512, 4721, 972, 1898, 20, 7718, 16, 1000, 718, 60, 800, 3726, 3726, 31, 57, 21, 718, 360, 17, 172, 972, 1898, 13, 1252, 2981, 5199, 15, 22883, 5199, 17, 31, 589, 749, 20, 1600, 21, 968, 16, 964, 360, 2483, 968, 1041, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Do Portable Class Libraries Targeted at .NET for Metro Also Run on WIN RT? === I have found a few articles on this topic, but I can't seem to glean whether or not a PCL targeted at Windows 8(Metro) and .NET 4.5 would run in WinRT. My guess would be no, but does anyone else have an idea? Sources: http://www.hanselman.com/blog/HiddenGemsInVisualStudio11BetaNETPortableClassLibraries.aspx http://msdn.microsoft.com/en-us/library/gg597391(v=vs.110).aspx
0
[ 2, 107, 13469, 718, 8649, 9536, 35, 13, 9, 2328, 26, 3986, 67, 485, 27, 628, 13, 5256, 60, 800, 3726, 3726, 31, 57, 216, 21, 310, 3376, 27, 48, 8303, 15, 47, 31, 92, 22, 38, 2260, 20, 29544, 1472, 54, 52, 21, 5168, 255, 9536...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 uploading files === I have problem with uploading files. Here is my form: <form enctype="multipart/form-data" action="transact.php" method="POST"> <table> <tr> <td>Nadpis:</td> <td><input type="text" id="title" name="title" value="<?php echo htmlspecialchars($title); ?>" /></td></tr> <tr> <td>Text článku:</td> <td><textarea id="text" name="text" cols="55" rows="20"><?php if(!empty($a_text)) { echo htmlspecialchars($a_text); } ?></textarea></td> </tr><tr> <td>Obrázok k článku:</td> <td><input type="file" name="uploadfile" /></td></tr> <tr><td> </td> <td> <?php if ($_SESSION['access_level'] < 2) { echo '<input type="hidden" name="user_id" value="'. $user_id. '"/>'; } if(empty($article_id)) { echo '<input type="submit" name="action" value="Odoslat" />'; } else { echo '<input type="hidden" name="article_id" value="' .$article_id. '"/>'; echo '<input type="submit" name="action" value="Ulozit" />'; } ?> </td> </tr> </table> </form> when I run script transact.php I get error: <b>Notice: Undefined index: uploadfile in E:\xampp\htdocs\capitals\transact.php on line 138</b> and when I type print_r($_FILES) i get just <b>Array()</b> value of max upload size in php.ini file is set to 128 MB my transact script: case 'Odoslat': session_start(); $text = (isset($_POST['text']))? $_POST['text']: ''; $nadpis = (isset($_POST['title']))? $_POST['title']: ''; $image = (isset($_FILES['uploadfile']))? imagecreatefromjpeg($_FILES['uploadfile']['tmp_name']): ''; print_r($_FILES); // it writes Array() if(isset($_SESSION['id']) && !empty($nadpis) && !empty($text) && $_FILES['uploadfile']['error'] == UPLOAD_ERR_OK) //here it indicates error { $ext = '.jpg'; $query = 'INSERT INTO articles (article_id, user_id, a_text, title, submit_date) VALUES(NULL, '. $_SESSION['id']. ', "'. mysql_real_escape_string($text, $db). '", "'. mysql_real_escape_string($nadpis, $db). '", "' . date('Y-m-d H:i:s'). '")'; mysql_query($query, $db) or die(mysql_error($db)); $clanok_id = mysql_insert_id($db); $query = 'INSERT INTO foto (foto_id, article_id) VALUES (NULL, '. $clanok_id. ')'; mysql_query($query, $db) or die(mysql_error($db)); if(!empty($image)) { $last_id = mysql_insert_id($db); $image_name = $last_id. $ext; imagejpeg($image, $dir. '/'. $image_name, 100); } else { $last_id = mysql_insert_id($db); $image_name = 'caps.jpg'; } $priecinok = 'images/'; $place = $priecinok. $image_name; $query = 'UPDATE foto SET foto_path = "'. $place. '" WHERE foto_id = '. $last_id; mysql_query($query, $db) or die(mysql_error($db)); $query = 'UPDATE articles SET foto_id = '. $last_id. ' WHERE article_id = '. $clanok_id; mysql_query($query, $db) or die(mysql_error($db)); $redirect = 'index.php'; } else { $chyba = 'Nepodarilo sa nahrat clanok!'; $redirect = 'index.php?chyba='. $chyba; } break; Please how can I repare it? I will be very grateful if somebody help me...
0
[ 2, 13, 26120, 71, 16866, 6488, 800, 3726, 3726, 31, 57, 1448, 29, 71, 16866, 6488, 9, 235, 25, 51, 505, 45, 13, 1, 4190, 1957, 150, 4474, 3726, 7, 21531, 3091, 118, 4190, 8, 18768, 7, 1028, 3726, 7, 7028, 5183, 9, 26120, 7, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to list indexes on materialized views (Oracle) === Am I correct to think that listing indexes for materialized views is the same as listing indexes for tables? In other words: select * from ALL_IND_COLUMNS where TABLE_OWNER='ITM' and TABLE_NAME='V_RP_MI_LBG_DISCLOSURE' order by INDEX_NAME, COLUMN_POSITION;
0
[ 2, 184, 20, 968, 4348, 160, 27, 27263, 4146, 13, 5, 6055, 5615, 6, 800, 3726, 3726, 589, 31, 4456, 20, 277, 30, 9554, 4348, 160, 26, 27263, 4146, 25, 14, 205, 28, 9554, 4348, 160, 26, 7484, 60, 19, 89, 715, 45, 5407, 1637, 37,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Caching inner query in SQL === How can I optimize below SQL (simplified view of my complex query.) Ideally, I should be able to cache the first SQL result (order ids) and do some kind of projection on OrderLine table in the second query. Any pointers will be helpful. Restrictions - I cannot create temporary tables, cursors or procedures / functions. I am connecting to Oracle 10g. SELECT 'Object_id', id, mod_id FROM ( (Select 'Order_id', order_id, mod_id FROM Orders) UNION (select 'Order_line_id', order_line_id, mod_id FROM OrderLine WHERE order_id IN (Select order_id FROM Orders) ) )
0
[ 2, 1658, 7192, 3754, 25597, 19, 4444, 255, 800, 3726, 3726, 184, 92, 31, 22864, 1021, 4444, 255, 13, 5, 11268, 1418, 16, 51, 1502, 25597, 9, 6, 5628, 102, 15, 31, 378, 44, 777, 20, 16522, 14, 64, 4444, 255, 829, 13, 5, 7861, 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...
Symfony2: How to share js libs and css between bundles === I have different Bundles: MainBundle (Homepage), SecurityBundle (Login, Registration), MessageBundle (Message System), ShopBundle. I also follow the three stage layout schema (::base.html.twig, AcmeMainBundle::layout.html.twig, AcmeMainBundle:Default:index.html.twig). But I have problems sharing common js libaries through the application (e.g. jquery) and defining a base.css (which sets some base classes, backgrounds, fonts etc.) So whats the best approach to use shared css and js withouth having to lose assetic support? One idea would be to create a CommonBundle which holds all global js and css and some layout files but I don't think this is the best way to handle this...
0
[ 2, 13, 7261, 10229, 93, 135, 45, 184, 20, 1891, 487, 18, 13, 8326, 18, 17, 272, 18, 18, 128, 10194, 18, 800, 3726, 3726, 31, 57, 421, 10194, 18, 45, 407, 9930, 413, 13, 5, 8167, 6486, 6, 15, 1221, 9930, 413, 13, 5, 5567, 108...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GLMNET / Scikit learn Coefficients matrix size === In scikit learn the coefficients (coef_) of a logistic regression model is an array of dimension [n_classes-1, n_features]. In glmnent the coefficients (fit$beta) is not a similar array. For example: Dimension of xMatrix - 63231 X 1223 (No of training Samples X Number of Features) Dimension of yMatrix - 63231 X 1 (No of training samples X The expected output value for each sample). There are 45 different classes. So the output is either one of them. Dimension of output coefficients (from what I understand) = 1223 X 45 ( No of Features X No of Classes) While I get it right in scikit learn, the results in glmnet differ Here is my glmnet code: > dim(x) [1] 63231 1223 > length(y) [1] 63231 > unique(sort(y)) [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [26] 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 > fit <- glmnet(x,y) > summary(fit) Length Class Mode a0 86 -none- numeric beta 105178 dgCMatrix S4 df 86 -none- numeric dim 2 -none- numeric lambda 86 -none- numeric dev.ratio 86 -none- numeric nulldev 1 -none- numeric npasses 1 -none- numeric jerr 1 -none- numeric offset 1 -none- logical call 3 -none- call nobs 1 -none- numeric > dim(fit$beta) [1] 1223 86 why do I get 1223 X 86 instead of 1223 X 45?
0
[ 2, 489, 10363, 2328, 13, 118, 9569, 13703, 2484, 14612, 18, 8187, 1072, 800, 3726, 3726, 19, 9569, 13703, 2484, 14, 14612, 18, 13, 5, 716, 6917, 1, 6, 16, 21, 29586, 27369, 1061, 25, 40, 7718, 16, 9547, 636, 103, 1, 1898, 160, 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...
Outlook Needs to Be Open When Getting NewMail Events Via Exchange Web Services (C#) === Title pretty much says it all. I tried searching for this topic, and couldn't find anything. I looked at [impersonation][1] for Exchange Server 2010, but I don't know if impersonation isn't enabled on the server (or if that is even the issue) - and I'd like to be a bit more confident before I bug a sys admin. Is there anything else it could be? I followed the MSDN tutorial for setting up a subscription and connection, using impersonation, and I still have to have Outlook open - otherwise, I never get *any event* including NewMail events, which are what I'm looking for. Does anybody have any ideas? [1]: http://msdn.microsoft.com/en-us/library/bb204095%28v=exchg.140%29.aspx
0
[ 2, 19837, 2274, 20, 44, 368, 76, 1017, 78, 8079, 963, 1197, 1950, 2741, 687, 13, 5, 150, 5910, 6, 800, 3726, 3726, 581, 1772, 212, 898, 32, 65, 9, 31, 794, 5792, 26, 48, 8303, 15, 17, 711, 22, 38, 477, 602, 9, 31, 292, 35, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Core Graphics Blending Causes Bright Spots === I'm trying to draw a simple grid pattern on a black background using Core Graphics. The gridlines will be green. I am currently creating and drawing in an image context, then using the resulting image to pattern the background of my view: CGFloat gridSize = 45; UIGraphicsBeginImageContext(CGSizeMake(gridSize, gridSize)); CGContextRef ctx = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(ctx); // Create black background fill. CGContextSetFillColorWithColor(ctx, [[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0] CGColor]); CGContextMoveToPoint(ctx, 0, 0); CGContextAddLineToPoint(ctx, gridSize, 0); CGContextAddLineToPoint(ctx, gridSize, gridSize); CGContextAddLineToPoint(ctx, 0, gridSize); CGContextAddLineToPoint(ctx, 0, 0); CGContextFillPath(ctx); // Set context variables for line drawing. CGContextSetBlendMode(ctx, kCGBlendModeNormal); CGContextSetStrokeColorWithColor(ctx, [[UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:1.0] CGColor]); CGContextSetLineWidth(ctx, 1); // Draw top and bottom grid lines. CGContextMoveToPoint(ctx, 0, 0); CGContextAddLineToPoint(ctx, gridSize, 0); CGContextMoveToPoint(ctx, gridSize, gridSize); CGContextAddLineToPoint(ctx, 0, gridSize); CGContextStrokePath(ctx); // Draw left and right grid lines. CGContextMoveToPoint(ctx, gridSize, 0); CGContextAddLineToPoint(ctx, gridSize, gridSize); CGContextMoveToPoint(ctx, 0, gridSize); CGContextAddLineToPoint(ctx, 0, 0); CGContextStrokePath(ctx); // Draw a "cross" in the center of the image to troubleshoot blending. CGContextMoveToPoint(ctx, 20, 20); CGContextAddLineToPoint(ctx, 40, 20); CGContextStrokePath(ctx); CGContextMoveToPoint(ctx, 30, 10); CGContextAddLineToPoint(ctx, 30, 30); CGContextStrokePath(ctx); UIGraphicsPopContext(); UIImage *gridImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); // Set background color to a pattern based on the drawn image. [self setBackgroundColor:[[UIColor alloc] initWithPatternImage:gridImage]]; However, this code results in the following: ![Gridlines](http://i.imgur.com/SgPFD.png) Note that there are brighter areas that occur at the intersection of any lines. The crosses that are somewhat randomly placed within the grid pattern were put there just to test whether the bright areas still occur when not affected by the edges of the patterning (they do). It is these bright areas at the line intersections that I wish to alleviate. To make sure I hadn't accidentally fooled myself using some sort of optical illusion, I checked the pixel colors in the middle of the lines as well as at their intersections. Pixel values at midpoint of green line: * R: 0 * G: 129 * B: 0 Pixel values at intersection of two green lines: * R: 0 * G: 191 * B: 0 I have checked the [Apple Core Graphics](https://developer.apple.com/library/mac/documentation/graphicsimaging/conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-BCIGICEF) docs regarding blending modes, and ascertained that the default blending mode is `kCGBlendModeNormal`, which should, when painting colors with `alpha = 1`, should "completely obscure the background", and any previously painted colors. Though this is the default blending mode, I still set it explicitly in the above code, and yet I still see these bright squares. What I expect instead is to see the lines of a uniform green color, presumably with the RGB profile: * R: 0 * G: 255 * B: 0 What am I missing?
0
[ 2, 2884, 8351, 25359, 4047, 2673, 7115, 800, 3726, 3726, 31, 22, 79, 749, 20, 2003, 21, 1935, 7354, 3732, 27, 21, 319, 2395, 568, 2884, 8351, 9, 14, 7354, 7939, 129, 44, 647, 9, 31, 589, 871, 2936, 17, 3533, 19, 40, 1961, 4141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convert a datetime.date object into a datetime.datetime object with zeros for any missing time attributes === Is there a built-in function that converts a datetime.date object into a datetime.datetime object with 0's for the missing stuff? For example, suppose tdate = datetime.date(2012,1,31) I want to write something like either of these tdatetime = datetime.date.datetime() tdatetime = datetime.datetime(tdate) and I want the output to be datetime.datetime(2012, 1, 31, 0, 0) But neither works. [There is a builtin function to go from datetime.datetime to datetime.date, but I'm looking for the reverse operation.](http://stackoverflow.com/questions/3743222/how-do-i-convert-datetime-to-date-in-python) One very poor solution would be to write: datetime.datetime(tdate.year(), tdate.month(), tdate.day(), 0, 0) I specifically want to avoid this bad way of doing it. I've already written my own small function to do this, but I think it should be provided in the module. It's cluttering up some system-wide imports to use my function. It's workable, just not very Pythonic. I'm just asking to see if anyone knows whether there is an efficient way to do it using only datetime module functions.
0
[ 2, 8406, 21, 1231, 891, 9, 8209, 3095, 77, 21, 1231, 891, 9, 8209, 891, 3095, 29, 4606, 18, 26, 186, 2863, 85, 13422, 800, 3726, 3726, 25, 80, 21, 392, 8, 108, 1990, 30, 8406, 18, 21, 1231, 891, 9, 8209, 3095, 77, 21, 1231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
precomputing user-defined functions in postgresql === I'm trying to precompute a user-defined function on a per row basis. The idea is I have JSON object as a text object in one of the fields, and I want to parse out some other 'fields' from it, which can be returned in queries just like any other true field. However, the overhead of parsing the JSON is significant. Is there any way to precompute this parsing function in a way that speeds up queries? Please refrain from arguing that there shouldn't be JSON as text on the database in the first place; I am aware of the pros and cons.
0
[ 2, 782, 960, 4881, 68, 4155, 8, 13439, 3719, 19, 678, 6879, 18, 22402, 800, 3726, 3726, 31, 22, 79, 749, 20, 782, 11103, 6567, 21, 4155, 8, 13439, 1990, 27, 21, 416, 3131, 2239, 9, 14, 882, 25, 31, 57, 487, 528, 3095, 28, 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...
c socket send file size and then the file === This is a snippet of _client.c_: int DescrittoreClient, fd; /* descrittore del socket */ int NumPorta = atoi(argv[2]); /* numero di porta */ struct sockaddr_in serv_addr; /* indirizzo del server */ char nread=0, Buffer[1024] = {}; /* contiene i dati di invio e ricezione */ struct hostent *hp; /* con la struttura hostent definisco l'hostname del server */ char *filename = argv[3]; int fsize[10240] = {}; DescrittoreClient = socket(AF_INET, SOCK_STREAM, 0); /* ERROR HANDLING deleted */ connect(DescrittoreClient, (struct sockaddr *) &serv_addr, sizeof(serv_addr)); /* ERROR HANDLING deleted */ strcpy(Buffer, filename); send(DescrittoreClient, Buffer, strlen(Buffer), 0); /* ERROR HANDLING deleted */ recv(DescrittoreClient, fsize, sizeof(fsize), 0); /* ERROR HANDLING deleted */ printf("%d\n", *fsize); fd = open(filename, O_CREAT | O_WRONLY,0644); /* ERROR HANDLING deleted */ while ((nread = read(DescrittoreClient, Buffer, sizeof(Buffer))) > 0){ write(fd, Buffer, nread); } printf("File ricevuto\n"); And this is a snippet of _server.c_: int DescrittoreServer, DescrittoreClient, LunghezzaClient; int NumPorta = atoi(argv[1]); char Buffer[1024] = {}; int rc, fd; off_t offset = 0; struct stat stat_buf; char filename[1024] = {}; int fsize[10240] = {}; DescrittoreServer = socket(AF_INET, SOCK_STREAM, 0); if(bind(DescrittoreServer, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0){ perror("Errore di bind\n"); close(DescrittoreServer); exit(1); } listen(DescrittoreServer, 5); LunghezzaClient = sizeof(cli_addr); while(1){ DescrittoreClient = accept(DescrittoreServer, (struct sockaddr *) &cli_addr, &LunghezzaClient); rc = recv(DescrittoreClient, filename, sizeof(filename), 0); fprintf(stderr, "Ricevuta richiesta di inviare il file: '%s'\n", filename); /* open the file to be sent */ fd = open(filename, O_RDONLY); /* get the size of the file to be sent */ fstat(fd, &stat_buf); *fsize = stat_buf.st_size; send(DescrittoreClient, fsize, sizeof(fsize), 0); /* copy file using sendfile */ offset = 0; rc = sendfile(DescrittoreClient, fd, &offset, stat_buf.st_size); if (rc != stat_buf.st_size) { fprintf(stderr, "Trasferimento incompleto: %d di %d bytes\n", rc, (int)stat_buf.st_size); exit(1); } close(DescrittoreClient); close(fd); } What does this code do:<br> 1) client sends the name of a file<br> 2) server sends the length (in byte) of the file<br> 3) client receives the length of the file<br> 4) server sends the file<br> 5) client receives the file<br> The problem is that the file **is not** entirely received but only a part of it is written by the client (for example a file of 2143 byte is sent by the server and only 95 byte are received by the client) and i don't understand why!<br> PS: some errors handling have been deleted so the code is more readable!
0
[ 2, 272, 18482, 2660, 3893, 1072, 17, 94, 14, 3893, 800, 3726, 3726, 48, 25, 21, 13, 29061, 16, 13, 1, 150, 18513, 38, 9, 150, 1, 45, 19, 38, 1746, 16063, 262, 14673, 18513, 38, 15, 398, 43, 73, 13, 118, 2483, 1746, 16063, 262,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 and where CSS in XHTML file of Dynamic Web Project Eclipse === I'm trying to link css file to xhtml page in several ways but nothing what I did want to work. Here is folders structure of project: Project Java serources WebContent **index.xhtml** META-INF WEB-INF style **style.css** Now in index.xhtml file I have: `<link rel="stylesheet" href="style/style.css" />` Can someone tell me what I do wrong?
0
[ 2, 184, 17, 113, 272, 18, 18, 19, 993, 15895, 3893, 16, 7782, 2741, 669, 11652, 800, 3726, 3726, 31, 22, 79, 749, 20, 3508, 272, 18, 18, 3893, 20, 993, 15895, 2478, 19, 238, 2847, 47, 626, 98, 31, 144, 259, 20, 170, 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...
Linq instead of multiple foreach === Could you offer me a linq expression instead of this: <!-- language: c# --> slug.Text = ""; foreach (var script in slugItem.script) { foreach (var body in script.body) { foreach (var vo in body.vo) { foreach (var content in vo.content) { foreach (var text in content.text) { slug.Text = string.Format("{0}\n{1}", slug.Text, text.Value); } } } } } </code> Thank you in advance!
0
[ 2, 6294, 1251, 700, 16, 1886, 26, 14322, 800, 3726, 3726, 110, 42, 1994, 55, 21, 6294, 1251, 1803, 700, 16, 48, 45, 13, 1, 187, 8, 8, 816, 45, 272, 5910, 13, 8, 8, 1, 15850, 9, 11969, 800, 13, 7, 7, 73, 26, 14322, 13, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
RCP application - perspectives not being saved === I am developing RCP application that has several perspectives, I have also added possibility to have custom perspectives that can be saved using standard Eclipse workbench action. IWorkbenchAction savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE.create(getWindow()); register(savePerspectiveAction); MenuManager windowMenu = new MenuManager("&Window",IWorkbenchActionConstants.M_WINDOW); windowMenu.add(savePerspectiveAction); But, problem is that saved perspectives exist only in current session of my application. If I reopen application, saved perspectives are lost. Debugging showed that in load method of PerspectiveRegistry class custom perspectives are retrieved from [perspective_name]_persp.xml file. File should be located in .metadata\.plugins\org.eclipse.ui.workbench\ directory, but it is not. So I doubt that a problem is in the fact that perspectives are not being saved into file. On the other hand workbench is succesfully saved in .metadata\.plugins\org.eclipse.ui.workbench\workbench.xml file as I have added this part of code in ApplicationWorkbenchAdvisor class. public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); ... }
0
[ 2, 761, 7439, 3010, 13, 8, 18452, 52, 142, 4377, 800, 3726, 3726, 31, 589, 3561, 761, 7439, 3010, 30, 63, 238, 18452, 15, 31, 57, 67, 905, 4813, 20, 57, 5816, 18452, 30, 92, 44, 4377, 568, 1236, 11652, 170, 26359, 1028, 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 a child node clickable in ExpandableListView in Android === i'm using this sample codes samples\android-8\ApiDemos\src\com\example\android\apis\view\ExpandableList1 . I want to click child node but i cant follow my codes. Do you have any simple solution to handle it? My codes are below. public class Option_Hakkimizda_Bir extends ExpandableListActivity { ExpandableListAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set up our adapter mAdapter = new MyExpandableListAdapter(); setListAdapter(mAdapter); registerForContextMenu(getExpandableListView()); } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu.setHeaderTitle("Sample menu"); menu.add(0, 0, 0, R.string.expandable_list_sample_action); } @Override public boolean onContextItemSelected(MenuItem item) { ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) item.getMenuInfo(); String title = ((TextView) info.targetView).getText().toString(); int type = ExpandableListView.getPackedPositionType(info.packedPosition); if (type == ExpandableListView.PACKED_POSITION_TYPE_CHILD) { int groupPos = ExpandableListView.getPackedPositionGroup(info.packedPosition); int childPos = ExpandableListView.getPackedPositionChild(info.packedPosition); Toast.makeText(this, title + ": Child " + childPos + " clicked in group " + groupPos, Toast.LENGTH_SHORT).show(); return true; } else if (type == ExpandableListView.PACKED_POSITION_TYPE_GROUP) { int groupPos = ExpandableListView.getPackedPositionGroup(info.packedPosition); Toast.makeText(this, title + ": Group " + groupPos + " clicked", Toast.LENGTH_SHORT).show(); return true; } return false; } /** * A simple adapter which maintains an ArrayList of photo resource Ids. * Each photo is displayed as an image. This adapter supports clearing the * list of photos and adding a new photo. * */ public class MyExpandableListAdapter extends BaseExpandableListAdapter { // Sample data set. children[i] contains the children (String[]) for groups[i]. private String[] groups = { " Su Yalıtım", " Isı Yalıtımı", " Çatı Kaplama Malzemeleri", " BTM Optigreen Yeşil Catilar"," BTM Schüco Solar Güneş Enerjili Çatı Sistemleri" }; private String[][] children = { { "BTM Su Yalıtım Örtüleri", "BTM PVC Su Yalıtım Örtüsü Polypan", "BTM Surma Esaslı Su Yalıtım Örtüleri" }, { "BTM Polpan Isı Yalıtım Levhası", "BTMPlus Dış Cephe Isı Yalıtım Sistemi- MANTOLAMA Sistemi" }, { "BTM Çatı Kaplama Malzemesi Shingle", "Oluklu Bitümlü Çatı Kaplama Malzemesi","BTM Kiremit Altı Su Yalıtım Membranı","BTM Taşlı Çatı Kaplama Örtüsü Poliroof" }, { "Ekonomik Çatı Çözümü", "Eğimli Çati Çözümü" }, { "Ince Film Çözümler", "Poli-Mono Kristal Moduller" } }; public Object getChild(int groupPosition, int childPosition) { return children[groupPosition][childPosition]; } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public int getChildrenCount(int groupPosition) { return children[groupPosition].length; } public TextView getGenericView() { // Layout parameters for the ExpandableListView AbsListView.LayoutParams lp = new AbsListView.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, 64); TextView textView = new TextView(Option_Hakkimizda_Bir.this); textView.setLayoutParams(lp); //textView.setTextSize((float) 11.5); // Center the text vertically textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); // Set the text starting position textView.setPadding(36, 0, 0, 0); return textView; } public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getChild(groupPosition, childPosition).toString()); textView.setTextSize((float) 13.0); //convertView.setBackgroundColor(getResources().getColor(R.color.white)); return textView; } public Object getGroup(int groupPosition) { return groups[groupPosition]; } public int getGroupCount() { return groups.length; } public long getGroupId(int groupPosition) { return groupPosition; } public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getGroup(groupPosition).toString()); textView.setTextSize((float) 15.0); return textView; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } public boolean hasStableIds() { return true; } } }
0
[ 2, 184, 20, 233, 21, 850, 15421, 10840, 579, 19, 6073, 579, 5739, 4725, 19, 13005, 800, 3726, 3726, 31, 22, 79, 568, 48, 5717, 11358, 7855, 1, 290, 18524, 8, 457, 1, 2552, 3448, 7076, 1, 18, 5453, 1, 960, 1, 29041, 1, 290, 185...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
java.lang.reflect.InvocationTargetException === i have an applet with some buttons in it. the buttons have image icons. i also have made an html file with this applet. whenever i run this html from server(apache tomcat) an exception occurs: java.lang.reflect.InvocationTargetException. but if i run without the icons, there are no problems. can anyone help me, so that i can run this html with the button icons. Image myImage = getToolkit().createImage("image/REC1.jpg"); ImageIcon myIcon = new ImageIcon(myImage); button.setIcon(myIcon);
0
[ 2, 8247, 9, 9949, 9, 27977, 9, 108, 2625, 16893, 3958, 3060, 10066, 872, 800, 3726, 3726, 31, 57, 40, 4037, 38, 29, 109, 12861, 19, 32, 9, 14, 12861, 57, 1961, 9801, 18, 9, 31, 67, 57, 117, 40, 13, 15895, 3893, 29, 48, 4037, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calculating the latency of nodes in a WiFi network === I do have an answer but am wondering if there's a better way. The problem is this: I have a set of clients on a relatively slow WiFi network. Each client has a distance to the access point, which determines how fast that client-to-AP link will run. Shorter links run faster than longer links. My goal is to have each node calculate the length of its own link (and that of all nodes in the network). Nodes can talk to each other, but always via the AP, of course. Knowing the distances between nodes and the AP lets us optimize the network simply by moving the worst nodes closer to the access point.
0
[ 2, 22937, 14, 456, 14386, 16, 16272, 19, 21, 4807, 1707, 982, 800, 3726, 3726, 31, 107, 57, 40, 1623, 47, 589, 5712, 100, 80, 22, 18, 21, 574, 161, 9, 14, 1448, 25, 48, 45, 31, 57, 21, 309, 16, 7421, 27, 21, 3109, 2276, 4807...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
AFNetworking synchrone operation in NSOperationQueue on iPhone === My app is working this way : - create an album and take pictures - send them on my server - get an answer / complementary information after picture analysis. I have some issue with the sending part. Here is the code @interface SyncAgent : NSObject <SyncTaskDelegate> @property NSOperationQueue* _queue; -(void)launchTasks; @end @implementation SyncAgent @synthesize _queue; - (id)init { self = [super init]; if (self) { self._queue = [[NSOperationQueue alloc] init]; [self._queue setMaxConcurrentOperationCount:1]; } return self; } -(void) launchTasks { NSMutableArray *tasks = [DataBase getPendingTasks]; for(Task *t in tasks) { [self._queue addOperation:[[SyncTask alloc] initWithTask:t]]; } } @end and the SyncTask : @interface SyncTask : NSOperation @property (strong, atomic) Task *_task; -(id)initWithTask:(Task *)task; -(void)mainNewID; -(void)mainUploadNextPhoto:(NSNumber*)photoSetID; @end @implementation SyncTask @synthesize _task; -(id)initWithTask:(Task *)task { if(self = [super init]) { self._task = task; } return self; } -(void)main { NSLog(@"Starting task : %@", [self._task description]); // checking if everything is ready, sending delegates a message etc [self mainNewID]; } -(void)mainNewID { __block SyncTask *safeSelf = self; [[WebAPI sharedClient] createNewPhotoSet withErrorBlock:^{ NSLog(@"PhotoSet creation : error") } andSuccessBlock:^(NSNumber *photoSetID) { NSLog(@"Photoset creation : id is %d", [photoSetID intValue]); [safeSelf mainUploadNextPhoto:photoSetID]; }]; } -(void)mainUploadNextPhoto:(NSNumber*) photoSetID { //just admit we have it. won't explain here how it's done NSString *photoPath; __block SyncTask *safeSelf = self; [[WebAPI sharedClient] uploadToPhotosetID:photoSetID withPhotoPath:photoPath andErrorBlock:^(NSString *photoPath) { NSLog(@"Photo upload error : %@", photoPath); } andSuccessBlock:^(NSString *photoPath) { NSLog(@"Photo upload ok : %@", photoPath); //then we delete the file [safeSelf mainUploadNextPhoto:photoSetID]; }]; } @end Every network operations are done using AFNetworking this way : -(void)myDummyDownload:(void (^)(NSData * data))successBlock { AFHTTPClient* _httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://www.google.com/"]]; [_httpClient registerHTTPOperationClass:[AFHTTPRequestOperation class]]; NSMutableURLRequest *request = [_httpClient requestWithMethod:@"GET" path:@"/" nil]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; AFHTTPRequestOperation *operation = [_httpClient HTTPRequestOperationWithRequest:(NSURLRequest *)request success:^(AFHTTPRequestOperation *operation, id data) { if(dataBlock) dataBlock(data); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Cannot download : %@", error); }]; [operation setShouldExecuteAsBackgroundTaskWithExpirationHandler:^{ NSLog(@"Request time out"); }]; [_httpClient enqueueHTTPRequestOperation:operation]; } My problem is : my connections are made asynchronously, so every task are launched together without waiting fo the previous to finish even with `[self._queue setMaxConcurrentOperationCount:1]` in `SyncAgent`. Do I need to perform every connection synchronously ? I don't think this is a good idea, because a connection never should be done this way and also because I might use these methods elsewhere and need them to be performed in background, but I cannot find a better way. Any idea ? Oh and if there is any error/typo in my code, I can assure you it appeared when I tried to summarize it before pasting it, it is working without any problem as of now. Thanks ! PS : Sorry for the long pastes I couldn't figure out a better way to explain the problem.
0
[ 2, 13, 2565, 24106, 68, 13, 16023, 62, 1453, 19, 13, 2172, 11377, 2005, 4185, 27, 21024, 800, 3726, 3726, 51, 4865, 25, 638, 48, 161, 13, 45, 13, 8, 1600, 40, 244, 17, 247, 3104, 13, 8, 2660, 105, 27, 51, 8128, 13, 8, 164, 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...