Daily Archives

Articles indexed Thursday December 30 2010

Page 8/34 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Configuration of Home Network

    - by Wen Jie
    Previously my home network is as follows Speedtouch ST536 -> Linksys WRT54G But now as I have upgraded my internet subscription. My service provider gave me a "2Wire 2701 HGV" modem. I was wondering if it is possible to put the "2Wire" as an access point. So I might have a configuration as follows? Room Living Room Speedtouch ST536 -> Linksys WRT54G {Wireless} 2Wire 2701 HGV Because I find that my signal is very weak. Is there any way for me to do that?

    Read the article

  • Testing Zend_Controller wich is using Twitter API

    - by ArneRie
    Hi, iam trying to write an unit test for an Controller wich calls the Twitter API through an Service class. /** * Authenticate Step 1 for Twitter */ public function authenticateAction() { $this->service->authenticate(); } The Service does: /** * Authenticate with twitter * * @return void */ public function authenticate() { $consumer = new Zend_Oauth_Consumer($this->config); $token = $consumer->getRequestToken(); $this->session->twitterRequestToken = serialize($token); $consumer->redirect(); exit; } My Problem is, i have no idea to repleace the authenticate action inside the service for the unit test. I dont want to call the Twitter API while the tests run. Is there any Mocking Framework wich can do such things?

    Read the article

  • code in xmlhttp.readyState==4 doen't get executed

    - by shazia
    function download() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { //alert(xmlhttp.readyState); if(xmlhttp.readyState==4 && xmlhttp.status==200) { alert (xmlhttp.responseText); } } xmlhttp.open("GET","import.php?file="+document.getElementById('uploaded_file').value,false); xmlhttp.send(); // location.reload(true); } if I put alert and monitor xmlhttp.readyState then it shows me that its status does turn 4 and it does go in the if statement, if I don't monitor it with alert then it doesn't go in the if statement but I know import.php is working because I can see the changes in the database. I don't know whats going on...can anyone help. Thanks

    Read the article

  • Mysql for update

    - by shantanuo
    MySQL supports "for update" keyword. Here is how I tested that it is working as expected. I opened 2 browser tabs and executed the following commands in one window. mysql> start transaction; Query OK, 0 rows affected (0.00 sec) mysql> select * from myxml where id = 2 for update; .... mysql> update myxml set id = 3 where id = 2 limit 1; Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> commit; Query OK, 0 rows affected (0.08 sec) In another window, I started the transaction and tried to take an update lock on the same record. mysql> start transaction; Query OK, 0 rows affected (0.00 sec) mysql> select * from myxml where id = 2 for update; Empty set (43.81 sec) As you can see from the above example, I could not select the record for 43 seconds as the transaction was being processed by another application in the Window No 1. Once the transaction was over, I got to select the record, but since the id 2 was changed to id 3 by the transaction that was executed first, no record was returned. My question is what are the disadvantages of using "for update" syntax? If I do not commit the transaction that is running in window 1 will the record be locked for-ever?

    Read the article

  • How to auto-generate externs for the Google Closure Compiler

    - by ivo
    Suppose you are working in a javascript project with several external library dependencies, and want to compile your sources using the Google Closure Compiler in ADVANCED_OPTIMIZATIONS mode. Since in this mode the compiler will rename your code calls to the external libraries objects and functions, you must provide externs, to prevent this renaming from happening. But, it is a lot of work to produce the externs by hand, so, what is the best way to auto-generate the appropriate extern from a given javascript lib?

    Read the article

  • What technology to use for a RIA

    - by user297159
    I have to develop a online business software solution (similar to ERP) for a company to manage the information exchange for internal use and with external partners. It should be online. What technology should I use, I have checked framewroks like: Flex, Silverlight, Google/GWT, sencha (ExtJS), jQuery, DoJo, Telereik, Infrajistics and others similar. But they seam to be very low level programming. May be this is advantage for other projects, where you need more flexibility, but this project is stright forward. I need something more focused on business software (tables, forms, processes) where and eventually more efficient with less coding, or something I can save time. Is force.com an option? But I can not install this on the customer's servers... Do you have any ideas for me for a web based framework focused on business applications?

    Read the article

  • How do I format a String in an email so Outlook will print the line breaks?

    - by MattGrommes
    I'm trying to send an email in Java but when I read the body of the email in Outlook, it's gotten rid of all my linebreaks. I'm putting \n at the ends of the lines but is there something special I need to do other than that? The receivers are always going to be using Outlook. I found a page on microsoft.com that says there's a 'Remove line breaks' "feature" in Outlook so does this mean there's no solution to get around that other than un-checking that setting? Thanks

    Read the article

  • Shopping Cart Database Structure

    - by Paul Atkins
    Hi, I have been studying the database structure for shopping carts and notice that when storing order details the product information is repeated and stored again in the table. I was wondering what the reasoning behind this would be? Here is a small example of what i mean: Product Table product_id name desc price 1 product 1 This is product 1 27.00 Order Table order_id customer id order_total 1 3 34.99 Order Details Table order_details_id product_id product name price qty 1 1 product 1 27.00 1 So as you can see the product name and price are stored again in the order details table. Why is this? The only reason i can think of is because the product details may change after the order has been placed which may cause confusion. Is this correct? Thanks Paul

    Read the article

  • Securely erasing a file using simple methods?

    - by Jason
    Hello, I am using C# .NET Framework 2.0. I have a question relating to file shredding. My target operating systems are Windows 7, Windows Vista, and Windows XP. Possibly Windows Server 2003 or 2008 but I'm guessing they should be the same as the first three. My goal is to securely erase a file. I don't believe using File.Delete is secure at all. I read somewhere that the operating system simply marks the raw hard-disk data for deletion when you delete a file - the data is not erased at all. That's why there exists so many working methods to recover supposedly "deleted" files. I also read, that's why it's much more useful to overwrite the file, because then the data on disk actually has to be changed. Is this true? Is this generally what's needed? If so, I believe I can simply write the file full of 1's and 0's a few times. I've read: http://www.codeproject.com/KB/files/NShred.aspx http://blogs.computerworld.com/node/5756 http://blogs.computerworld.com/node/5687 http://stackoverflow.com/questions/4147775/securely-deleting-a-file-in-c-net

    Read the article

  • Azure - Microsoft.IdentityModel not found

    - by Andy
    Hi There, I'm working with a WCF service in Azure, which uses Windows Live ID authentication with the recent deviceid requirements. When I host my WCF service locally in the compute emulator, it works properly, but when I deploy the cloud service to Azure and call it the same way (from another project that uses the WCF service as a service reference), I get the error: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. I found this post : http://social.msdn.microsoft.com/Forums/en-US/netservices/thread/cd139b5c-ad12-4298-af2f-1b2d0136a977 But there are a few problems: 1. I don't seem to have access to Microsoft.IdentityModel, only System.IdentityModel. I'm not sure why it's searching for something in 3.5 at all, as I'm building in .NET 4.0. 2. When I choose to "copy to local" on System.IdentityModel, it doesn't change anything. Any help? I would appreciate it! Best Regards, Andy

    Read the article

  • What is the time taken by java to call a method in another package?

    - by satish
    I have an assignment where i need to do feasibility study on two of my approaches and find optimized one. There are two packages A and B User input is gathered in A and then sent to B for execution. Now my approaches are 1. Call B methods from package A one by one. 2. Create a common method in B and send all the input as parameters. Which is feasible and best one, I know 2 is good in terms of code optimization and less number of calls. But, I want to understand what will be the execution time difference in above approaches How much time does java take to call method in another package? Is there any default value like x nano seconds or y milli seconds. Based on the time taken I can choose the appropiate one. Thanks

    Read the article

  • How to inflate a view in a determined position?

    - by Tivie
    I have an activity with an "Add" and a "Delete" button. The "Add Button" inflates a view, the "Delete Button" removes a selected View. When I inflate a view with the "Add Button", it is automatically drawn below any previously infalted view. I would like to give the user the possibility to move each inflated view up and down, so he could change the order they are show in screen (in a drag'n'drop kind of effect) +---------------------+ +---------------------+ | +-----------------+ | | +-----------------+ | | | View 1 | | | | View 2 | | | +-----------------+ | | +-----------------+ | | | --> | | | +-----------------+ | | +-----------------+ | | | View 2 | | | | View 1 | | | +-----------------+ | | +-----------------+ | +---------------------+ +---------------------+ Is it possible to specify the "position" in which each view is inflated? (for instance, below or above the currently selected view?) If not, what is the best way to accomplish the desired effect? (feel free to ask for any piece of code, if you think it might help)

    Read the article

  • here is my code for spinner with dropdownlist:

    - by user555910
    I have spinner in my application .The spinner have drop down list.I want to take the value of the dropdown list from the database .how can i do this ? here is my code for spinner with dropdownlist: ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, selectdefault); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter);

    Read the article

  • Using Kal calendar without doing the initialization (and so on) in the AppDelegate

    - by testing
    I'm using the Kal calendar. For the code shown below I'm referring to the Holiday example. In this example the allocation and initialization of Kal is done in the applicationDidFinishLaunching in the AppDelegate. The UITableViewDelegate protocol (e.g. didSelectRowAtIndexPath) is also positioned in the AppDelegate class. The AppDelegate: #import "HolidayAppDelegate.h" #import "HolidaySqliteDataSource.h" #import "HolidaysDetailViewController.h" ## Heading ###import "Kal.h" @implementation HolidayAppDelegate @synthesize window; - (void)applicationDidFinishLaunching:(UIApplication *)application { kal = [[KalViewController alloc] init]; kal.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Today" style:UIBarButtonItemStyleBordered target:self action:@selector(showAndSelectToday)] autorelease]; kal.delegate = self; dataSource = [[HolidaySqliteDataSource alloc] init]; kal.dataSource = dataSource; // Setup the navigation stack and display it. navController = [[UINavigationController alloc] initWithRootViewController:kal]; [window addSubview:navController.view]; [window makeKeyAndVisible]; } // Action handler for the navigation bar's right bar button item. - (void)showAndSelectToday { [kal showAndSelectDate:[NSDate date]]; } #pragma mark UITableViewDelegate protocol conformance // Display a details screen for the selected holiday/row. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Holiday *holiday = [dataSource holidayAtIndexPath:indexPath]; HolidaysDetailViewController *vc = [[[HolidaysDetailViewController alloc] initWithHoliday:holiday] autorelease]; [navController pushViewController:vc animated:YES]; } #pragma mark - - (void)dealloc { [kal release]; [dataSource release]; [window release]; [navController release]; [super dealloc]; } @end I don't want to put this into the AppDelegate, because there could be some overlapping code with other views. It should be a separate "component" which I can call and put on the stack. In my navigation based project I have a main view, the RootViewController. From there I want to push the Kal view on the stack. Currently I'm pushing an additional ViewController on the stack. In the viewWillAppear method from this ViewController I do the things shown in the code above. The following problems appear: Navigation back has to be done two times (one for the Kal calendar, one for my created view) Navigation to my main view is not possible anymore In the moment I don't know where to put this code. So the question is where to put the methods for allocation/initialization as well as the methods for the UITableViewDelegate protocol.

    Read the article

  • Help - Getting wrong orientation

    - by barbgal
    Hi all, I am having one issue in my application which drives me mad... In my application, i rotate the simulator to the landscape mode but in my below function i get portrait orientation... what is the problem here. Pls help me out -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ( interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ) { NSLog(@" portrait orientation"); } else { NSLog(@"Landscape"); } }

    Read the article

  • Integer variables at WIX

    - by Hila
    I would like to install a feature according to the brand. So in my brand.wxi I defined: <?define brand.FeatureLevel = 1 ?> And in my wxs I wrote: <Feature Id="FF" Title="FF" Level="$(var.brand.FeatureLevel)"> <ComponentRef Id="..." /> <ComponentRef Id="..." /> </Feature> This definition works fine (wheather I've placed 0 or 1 as FeatureLevel). My only problem is a warning I get at compilation time: The 'Level' attribute is invalid - The value '$(var.brand.FeatureLevel)' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:integer' - The string '$(var.brand.FeatureLevel)' is not a valid Integer value. Is there a way to fix this warning? Can I define integer variable? I couldn't find a way...

    Read the article

  • Can't access dynamically generated div with Jquery

    - by Bug Magnet
    Still trying to get my head around JQuery and dynamically generated content. I have the following code that is dynamically generated with JQuery whenever a user clicks on an 'Add' button: <div id="practices_div" style="border-top: 1px dotted gray"> <br/> <a href="#" class="remove_link" rel="practices_div">Remove</a> ....content goes here </div> The JQuery code that dynamically loads the above content is as follows: $.ajax({ url: '/addAjax.html', success: function(response) { $('#container').append(response); } }); What I'm trying to do is when a user clicks on the Remove link, JQuery should hide and delete the dynamically generated content from the page. The code that does this is as follows: $('.remove_link').live('click', function() { if (confirm("Remove this item?")) { $('#practices_div').fadeOut('medium', function() { $(this).remove(); }); } return false; }); So, when the content is dynamically loaded via Ajax, and I click on the Remove link, the Confirmation dialogue box is displayed and if I confirm, nothing happens. For some reason, JQuery is not able find the dynamically generated #practices_div. Any idea what I may be doing wrong?

    Read the article

  • h2 & linux. how to start the database?

    - by David
    sorry im rather new to linux ubuntu. i have an application that i made that runs with tomcat and connects to an h2 database. it all works fine on my windows laptop. im now moving it onto my linux computer to run all the time. but im having trouble with starting the database. i have downloaded h2 from their website. and its sitting on my desktop. the question is. how to start the database. and is their any other commands i need to know to run and operate it. thankyous

    Read the article

  • Does this game have a solution

    - by Bragboy
    Hi, I am developing a simple game using Java swing. I want to know whether this particular game has a solution in the following scenario. If I am convinced that theoretically a solution cannot be arrived at this point, I will throw a notification to the user. 3x3 4x4 The objective of this game is to fill numbers from 1 to 8 (or 1 to 15) using the one space available to push the numbers to that empty space. Every time I end up with the combination shown above. I just want to convince myself that there is no way to attain the proper solution from the above scenario. Please help. EDIT : Solution has been posted at here and here

    Read the article

  • JQuery val() does not work for textarea in Opera

    - by Anil Soman
    I am displaying a modal dialog using jQuery. This dialog has a textarea control on it. But on submitting this dialog, the value of this textarea is not recognized by jQyery for some reason. It always comes blank. This works perfectly in other browsers. I put alert to display the value but it looks blank. Can anybody help me in this regards? Controls <input type="text" id="txtGroupName"/> <textarea rows="3" cols="30" id="txtDescription"></textarea> jQuery code which used this value var postData = new Object(); postData.GroupName = $('#txtGroupName').val(); postData.Description = $('#txtDescription').val(); $('#txtDescription').val() comes blank but $('#txtGroupName').val() is read correctly as it is a input field. One more finding about this issue: When I put alert in my update function after populating the control value on page load, this alert displays the existing value properly. But it displays only existing value. It does not display the edited value after submitting the modal box.

    Read the article

  • whatz wrong in this SELECt query of MSSQL... ?

    - by user522211
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") Dim cmdSelect As New System.Data.SqlClient.SqlCommand("SELECT * FROM Table1 WHERE Date =" & TextBox1.Text & "'", SQLData) SQLData.Open() Dim dtrReader As System.Data.SqlClient.SqlDataReader = cmdSelect.ExecuteReader() While dtrReader.Read() For j As Integer = 1 To 31 Dim s As String = "s" & j If dtrReader(s.ToString()).ToString() = "b" Then Dim img As ImageButton = DirectCast(Panel1.FindControl(s.ToString()), ImageButton) img.ImageUrl = "~/Images/booked.gif" img.Enabled = False End If Next End While dtrReader.Close() SQLData.Close() End Sub SHOWS AN ERROR : Unclosed quotation mark after the character string ''.

    Read the article

  • GDD-BR 2010 [0H] OpenID-based single sign-on and OAuth data access

    GDD-BR 2010 [0H] OpenID-based single sign-on and OAuth data access Speaker: Ryan Boyd Track: Chrome and HTML5 Time slot: H[17:20 - 18:05] Room: 0 A discussion of all the auth tangles you've encountered so far -- OpenID, SSO, 2-Legged OAuth, 3-Legged OAuth, and Hybrid OAuth. We'll show you when and where to use them, and explain how they all integrate with Google APIs and other developer products. From: GoogleDevelopers Views: 11 0 ratings Time: 41:24 More in Science & Technology

    Read the article

  • GDD-BR 2010 [1D] Tim Bray - Android Ecosystem and What's New

    GDD-BR 2010 [1D] Tim Bray - Android Ecosystem and What's New Speaker: Tim Bray Track: Android Time slot: D[13:50 - 14:35] Room: 1 Level: 101 This talk combines an introduction to the Android ecosystem with a description of what's new in it. The ecosystem includes the technology, developer community, Android Market, and of course the huge population of Android users. From: GoogleDevelopers Views: 25 1 ratings Time: 41:40 More in Science & Technology

    Read the article

  • Strange 401 (Unauthorized) when calling a WCF Service

    - by mipsen
    A WCF Service we call from BizTalk using WCF BasicHTTP usually works fine but all of a sudden it started returning 401 errors for some calls while others continued working as expected so it could not have been a "real" 401. The difference was the size of the message. One parameter of the service is a rather complex object. In the cases we got a 401 it got quite big (containing a lot of customer-data), say 5 MB. So we turned on tracking. The messages we traced out where about 20MB. Not too big for WCF one should suppose... A bit of research led us to increasing maxItemsInObjectGraph in the behaviours but that did not help. The service we call is in the same network as we are and is a WCF service. So we tried changing from BasicHTTP to net.tcp and Bingo! Ok, we had to use CustomBinding in BizTalk to set all the Quotas, etc. but it worked in the end.

    Read the article

  • Swapping out a hardware firewall does the mac address get cached?

    - by Dan
    We need to replace a hardware firewall (cisco pix) and have a spare that we will use (temporarily). The firewall sits in front of a couple of web-servers colocated at a data-centre. The replacement will be configured with identical settings (external/internal IP addresses, configured ports etc.). When we swap the firewalls over, will this work immediately or will the old Pix's mac address be cached and the new firewall not be seen until the cache is cleared? (What is it though that is caching the address? Is it just the switch/router that our pix is connected to?) Reason for asking is a few years ago I had a smoothwall firewall in front of a lone server (the external IP of the smoothwall was also the external IP of the web-server). When I replaced the smoothwall with a pix, the IP address of the web-server stayed the same but it now had to be reached via the new firewall on a different IP. It took about 2-4 hours before the rest of the world could see that web-server again. I'm hoping for less downtime this time!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >