Daily Archives

Articles indexed Wednesday April 21 2010

Page 23/126 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Windows azure: Security Concerns

    - by veda
    I am concern about the security of the data and application on Windows Azure... I read in a book that The windows azure provides security through service-level agreement. Can anyone tell me about the What kind of authentication mechanisms used to protect my data. How Microsoft provides these securities...

    Read the article

  • Need help on nested loop of queries in php and mysql?

    - by mysqllearner
    Hi, I am trying to get do this: <?php $good_customer = 0; $q = mysql_query("SELECT user FROM users WHERE activated = '1'"); // this gives me about 40k users while($r = mysql_fetch_assoc($q)){ $money_spent = 0; $user = $r['user']; // Do queries on another 20 tables for($i = 1; $i<=20 ; $i++){ $tbl_name = 'data' . $i; $q2 = mysql_query("SELECT money_spent FROM $tbl_name WHERE user = '{$user}'"); while($r2 = mysql_fetch_assoc($q2)){ $money_spend += $r2['money_spent']; } if($money_spend > 1000000){ $good_customer += 1; } } } This is just an example. I am testing on localhost, for single user, it returns very fast. But when I try 1000, it takes forever, not even mentioned 40k users. Anyway to optimise/improve this code? EDIT: By the way, each of the others 20 tables has ~20 - 40k records

    Read the article

  • Interview Q: given an array of numbers, return array of products of all other numbers (no division)

    - by polygenelubricants
    I was asked this question in a job interview, and I'd like to know how others would solve it. I'm most comfortable with Java, but solutions in other languages are welcome. Given an array of numbers, nums, return an array of numbers products, where products[i] is the product of all nums[j], j != i. Input : [1, 2, 3, 4, 5] Output: [(2*3*4*5), (1*3*4*5), (1*2*4*5), (1*2*3*5), (1*2*3*4)] = [120, 60, 40, 30, 24] You must do this in O(N) without using division.

    Read the article

  • Changing gmail Settings with Ruby

    - by Technocrat
    I need to configure my gmail account(s) programmatically with Ruby. I checked out the apps api and it looks like the simplest possible solution would be to use ClientLogin for logging in and a simple XML PUT for changing the forwarding setting, for example. I wrote a little test script like so: http://gist.github.com/373457 It would appear that the call to ClientLogin works because it comes back with an Auth= token. When it sends the PUT request to google, however, it comes back with a RestClient::Unauthorized exception. I rewrote the script with pure net/https and it turns out the message I'm getting is invalid token, yet I can't figure out what is wrong with my token. Can anyone else see it?

    Read the article

  • Simple PERL Problem

    - by Suezy
    I have an array of numbers: @numbers = 1,2,3,6,8,9,11,12,13,14,15,20 and I want to print it this way: 1-3,6,8-9,11-15,20 Any thoughts? Of course I tried using the most common "looping", but still didn't get it.

    Read the article

  • Port 80 is being used by SYSTEM (PID 4), what is that?

    - by GiH
    I am trying to use port 80 for my application server, but when I perform "netstat -aon" I get TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 When I look up the process in task manager, it shows PID 4 is SYSTEM, thats it, not extension... nothing, just "SYSTEM". Whats going on here? I'm afraid to end this process, what do I do? UPDATE: I've solved this through a stackoverflow question. Follow this link to find the solution for how to get IIS to stop listening on port 80 for a specified IP address.

    Read the article

  • Odd values/movement with UITouch and CGPoint.

    - by Joshua
    I'm getting odd numbers from UITouch and CGPoint and one is different, I also think this maybe causing a flickering affect in my app when I try to move something by following a touch. This is the code I'm using: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"touchDown"); UITouch *touch = [touches anyObject]; firstTouch = [touch locationInView:self.view]; if (CGRectContainsPoint(but.frame, firstTouch)) { butContains = YES; NSLog(@"butContains = %d", butContains); } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; currentTouch = [touch locationInView:self.view]; NSInteger x = currentTouch.x; NSInteger y = currentTouch.y; CGFloat CGX = (CGFloat)x; CGFloat CGY = (CGFloat)y; if (butContains == YES) { NSLog(@"touch in subView/contentView"); sub.frame = CGRectMake(CGX, CGY, 130.0, 21.0); } NSLog(@"touch moved"); } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; currentTouch = [touch locationInView:self.view]; NSLog(@"User tapped at %@", NSStringFromCGPoint(currentTouch)); NSLog(@"Point %a, %a", currentTouch.x, currentTouch.y); NSInteger x = currentTouch.x; NSInteger y = currentTouch.y; NSLog(@"Point %a, %a", y, x); CGFloat CGX = (CGFloat)x; CGFloat CGY = (CGFloat)y; NSLog(@"Point %g, %g", CGX, CGY); if (butContains == YES) { NSLog(@"touch in subView/contentView"); sub.frame = CGRectMake(CGX, CGY, 130.0, 21.0); } butContains = NO; NSLog(@"touch ended"); } - (IBAction)add:(id)sender{ InSightViewController *contentView = [[InSightViewController alloc] initWithNibName:@"SubView" bundle:[NSBundle mainBundle]]; [contentView loadView]; [self.view insertSubview:contentView.view atIndex:0]; } This is what I get from the touchesEnded method in the Debugger. 2010-04-20 20:06:13.045 InSight[25042:207] User tapped at {50, 78} 2010-04-20 20:06:13.047 InSight[25042:207] Point 0x1.9p+5, 0x1.38p+6 2010-04-20 20:06:13.048 InSight[25042:207] Point 0x1.900000027p-1037, 0x1.38p+6 2010-04-20 20:06:13.048 InSight[25042:207] Point 50, 78 And this is what's happening in the Simulator. fwdr.org/file:y8bd As this is a complicated problem this is the source code of my XCode Project aswell. http://cl.ly/Qjj

    Read the article

  • Where to get apache poi port for .net

    - by Nassign
    I would like to know if there is a website where I could download the Apache POI ported for .net? I already found this link in the web http://www.apache.org/~avik/dist/poi-2.5.1-dev-20040708.dll But the version of apache poi now is 3.6, I was wondering if there is a latest version out there? Does the apache foundation support such porting? I already tried to search the apache website too with no avail. As for using Microsoft library, the excel interopt is not that good for concurrent processing like a web backend. If I use the DocumentFormat.OpenXML library, I have a limitation of creating office 2007 document only.

    Read the article

  • ignore certain buffers using iswitchb

    - by robUK
    Hello, GNU Emacs 23.1 I am using iswitchb. However, when I press c-x b I get a list of buffers. However, I don't want to display one like scratch, Messages, GNU Emacs, etc. Just the buffers I have opened myself. So I am looking for a way to ignore these buffers. This is what I have in my configuration. However, it doesn't ignore the buffers I don't want. Have I done anything wrong? ;; Setup iswitchb to select different buffers, ignore buffers to reduce list (iswitchb-mode 1) (setq iswitchb-buffer-ignore '("*scratch*")) (setq iswitchb-buffer-ignore '("*Messages*")) (setq iswitchb-buffer-ignore '("*GNU Emacs*")) (setq iswitchb-buffer-ignore '("*compilation*")) Many thanks for any suggestions,

    Read the article

  • Tips on a tool to measure code quality?

    - by Cristi Diaconescu
    I'm looking for a tool that can provide code quality metrics. For instance it could report very long functions (spaghetti code) very complex classes (which could contain do-it-all code) ... While we're on the (subjective:-) subject of code quality, what other code metrics would you suggest? I'm targetting C#/.NET code, but I'm sure this could extend to most programming languages.

    Read the article

  • alt right click paste

    - by Ravisha
    I was wondering if there is a way to paste a selected text just like we select it. I mean,We can use alt then right click and select text in rectangular area.Similarly can text be pasted ? Consider Microsoft word 2003

    Read the article

  • property inject in Autofac

    - by Benny
    I am compiling: PropertyInject wiki page why this line: builder.RegisterType().InjectProperties(); doesn't compile? how to do property inject in autofac? I am using vs2010, autofac 2.1.13.813. thanks. EDIT: PropertyInjection should be like this in new version of AutoFac: builder.RegisterType().PropertiesAutowired(false);

    Read the article

  • Silverlight TabItem template not working correctly

    - by Savvas Sopiadis
    Hello everybody! In a SL4 application i need to restyle my TabItems (actually add a button in the header). So i took the TabItem's control template from here and added the functionality i wanted. This seems to work fine, (i could dynamically add tabitems) with one exception: i think this posted control template is behaving somehow "arbitrary": every time the mouse hoovers over a non selected TabItem header, this gets selected WHITHOUT clicking!! (afaik this is not the default behavior: the user user has to click a header to make this tabitem the selected one). I tried to find why it is behaving like this, with no luck! Is there someone who can enlighten my darkness??? Thanks in advance!

    Read the article

  • Website does not automatically fit to iphone screen

    - by Ploetzeneder
    Hello, The following code does not fit onto the iphone screen; how do I have to define the viewport? <html> <body> <center> <div id="karteu" style="background: url('../customer/Karten/karte1.jpg') no-repeat left center;width:714px;height:540px;" > </div> </body> </html> Normally the site should be zoomed, so i first should see the website in small, and then be able to zoom that i see it in the original size, but in my case it does not, when i call the site, the zoom is, that the image has this original size already, and that i have to scroll, but i dont want to scroll,...i want to use the normal safari mobile zoom and then scroll The solution at the bottom does not zoom anything. I want to see the overview of the image at the beginning. Then i want to be able to zoom with the normal safari zoom functions,..

    Read the article

  • Neural Network with softmax activation

    - by Cambium
    This is more or less a research project for a course, and my understanding of NN is very/fairly limited, so please be patient :) ============== I am currently in the process of building a neural network that attempts to examine an input dataset and output the probability/likelihood of each classification (there are 5 different classifications). Naturally, the sum of all output nodes should add up to 1. Currently, I have two layers, and I set the hidden layer to contain 10 nodes. I came up with two different types of implementations 1) Logistic sigmoid for hidden layer activation, softmax for output activation 2) Softmax for both hidden layer and output activation I am using gradient descent to find local maximums in order to adjust the hidden nodes' weights and the output nodes' weights. I am certain in that I have this correct for sigmoid. I am less certain with softmax (or whether I can use gradient descent at all), after a bit of researching, I couldn't find the answer and decided to compute the derivative myself and obtained softmax'(x) = softmax(x) - softmax(x)^2 (this returns an column vector of size n). I have also looked into the MATLAB NN toolkit, the derivative of softmax provided by the toolkit returned a square matrix of size nxn, where the diagonal coincides with the softmax'(x) that I calculated by hand; and I am not sure how to interpret the output matrix. I ran each implementation with a learning rate of 0.001 and 1000 iterations of back propagation. However, my NN returns 0.2 (an even distribution) for all five output nodes, for any subset of the input dataset. My conclusions: o I am fairly certain that my gradient of descent is incorrectly done, but I have no idea how to fix this. o Perhaps I am not using enough hidden nodes o Perhaps I should increase the number of layers Any help would be greatly appreciated! The dataset I am working with can be found here (processed Cleveland): http://archive.ics.uci.edu/ml/datasets/Heart+Disease

    Read the article

  • Delphi - How can I prevent the main form capturing keystrokes in a TMemo on another non-modal form?

    - by user89691
    I have an app that opens a non-modal form from the main form. The non-modal form has a TMemo on it. The main form menu uses "space" as one of its accelerator characters. When the non-modal form is open and the memo has focus, every time I try to enter a space into the memo on the non-modal form, the main form event for the "space" shortcut fires! I have tried turning MainForm.KeyPreview := false while the other form is open but no dice. Any ideas? TIA

    Read the article

  • Where clause in Fluent NHibernate Many-to-Many

    - by Adam Albrecht
    I am trying to setup a many-to-many mapping in Fluent Nhibernate that has a where clause attached to the child table. This is basically how it should work: HasManyToMany(p => p.Images) .Table("ProductImages") .ParentKeyColumn("ProductID") .ChildKeyColumn("ImageID") .Where("ImageTypeID = 2"); The ImageTypeID column is in the Images table, but NHibernate is assuming it is part of the ProductImages table. Any idea how I can specify this? Thanks!

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >