Daily Archives

Articles indexed Sunday September 23 2012

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

  • How to test that variable is not equal to multiple things? Python

    - by M830078h
    This is the piece of code I have: choice = "" while choice != "1" and choice != "2" and choice != "3": choice = raw_input("pick 1, 2 or 3") if choice == "1": print "1 it is!" elif choice == "2": print "2 it is!" elif choice == "3": print "3 it is!" else: print "You should choose 1, 2 or 3" While it works, I feel that it's really clumsy, specifically the while clause. What if I have more acceptable choices? Is there a better way to make the clause?

    Read the article

  • Rebuilding old (2010) django project in 2012

    - by birgit
    I am trying to make an old Django project run again. After seemingly having solved issues with old sorl.thumbnail versions and deprecated expressions I now get this error when running python manage.py runserver I also tried to copy & paste my old files into a new Django project and get the exactly same error. Maybe someone here has a clue where the problem lies? Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x2a80510>> Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 88, in inner_run self.validate(display_num_errors=True) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "/usr/lib/python2.7/dist-packages/django/core/management/validation.py", line 35, in get_validation_errors for (app_name, error) in get_app_errors().items(): File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 146, in get_app_errors self._populate() File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 61, in _populate self.load_app(app_name, True) File "/usr/lib/python2.7/dist-packages/django/db/models/loading.py", line 78, in load_app models = import_module('.models', app_name) File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/me/Documents/wdws/wdws/../wdws/cityofwindows/models.py", line 73, in <module> class Image(models.Model): File "/home/me/Documents/wdws/wdws/../wdws/cityofwindows/models.py", line 83, in Image 'large': {'size': (640, 640)}, File "/usr/lib/python2.7/dist-packages/django/db/models/fields/files.py", line 233, in __init__ super(FileField, self).__init__(verbose_name, name, **kwargs) TypeError: __init__() got an unexpected keyword argument 'extra_thumbnails' I need to re-build the project just for visual documentation locally... so also any hints on how to quickly re-run outdated django-projects are very welcome!! Thanks a lot (using Ubuntu 12.04)

    Read the article

  • htaccess to change url

    - by Guo Hong Lim
    I have the following code in my .htacess but it didn't work right. Is it because mod-rewrite is no "on", if so, how can i check? Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\$ $1.php [nc] I wanted to rename my address, example: http://www.abc.com - http://www.abc.com http://abc.com - http://www.abc.com http://www.abc.com/123.html - http://www.abc.com/123 http://www.abc.com/12-12-12.html - http://www.abc.com/12-12-12 http://subdomain.abc.com/123.html - http://subdomain.abc.com/123 Basically removing the extension and ensuring that its www is intact.

    Read the article

  • Am I using the getch() function from the ncurses library incorrectly?

    - by user1692446
    I am writing a Pacman game in c++ using the ncurses library, but I am not able to move the Pacman properly. I have used getch() to move it it up, down, left and right, but it only moves right and does not move anywhere else when I press any other key. This is a code snippet for moving up. I have written similar code with some conditions altered accordingly for moving left, right and down. int ch = getch(); if (ch == KEY_RIGHT) { int i,row,column; //getting position of cursor by getyx function for (i=column; i<=last_column; i+=2) { //time interval of 1 sec mvprintw(row,b,"<"); //print < in given (b,row) coordinates //time interval of 1 sec mvprintw(row,(b+1),"O"); //print "O" next to "<" int h = getch(); //to give the option for pressing another key if (h != KEY_RIGHT) //break current loop if another key is pressed { break; } } } if (condition) { //code to move left } Am I using getch() wrong, or is there something else I have to do?

    Read the article

  • Checkbox - in Javascript

    - by smiley
    I am working on Edit screen where I am pulling out value from db to check if the checkbox is checked or not. If it is unchecked, it should deselect the checkbox and other controls of this checkbox. In my case the js works perfectly fine. That is if my previous screen has checkbox unchecked, edit screen disables all the values for this checkbox. But it still shows the checkbox is checked in UI(though it is actually checked). Something is wrong with my html code. Can someone please let me know where /how should i modify to display if my checkbox is unchecked? <%chkStatus=list.getCheckbox(); if (chkStatus == null) { chkStatus = ""; } %> <input id="chkbox" type="checkbox" name="chkbox" checked="<%=chkStatus%>" onchange="javascript:enableDisableTextBox();">

    Read the article

  • setting mailx default smtp relay

    - by Arthur
    I heave searched Google for this and cannot seem to find a soloution I have bsd-mailx on my server and it sends mail just fine However I wished to have a development environment at home. I need mailx such that php can use its mail function. However the mail is failing to resolve the domain name @gmail.com I am aware that my ISP talk talk may be blocking this is they have a mail server smtp.talktalk.net I assume I would have to add somthing to /etc/mail.rc and use heirloom maEdit turned out I had a instance of send mail running that was doing weird things.. after killing ilx not bsd-mailx,,but would still need to set default smtp relay Im on ubuntu 12.4 thankyou Edit turned out I had a instance of send mail running that was doing weird things.. after killing that, I was able to add the smtp relay, but its now saying that the sender domain does not work. I assume this domain has to route back the the same machine the mail originated from. as i dont have a domain for my home address.

    Read the article

  • How to set SQL_BIG_SELECTS = 1 from VB(legacy ASP) with ADODB environment?

    - by conecon
    I encountered The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay error with my ASP code. ASP code has server side ADODB connection with MySQL and connection seems not be able to execute multiple query. How to implement SQL_BIG_SELECTS = 1 in my code? Set obj_db = Server.CreateObject("ADODB.Connection") Session("ConnectionString") = "dsn=dsn1016189_mysql;uid=apns;pwd=mypassword;DATABASE=mydb;APP=ASP Script;STMT=SET CHARACTER SET SJIS" obj_db.Open Session("ConnectionString") Set obj_ret = Server.CreateObject("ADODB.Recordset") obj_ret.CursorLocation = 3 and executing SQL... SQL_BIG_SELECTS = 1; SELECT pu.login_id, pu.p_login_id, pu.first_name, pu.last_name, pu.sex, pu.is_admin, pu.attendance, pu.invited, pu.reason, qaa1.answer AS qaa1_answer, COUNT(pu2.p_login_id) AS companion FROM party_user pu LEFT OUTER JOIN party_user pu2 ON pu2.p_login_id = pu.login_id LEFT OUTER JOIN qa_answer qaa1 ON qaa1.login_id = pu.login_id AND qaa1.party_id = pu.party_id AND qaa1.sort_num = '1' WHERE pu.party_id = '92' AND pu.p_login_id = '' GROUP BY pu.login_id, pu.p_login_id, pu.first_name, pu.last_name, pu.sex, pu.is_admin, pu.attendance, pu.reason, qaa1.answer, pu.invited ORDER BY pu.login_id ASC; I can't execute multiple query and above query become error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT pu.login_id, pu.p_login_id, pu.first_name, pu.last_name, pu.sex, pu.is_ad' at line 1

    Read the article

  • Are xlrd and xlwt compatible?

    - by Leo
    I'm trying to create a workbook with python and I need to test the values of different cells to fill it but I'm having some troubles. I use xlrd and xlwt to create and edit the excel file. I've made a little example of my problem and I don't understand why it's not working. import xlwt import xlrd wb = xlwt.Workbook() ws = wb.add_sheet('Test') ws.write(0,0,"ah") cell = ws.cell(0,0) # AttributeError: 'Worksheet' object has no attribute 'cell' print cell.value I had taken for granted that xlrd and xlwt have shared classes which can interact with each other but it doesn't seem to be the case. How do I get the cell value of an open Worksheet object?

    Read the article

  • doctrine2: many-to-one with non default referencedColumnName does not persist entity

    - by timaschew
    I'm using symfony 2.1.2 with FOSUserBundle. I extend the User from FOS and define a many-to-one (bidirectional) association to a Customer entity. I don't want to use primary key for the association (referencedColumnName). I will use another integer uniqe column: customer_no use FOS\UserBundle\Entity\User as BaseUser; /** * @ORM\Entity * @ORM\Table(name="t_myuser") */ class MyUser extends BaseUser { /** * @ORM\ManyToOne(targetEntity="Customer", inversedBy="user") * @ORM\JoinColumn(name="customer_no", referencedColumnName="customer_no", nullable=false) */ $public $customer; } /** * @ORM\Entity * @ORM\Table(name="t_customer") */ class Customer extends BaseEntity // provides an id (pk) { /** * @ORM\Column(type="integer", unique=true, nullable=false) */ public $customer_no; /** * @ORM\OneToMany(targetEntity="MyUser", mappedBy="customer") */ public $user; } When I try to persist (via a form) a new MyUser entity with an (already in db existing and) loaded Customer entity from db, I get this error: Notice: Undefined index: customer_no in ...\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 608 The schema on the db is all right. //update: I fix the inversedBy and mappedBy stuff, but this is not the problem.

    Read the article

  • eclipse - starting with android sdk

    - by dontHaveName
    I want start programming for android.. What I have: -Windows 7 -Eclipse Classic 4.2 -Downloaded all there required files - http://developer.android.com/sdk/installing/adding-packages.html -ADT Plugin I want install new ADT plugin.. at first I tried to download it from http://dl-ssl.google.com/android/eclipse, I add it, but if i selected it there is only "pending.." and nothing has load..(maybe internet connection?I have selected Native connection in preferences after pending it wrotes: Unable to connect to repository http://dl-ssl.google.com/android/eclipse/content.xml org.eclipse.equinox.p2.core.ProvidesException ) Thats why I download ADT plugin. So if I select downloaded ADT plugin - content of it load - developer tools and ndk plugin so I select all and click next. It loads and writes this: "Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 20.0.3.v201208082019-427395 (com.android.ide.eclipse.adt.feature.group 20.0.3.v201208082019-427395) Missing requirement: Android Development Tools 20.0.3.v201208082019-427395 (com.android.ide.eclipse.adt.feature.group 20.0.3.v201208082019-427395) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found" requires 'org.eclipse.wst.sse.core 0.0.0 this problem is shown here: http://developer.android.com/resources/faq/troubleshooting.html#installeclipsecomponents but there is solution only for version 3.3 and 3.4 (I have 4.2) anyway but I tried it- I look for updates but nothing were found I really dont know where could be problem.. Thanks for any answer. (sorry for my english) I will send 1€ to somebody who can solve my problem ;) (I think all problems all for internet connection but I cant set it..)

    Read the article

  • Java - understanding servlets

    - by Trup
    I am working on a homework project that should implement a board game between 2 clients over an HttpServlet. I have couple of questions: 1) I read that HttpServlets must be stateless, however, for the sake of the game, I have to keep a lot of state(whose turn it is, the state of the board, etc). Do I have to keep this in the clients? Does the HttpServlet indeed have to be stateless, i.e. have no fields that track state? 2) I know that the clients will talk to the servlet via the doGet/doPost methods, but how can the servlet talk to the clients(for example, if player 1 just made a move and sent it to the servlet, the servlet has to tell client 2 what the move was). Thank you Also, if you can point me to a useful, simple example of a similar code online, I would be very grateful

    Read the article

  • Logical file not working for SUBFILE/SETLL?

    - by user1516536
    I'm using three logical file with different Record Format where on the first subfile I'm using LF1 and LF2 where on the first subfile I cannot use *LOVAL SETLL it will give me Run Time Error. not sure why? then the program will lead me to second subfile and I'm using LF3 it seems fine. but then If I back to first subfile the subfile turn to blanks.???? why? this my subroutine for building my subfile: C CLRSR BEGSR C EVAL *IN55='0' C WRITE USQLSCTL C EVAL *IN55='1' C ENDSR C* C*BUILDING SUBFILE C BLDSR BEGSR C *LOVAL SETLL USRLGX C EVAL RECNO=0 C EXSR TMISR1 C EXSR REDSR1 C DOW NOT %EOF C IF USRID<>IDD C EXSR MVESR C EXSR DIMSR C MOVE USRID IDD C EVAL RECNO=RECNO+1 C WRITE USQLS C ENDIF C EXSR TMISR1 C EXSR REDSR1 C ENDDO C ENDSR and the related subroutine C TMISR1 BEGSR C READ USRLGX C MOVE USRTI MINTI C ENDSR C REDSR1 BEGSR C READ USRLG C MOVE USRTO MAXTO C ENDSR 6 n the LF I used is USRLG and USRLGX. where both LF refer to the same record format. but each LF has different sorted order. *record format has been RENAME on F-Spec I have this two problem which is: I only can use *LOVAL setll logical-file once only. n the result for coding above sometime it will give result for UserTimeIn some time it equals to blanks.(000000)

    Read the article

  • Magento data-install script

    - by Vladimir Kerkhoff
    I'm trying to build a data install script that I use to setup a new webstore. This script creates the categories, pages and static blocks and default settings for the specific shop (we use a multistore setup to host the shops). In our dev/staging setup this scripts runs great and all categories are build without any problem. But on our live system this script fails. After some debugging I found the difference is in the Flat catalog usage on the live systems. The problem with creating the category with the flat tables enabled is in getting the parent path information based on the parentId given: $parentCategory = Mage::getModel('catalog/category')->load($parentId); Without flat categories enabled this gives a correct parentCategory, but with flat categories enabled it gives an empty object. Why is this behaviour with flat categories enabled?

    Read the article

  • Jboss AS 7 - Dependency Injection

    - by Nic Willemse
    Im attempting to make use of dependency injection in Jboss AS 7 and im having huge difficulties. I have setup a EAR which contains both a EJB jar and a war. The war contains a richfaces web app. Im attempting to inject an EJB from the ejb jar into a faces managed bean with the code below : public class UserController { @EJB(mappedName="UserService") private UserFacadeService userService; public String getService(){ if(userService == null){ however when i deploy jboss puts the error in the console : rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".component.\"managed-bean.za.co.gbj.UserController\".START missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\" ]","jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".jndiDependencyService missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\" ]","jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\".jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".2 missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".env/UserService ]"]} 09:03:50,576 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "GoodByeJohnEAR.ear" 09:03:50,670 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "GoodByeJohnWeb-1.0-SNAPSHOT.war" 09:03:50,670 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "GoodByeJohnEJB-1.0-SNAPSHOT.jar" 09:03:51,367 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-2) Encountered invalid class name "com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor" for service type "com.sun.faces.spi.injectionprovider" 09:03:51,367 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-2) Encountered invalid class name "com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection" for service type "com.sun.faces.spi.injectionprovider" 09:03:51,375 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named UserFacadeBean in deployment unit subdeployment "GoodByeJohnEJB-1.0-SNAPSHOT.jar" of deployment "GoodByeJohnEAR.ear" are as follows: java:global/GoodByeJohnEAR/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService java:app/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService java:module/UserFacadeBean!za.co.gbj.UserFacadeService java:global/GoodByeJohnEAR/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean java:app/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean java:module/UserFacadeBean 09:03:51,406 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named UserFacadeBean in deployment unit subdeployment "GoodByeJohnWeb-1.0-SNAPSHOT.war" of deployment "GoodByeJohnEAR.ear" are as follows: java:global/GoodByeJohnEAR/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService java:app/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService java:module/UserFacadeBean!za.co.gbj.UserFacadeService java:global/GoodByeJohnEAR/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean java:app/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean java:module/UserFacadeBean 09:03:51,577 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) Service status report New missing/unsatisfied dependencies: service jboss.naming.context.java.module.GoodByeJohnEAR."GoodByeJohnWeb-1.0-SNAPSHOT".env/UserService (missing) service jboss.naming.context.java.module.GoodByeJohnEAR."GoodByeJohnWeb-1.0-SNAPSHOT"."env/za.co.gbj.UserController/userService" (missing) Please assist!

    Read the article

  • Python: why can't descriptors be instance variables?

    - by Continuation
    Say I define this descriptor: class MyDescriptor(object): def __get__(self, instance, owner): return self._value def __set__(self, instance, value): self._value = value def __delete__(self, instance): del(self._value) And I use it in this: class MyClass1(object): value = MyDescriptor() >>> m1 = MyClass1() >>> m1.value = 1 >>> m2 = MyClass1() >>> m2.value = 2 >>> m1.value 2 So value is a class attribute and is shared by all instances. Now if I define this: class MyClass2(object) value = 1 >>> y1 = MyClass2() >>> y1.value=1 >>> y2 = MyClass2() >>> y2.value=2 >>> y1.value 1 In this case value is an instance attribute and is not shared by the instances. Why is it that when value is a descriptor it can only be a class attribute, but when value is a simple integer it becomes an instance attribute?

    Read the article

  • Pop-Up Window at inital start up, of android application

    - by Josh Fairbank
    I am trying to find a code that will do a popup at the initial start up on an installed app. Much like a changelog that is starting to appear in more and more apps. I have found some similar codes, but being a beginner I haven't been able to figure out where to exactly put the code in and I always have tons of errors that still do not work once I try and fix them. I am working in Eclipse with an android project, and I'm using a webview to show a website. XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_height="fill_parent" android:layout_width="fill_parent" android:scrollbarAlwaysDrawVerticalTrack="false"/> </LinearLayout> Java File: package com.A2Ddesigners.WhatThe; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; import android.view.KeyEvent; public class Whatthe extends Activity { WebView webview; /** Called when the activity is first created. */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) { webview.goBack(); return true; } return super.onKeyDown(keyCode, event); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview = (WebView) findViewById(R.id.webview); webview.setWebViewClient(new HelloWebViewClient()); webview.getSettings().setJavaScriptEnabled(true); webview.setInitialScale(50); webview.getSettings().setUseWideViewPort(true); webview.loadUrl("http://mdsitest2.com/"); } private class HelloWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } }

    Read the article

  • Transport Security with Certificate Authentication

    - by Brian T
    I'm getting the following error when I access my webservice localhost/MyService/MyService.svc The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'Ssl, SslNegotiateCert'. I've following the web.config examples as specified in http://msdn.microsoft.com/en-us/library/ms731074.aspx Here is my wcf server web.config: <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings /> <system.web> <identity impersonate="false" /> <roleManager enabled="true" /> <authentication mode="Windows" /> <customErrors mode="Off" /> <webServices> <protocols> <add name="HttpGet" /> <add name="HttpPost" /> </protocols> </webServices> </system.web> <system.webServer> <directoryBrowse enabled="true" /> <validation validateIntegratedModeConfiguration="false" /> <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" users="*" roles="" /> </authorization> </security> </system.webServer> <system.serviceModel> <services> <service name="AspNetSqlProviderService" behaviorConfiguration="MyServiceBehavior"> <endpoint binding="wsHttpBinding" contract="Interface1" bindingConfiguration="CertificateWithTransportWSHttpBinding" /> <endpoint binding="wsHttpBinding" contract="Interface2" bindingConfiguration="CertificateWithTransportWSHttpBinding" /> <endpoint address="mex" binding="wsHttpBinding" bindingConfiguration="CertificateWithTransportWSHttpBinding" name="Metadata_Exchange" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="MyServiceBehavior"> <serviceDebug includeExceptionDetailInFaults="True" /> <serviceMetadata /> <serviceCredentials> <clientCertificate> <authentication trustedStoreLocation="LocalMachine" revocationMode="Online"/> </clientCertificate> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> <bindings> <wsHttpBinding> <binding name="CertificateWithTransportWSHttpBinding"> <security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> </binding> </wsHttpBinding> </bindings> </system.serviceModel> </configuration> I've configured IIS as follows: https binding added using self signed certificate Under SSL settings, require SSL and accept client certificates is checked The self signed certificate has been added to the Local Computer Trusted Root CA. I can browse and execute the .asmx service definition, but the .svc gives me the error described above.

    Read the article

  • .net user control event handler lost on postback

    - by user154008
    I have a menu usercontrol called LeftMenu that has a bulletedlist of linkitems. It's on the ascx page as such: <asp:BulletedList ID="PublisherList" DisplayMode="LinkButton" OnClick="PublisherList_Click" cssClass="Menu" runat="server"></asp:BulletedList> I databind the list in the page_load under if(!isPostBack) I'm having an issue on a page that loads the control. When the page first loads, the event handler fires. However, when the page posts back it no longer fires and in IE8, when I'm debugging, I get "Microsoft JScript runtime error: Object expected" in Visual Studio pointing at "doPostBack('LeftMenu$PublisherList','0')." In FF I don't get the error, but nothing happens. I'm **not loading the control dynamically, it's loaded on the aspx page using: <%@ Register TagPrefix="Standards" TagName="LeftMenu" Src="LeftMenu.ascx" %> <Standards:LeftMenu ID="LeftMenu" runat="server"/> Any ideas of where I'm losing the event handler? I just realized this is happening on another user control I have as well. A text box and a button and I'm using the default button to make sure pressing the enter key uses that button. .Net converts that in the html to: <div id="SearchBarInclude_SearchBar" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'SearchBarInclude_QuickSearchButton')"> so as soon as i enter a key in the box I get a javascript error at the line saying "object expected." It seems like the two issues are related. Edit Again: I think I need to clarify. It's not that I'm clicking on the menu item and it can't find the selected item on postback. I have this search page with the left navigation on it and then the main content of the page is something that causes a postback. Everything is fine with this postback. Once that page has been posted back, now if I click on the bulleted list in the left navigation I get a javascript error and it fails. The page_init for the LeftMenu control is never called.

    Read the article

  • Real World Nuget

    - by JoshReuben
    Why Nuget A higher level of granularity for managing references When you have solutions of many projects that depend on solutions of many projects etc à escape from Solution Hell. Links · Using A GUI (Package Explorer) to build packages - http://docs.nuget.org/docs/creating-packages/using-a-gui-to-build-packages · Creating a Nuspec File - http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcnuget_topic2.aspx · consuming a Nuget Package - http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcnuget_topic3 · Nuspec reference - http://docs.nuget.org/docs/reference/nuspec-reference · updating packages - http://nuget.codeplex.com/wikipage?title=Updating%20All%20Packages · versioning - http://docs.nuget.org/docs/reference/versioning POC Folder Structure POC Setup Steps · Install package explorer · Source o Create a source solution – configure output directory for projects (Project > Properties > Build > Output Path) · Package o Add assemblies to package from output directory (D&D)- add net folder o File > Export – save .nuspec files and lib contents <?xml version="1.0" encoding="utf-16"?> <package > <metadata> <id>MyPackage</id> <version>1.0.0.3</version> <title /> <authors>josh-r</authors> <owners /> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>My package description.</description> <summary /> </metadata> </package> o File > Save – saves .nupkg file · Create Target Solution o In Tools > Options: Configure package source & Add package Select projects: Output from package manager (powershell console) ------- Installing...MyPackage 1.0.0 ------- Added file 'NugetSource.AssemblyA.dll' to folder 'MyPackage.1.0.0\lib'. Added file 'NugetSource.AssemblyA.pdb' to folder 'MyPackage.1.0.0\lib'. Added file 'NugetSource.AssemblyB.dll' to folder 'MyPackage.1.0.0\lib'. Added file 'NugetSource.AssemblyB.pdb' to folder 'MyPackage.1.0.0\lib'. Added file 'MyPackage.1.0.0.nupkg' to folder 'MyPackage.1.0.0'. Successfully installed 'MyPackage 1.0.0'. Added reference 'NugetSource.AssemblyA' to project 'AssemblyX' Added reference 'NugetSource.AssemblyB' to project 'AssemblyX' Added file 'packages.config'. Added file 'packages.config' to project 'AssemblyX' Added file 'repositories.config'. Successfully added 'MyPackage 1.0.0' to AssemblyX. ============================== o Packages folder created at solution level o Packages.config file generated in each project: <?xml version="1.0" encoding="utf-8"?> <packages>   <package id="MyPackage" version="1.0.0" targetFramework="net40" /> </packages> A local Packages folder is created for package versions installed: Each folder contains the downloaded .nupkg file and its unpacked contents – eg of dlls that the project references Note: this folder is not checked in UpdatePackages o Configure Package Manager to automatically check for updates o Browse packages - It automatically picked up the updates Update Procedure · Modify source · Change source version in assembly info · Build source · Open last package in package explorer · Increment package version number and re-add assemblies · Save package with new version number and export its definition · In target solution – Tools > Manage Nuget Packages – click on All to trigger refresh , then click on recent packages to see updates · If problematic, delete packages folder Versioning uninstall-package mypackage install-package mypackage –version 1.0.0.3 uninstall-package mypackage install-package mypackage –version 1.0.0.4 Dependencies · <?xml version="1.0" encoding="utf-16"?> <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> <metadata> <id>MyDependentPackage</id> <version>1.0.0</version> <title /> <authors>josh-r</authors> <owners /> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>My package description.</description> <dependencies> <group targetFramework=".NETFramework4.0"> <dependency id="MyPackage" version="1.0.0.4" /> </group> </dependencies> </metadata> </package> Using NuGet without committing packages to source control http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages Right click on the Solution node in Solution Explorer and select Enable NuGet Package Restore. — Recall that packages folder is not part of solution If you get downloading package ‘Nuget.build’ failed, config proxy to support certificate for https://nuget.org/api/v2/ & allow unrestricted access to packages.nuget.org To test connectivity: get-package –listavailable To test Nuget Package Restore – delete packages folder and open vs as admin. In nugget msbuild: <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> TFSBuild Integration Modify Nuget.Targets file <RestorePackages Condition="  '$(RestorePackages)' == '' "> True </RestorePackages> … <PackageSource Include="\\IL-CV-004-W7D\Packages" /> Add System Environment variable EnableNuGetPackageRestore=true & restart the “visual studio team foundation build service host” service. Important: Ensure Network Service has access to Packages folder Nugetter TFS Build integration Add Nugetter build process templates to TFS source control For Build Controller - Specify location of custom assemblies Generate .nuspec file from Package Explorer: File > Export Edit the file elements – remove path info from src and target attributes <?xml version="1.0" encoding="utf-16"?> <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">     <metadata>         <id>Common</id>         <version>1.0.0</version>         <title />         <authors>josh-r</authors>         <owners />         <requireLicenseAcceptance>false</requireLicenseAcceptance>         <description>My package description.</description>         <dependencies>             <group targetFramework=".NETFramework3.5" />         </dependencies>     </metadata>     <files>         <file src="CommonTypes.dll" target="CommonTypes.dll" />         <file src="CommonTypes.pdb" target="CommonTypes.pdb" /> … Add .nuspec file to solution so that it is available for build: Dev\NovaNuget\Common\NuSpec\common.1.0.0.nuspec Add a Build Process Definition based on the Nugetter build process template: Configure the build process – specify: · .sln to build · Base path (output directory) · Nuget.exe file path · .nuspec file path Copy DLLs to a binary folder 1) Set copy local for an assembly reference to false 2)  MSBuild Copy Task – modify .csproj file: http://msdn.microsoft.com/en-us/library/3e54c37h.aspx <ItemGroup>     <MySourceFiles Include="$(MSBuildProjectDirectory)\..\SourceAssemblies\**\*.*" />   </ItemGroup>     <Target Name="BeforeBuild">     <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="bin\debug\SourceAssemblies" />   </Target> 3) Set Probing assembly search path from app.config - http://msdn.microsoft.com/en-us/library/823z9h8w(v=vs.80).aspx -                 <?xml version="1.0" encoding="utf-8" ?> <configuration>   <runtime>     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">       <probing privatePath="SourceAssemblies"/>     </assemblyBinding>   </runtime> </configuration> Forcing 'copy local = false' The following generic powershell script was added to the packages install.ps1: param($installPath, $toolsPath, $package, $project) if( $project.Object.Project.Name -ne "CopyPackages") { $asms = $package.AssemblyReferences | %{$_.Name} foreach ($reference in $project.Object.References) { if ($asms -contains $reference.Name + ".dll") { $reference.CopyLocal = $false; } } } An empty project named "CopyPackages" was added to the solution - it references all the packages and is the only one set to CopyLocal="true". No MSBuild knowledge required.

    Read the article

  • Improve file transfer speed between Windows PCs and servers

    - by Geotarget
    I've setup a server which I've connected to multiple PCs in my workplace. Sadly, data transfer speeds are at max 3 MB/sec per connection which works out slow for file transfers, especially when transferring large files. I'm using Windows filesharing and the server is a Windows Server 2008 (2 Ghz CPU, 1 GB RAM) and the client PCs mostly running Windows 7. How can I detect bottlenecks in my network and improve file sharing speed within the network?

    Read the article

  • Dediced server for all network functions?

    - by Alan
    I want to set up a fictional network configuration for a school in my neighborhood. They have about 50 computers altogether, 2X20 in computer rooms for students and another 10 scattered around for various professors. They should all access the internet through a dedicated Linux router machine. What they would like is to have domain names for those three computer groups. Lab1, Lab2 and Professors. The computers in Lab2 and Lab1 should have static ip and should all be named by numbers. So there should be 1@Lab1, 2@Lab1.... etc. And the Professors network should have a DHCP, with authentication. Is it an ok solution to have all these functions on a single server? (The one which will be used as a router) Do I have to set a local DNS for domain naming? Do the host names for Lab computers have to be set on the clients, or can they be automatically assigned?

    Read the article

  • "Windows Groups" missing from NAP Conditions

    - by Tim
    I am trying to configure a NAP policy for a 2008 R2 server running AD services. I have done this before and there is a condition for "Windows Groups". It is missing from the Conditions list, this time, though. I have registered NAP in AD I have restarted the NAP service I have rebooted I have removed the server as a NAP/IAS server in AD and re-registered I have removed the role and added it again I can't seem to find this in my googlings. Help is appreciated. Thanks.

    Read the article

  • Building \ installing PHP

    - by Jony
    I've followed this guide: http://www.phamviet.net/2012/06/03/centos-6-2-compile-php-5-4-2-from-source/ It all works as it should, but when I'm done and I type 'service httpd restart' following by 'php --version', it still displays the old 5.1.6 PHP version. This is 'uname -a' : Linux xxxxxx.com 2.6.32-042stab061.2 #1 SMP Fri Aug 24 09:07:21 MSK 2012 i686 i686 i386 GNU/Linux It's a VPS hosted in my main dedicated server (OpenVZ). Not sure what else to say, but I appreciate any help :) OS: CentOS 6

    Read the article

  • libsasl2 change paths

    - by mk_89
    I have been following the tutorial https://help.ubuntu.com/community/Postfix for installing Postfix on ubuntu. Im stuck at the Authenication section of the tutorial where you change paths to live in the false root, if you look at the link above I have a file (/etc/default/saslauthd) which is pretty much the same as the one from the tutorial. saslauthd # This needs to be uncommented before saslauthd will be run automatically START=yes PWDIR="/var/spool/postfix/var/run/saslauthd" PARAMS="-m ${PWDIR}" PIDFILE="${PWDIR}/saslauthd.pid" # You must specify the authentication mechanisms you wish to use. # This defaults to "pam" for PAM support, but may also include # "shadow" or "sasldb", like this: # MECHANISMS="pam shadow" MECHANISMS="pam" # Other options (default: -c) # See the saslauthd man page for information about these options. # # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd" # Note: See /usr/share/doc/sasl2-bin/README.Debian #OPTIONS="-c" #make sure you set the options here otherwise it ignores params above and will not work OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" When I run the following command in ubuntu dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd I get the following error dpkg-statoverride: warning: An override for '/var/spool/postfix/var/run/saslauthd' already exists, but --force specified so will be ignored. dpkg-statoverride: warning: --update given but /var/spool/postfix/var/run/saslauthd does not exist I don't why this is happening, I literally followed the tutorial step by step and have installed all the packages necessary, what could be the problem? do I have to manually create

    Read the article

  • Too Many Files In Debian Linux Folder?

    - by Dave Potts
    I've been using an external USB drive on a Debian server for backup. The drive is formatted as NTFS and mounted with ntsfmount. This was working fine, but I was filling up a directory with lots of files. Eventually the backup failed. When I then tried to look at the directory using ls it reported: ls: reading directory .: Numerical result out of range Looking in syslog, I also saw this: Sep 23 07:35:31 tosh ntfsmount[28040]: Failed to read index block: Numerical result out of range. Is this simply that I've reached the upper limit of number of files in a directory? If so, is there any way to extend the number of allowed files?

    Read the article

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