Search Results

Search found 6488 results on 260 pages for 'global thermonuclear war'.

Page 35/260 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Using installshield to replace a same-versioned DLL in the GAC

    - by Kevin
    We recently put out an update of one of our apps with a "test" DLL from a third party. The third party does not update their assembly versions on the dll's, only the file versions, so multiple apps can reference different "versions" of it. However, the GAC still allows us to keep the newest version, because it also checks the file version which is always updated. What happened is we were not ready to release this DLL, but it got out there on some customer machines. I would like to put our current live version back out there, but it has an older file version (and the same assembly version) as the test DLL. We have multiple apps referencing this DLL, so I can't simply delete it and drop in the new one. Is there a way to replace the DLL in the GAC? I'm using installshield 2009. Perhaps some sort of custom action upon install?

    Read the article

  • In Objective C, is there a way to call reference a typdef enum from another class?

    - by Adrian Harris Crowne
    It is my understanding that typedef enums are globally scoped, but if I created an enum outside of the @interface of RandomViewController.h, I can't figure out how to access it from OtherViewController.m. Is there a way to do this? So... "RandomViewController.h" #import <UIKit/UIKit.h> typedef enum { EnumOne, EnumTwo }EnumType; @interface RandomViewController : UIViewController { } and then... "OtherViewController.m" -(void) checkArray{ BOOL inArray = [randomViewController checkArray:(EnumType)EnumOne]; }

    Read the article

  • stripping default.aspx and //www from the url

    - by b0x0rz
    the code to strip /Default.aspx and //www is not working (as expected): protected void Application_BeginRequest(object sender, EventArgs e) { HttpContext context = HttpContext.Current; string url = context.Request.RawUrl.ToString(); bool doRedirect = false; // remove > default.aspx if (url.EndsWith("/default.aspx", StringComparison.OrdinalIgnoreCase)) { url = url.Substring(0, url.Length - 12); doRedirect = true; } // remove > www if (url.Contains("//www")) { url = url.Replace("//www", "//"); doRedirect = true; } // redirect if necessary if (doRedirect) { context.Response.Redirect(url); } } it works usually, but when submitting a form (sign in for example) the code above INTERCEPTS the request and then does a redirect to the same page. example: try to arrive at page: ~/SignIn/Default.aspx the requests gets intercepted and fixed to: ~/SignIn/ fill the form, click sign in the current page url goes from: ~/SignIn/ to ~/SignIn/Default.aspx and gets fixed again, thus voiding the processing of the method SignIn (which would have redirected the browser to /SignIn/Success/) and the page is reloaded as ~/SignIn/ and no sign in was done. please help. not sure what / how to fix here. the main REQUIREMENT here is: remove /Default.aspx and //www from url's thnx

    Read the article

  • Can a war file be deployed on any server?

    - by Roshan
    Please pardon me if this question is silly. Suppose I develop a j2ee web application using srping framework and a MS SQL Server database, using a Webspphere application server. I later create a war file for this application. Can I deploy this war file on a tomcat server without any change in code? Or my question is can this be hosted by web hosting which provides only Tomcat servers? If yes, is there any change in code required? If it cannot be deployed, can you please suggest me what to do, because I havent developed any application on a tomcat server. All the applications that I have developed have been on Websphere App Server using RAD.

    Read the article

  • Python - question regarding the concurrent use of `multiprocess`.

    - by orokusaki
    I want to use Python's multiprocessing to do concurrent processing without using locks (locks to me are the opposite of multiprocessing) because I want to build up multiple reports from different resources at the exact same time during a web request (normally takes about 3 seconds but with multiprocessing I can do it in .5 seconds). My problem is that, if I expose such a feature to the web and get 10 users pulling the same report at the same time, I suddenly have 60 interpreters open at the same time (which would crash the system). Is this just the common sense result of using multiprocessing, or is there a trick to get around this potential nightmare? Thanks

    Read the article

  • Dynamic Variables Within Functions

    - by Ryan
    Why does this work: function myfunction($v) { $query = $v['host'] == '1'; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Whereas this script, which tries to accomplish the same thing with variables, does not? $column1 = 'host'; $value1 = 1; $query1 = '$v[\''.$column1.'\'] == '.$value1; function myfunction($v) { $query = $GLOBALS['query1']; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Any help would be great. Thanks!

    Read the article

  • To Search Only title tag for &raquo; using visual studio 2008

    - by Kuldeep Kumar
    i need to update only title tag of my website having around 3000 web pages. i have to replace » with Dash if it is present only in title tag. Please help if there is any way in visual studio 2008 to find a Standard HTML (DOM) Tag. i've done this using dreamweaver Advance text search. but on development machine, only visual studio 2008 is available.

    Read the article

  • access settings from whole jquery component

    - by Pacuraru Daniel
    I am trying to develop a jquery component for dialog modals and i dont know how to access the settings from all component functions. I need to access settings,zIndex from open function and it seems to not work. (function($) { var methods = { init: function(options) { var defaults = { bgClass: "fancy-dialog-bg", bgShow: null, zIndex: 100, show: null }; var settings = $.extend(defaults, options); return this.each(function() { var obj = $(this).hide().css("position", "fixed").css("z-index", settings.zIndex).css("left", "300px").css("top", "200px"); }); }, open: function() { // alert(settings.zIndex); not working var tes = $("<div></div>").css("backgroundColor", "#f00").css("position", "fixed").css("z-index", "99").css("width", "50%").css("height", "100%").css("left", "0").css("top", "0"); $('body').append(tes); var obj = $(this); obj.show(); }, close: function() { var obj = $(this); $("#fancy-dialog-bg-" + obj.attr('id')).remove(); obj.hide(); } }; $.fn.fancyDialog = function(method) { if (methods[method]) { return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if (typeof method === 'object' || !method) { return methods.init.apply(this, arguments); } else { $.error('Method ' + method + ' does not exist.'); } }; })(jQuery);

    Read the article

  • Java accessing variables using extends

    - by delo
    So here I have two classes: Customer Order Class and Confirmation Class. I want to access the data stored in LastNameTextField (Customer Order Class) and set it as the text for UserLastNameLabel (Confirmation Class) after clicking a "Submit" button. For some reason however, the output displays nothing. Snippet of my code: package customer_order; public class customer_order extends Frame{ private static final long serialVersionUID = 1L; private JPanel jPanel = null; private JLabel LastNameLabel = null; protected JTextField LastNameTextField = null; private JButton SubmitButton = null; public String s; public customer_order() { super(); initialize(); } private void initialize() { this.setSize(729, 400); this.setTitle("Customer Order"); this.add(getJPanel(), BorderLayout.CENTER); } /** * This method initializes LastNameTextField * * @return javax.swing.JTextField */ public JTextField getLastNameTextField() { if (LastNameTextField == null) { LastNameTextField = new JTextField(); LastNameTextField.setBounds(new Rectangle(120, 100, 164, 28)); LastNameTextField.setName("LastNameTextField"); } return LastNameTextField; } /** * This method initializes SubmitButton * * @return javax.swing.JButton */ private JButton getSubmitButton() { if (SubmitButton == null) { SubmitButton = new JButton(); SubmitButton.setBounds(new Rectangle(501, 225, 96, 29)); SubmitButton.setName("SubmitButton"); SubmitButton.setText("Submit"); SubmitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() //THE STRING I WANT s = LastNameTextField.getText(); java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new confirmation().setVisible(true); } }); } }); } return SubmitButton; } package customer_order; public class confirmation extends customer_order{ private static final long serialVersionUID = 1L; private JPanel jPanel = null; // @jve:decl-index=0:visual-constraint="58,9" private JLabel LastNameLabel = null; private JLabel UserLastNameLabel = null; // @jve:decl-index=0: /** * This method initializes frame * * @return java.awt.Frame */ public confirmation() { super(); initialize(); } private void initialize() { this.setSize(729, 400); this.setTitle("Confirmation"); this.add(getJPanel(), BorderLayout.CENTER); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { UserLastNameLabel = new JLabel(); UserLastNameLabel.setBounds(new Rectangle(121, 60, 167, 26)); //THE PROBLEM? UserLastNameLabel.setText(s); } return jPanel; }

    Read the article

  • Maven 2: How to package current project version in a WAR file?

    - by Tom van Zummeren
    I am using Maven 2 to build my Java project and I am looking for a way to present the current version number of the pom.xml to the user (using a Servlet or JSP for example). As far as I can see, the best way would be that Maven packages the version number as a text file into the WAR. This allows me to read the version from that file and present it the way I want. Does anyone know of a plugin that can do something like that for me? Maybe the WAR plugin can be configured to do so? Or maybe using some other approach all together?

    Read the article

  • Define variables outside the PHP class.

    - by Muhammad Sajid
    Hello, I m using zend. I want to define the below code outside the controller class & access in different Actions. $user = new Zend_Session_Namespace('user'); $logInArray = array(); $logInArray['userId'] = $user->userid; $logInArray['orgId'] = $user->authOrgId; class VerifierController extends SystemadminController { public function indexAction() { // action body print_r($logInArray); } } How it is possible.

    Read the article

  • Make a final call to the Database when user leaves website (ASPX)?

    - by Jisaak
    I have a system set up to lock certain content in a database table so only one user can edit that content at a time. Easy enough and that part is working fine. But now I'm at a road block of how to send a request to "unlock" the content. I have the stored procedure to unlock the content, but how/where would I call it when the user just closes their browser?

    Read the article

  • Passing variable from main to Async class

    - by Bigflow
    Somehow, I can't get this done. This is all what I tried till now: Main: private String myState; public String getState() { return myState; } public void setState(String s) { myState = s; } Async: Main appState = ((Main)getApplicationContext()); String state = appState.getState(); Error: No enclosing instance of the type Main is accessible in scope Tried with Helper(Globals) class. public class Globals extends Application{ private String test= "1"; } Main: private Globals mGlobals; mGlobals = new Globals(); mGlobals.test = "2"; //Do Async thing Async: private Globals mGlobals; mGlobals = new Globals(); print mGlobals.test; // (result is 1, should be 2) Also something else, but don't remember good. Tried alot of things (backspace and del buttons are over-used :p ) But I can't get everything working. Async class doesn't have an activity. Code pasted: http://pastebin.com/ikcsdL1p

    Read the article

  • Incorrect output on changing sequence of declarations

    - by max
    Writing C++ code to implement Sutherland-Hodgeman polygon clipping. This order of declaration of these 2 statements gives correct output, reverse does not. int numberOfVertices = 5; Point pointList[] = { {50,50}, {200,300}, {310,110}, {130,90}, {70,40} }; I am passing the polygon vertex set to clippers in order - LEFT, RIGHT, TOP, BOTTOM. The exact error which comes when the declarations are reversed is that the bottom clipper, produces an empty set of vertices so no polygon is displayed after clipping. Correct: Incorrent: Confirmed by outputting the number of vertices produced after each pass: Correct: Incorrect: What is the reason for this error? Code: #include <iostream> #include <GL/glut.h> #define MAXVERTICES 10 #define LEFT 0 #define RIGHT 1 #define TOP 2 #define BOTTOM 3 using namespace std; /* Clipping window */ struct Window { double xmin; double xmax; double ymin; double ymax; }; struct Point { double x; double y; }; /* If I interchange these two lines, the code doesn't work. */ /**************/ int numberOfVertices = 5; Point pointList[] = { {50,50}, {200,300}, {310,110}, {130,90}, {70,40} }; /**************/ const Window w = { 100, 400, 60, 200 }; /* Checks whether a point is inside or outside a window side */ int isInside(Point p, int side) { switch(side) { case LEFT: return p.x >= w.xmin; case RIGHT: return p.x <= w.xmax; case TOP: return p.y <= w.ymax; case BOTTOM: return p.y >= w.ymin; } } /* Calculates intersection of a segment and a window side */ Point intersection(Point p1, Point p2, int side) { Point temp; double slope, intercept; bool infinite; /* Find slope and intercept of segment, taking care of inf slope */ if(p2.x - p1.x != 0) { slope = (p2.y - p1.y) / (p2.x - p1.x); infinite = false; } else { infinite = true; } intercept = p1.y - p1.x * slope; /* Calculate intersections */ switch(side) { case LEFT: temp.x = w.xmin; temp.y = temp.x * slope + intercept; break; case RIGHT: temp.x = w.xmax; temp.y = temp.x * slope + intercept; break; case TOP: temp.y = w.ymax; temp.x = infinite ? p1.x : (temp.y - intercept) / slope; break; case BOTTOM: temp.y = w.ymin; temp.x = infinite ? p1.x : (temp.y - intercept) / slope; break; } return temp; } /* Clips polygon against a side, updating the point list (called once for each side) */ void clipAgainstSide(int sideToClip) { int i, j=0; Point s,p; Point outputList[MAXVERTICES]; /* Main algorithm */ s = pointList[numberOfVertices-1]; for(i=0 ; i<numberOfVertices ; i++) { p = pointList[i]; if(isInside(p, sideToClip)) { /* p inside */ if(!isInside(s, sideToClip)) { /* p inside, s outside */ outputList[j] = intersection(p, s, sideToClip); j++; } outputList[j] = p; j++; } else if(isInside(s, sideToClip)) { /* s inside, p outside */ outputList[j] = intersection(s, p, sideToClip); j++; } s = p; } /* Updating number of points and point list */ numberOfVertices = j; /* ERROR: In last call with BOTTOM argument, numberOfVertices becomes 0 */ /* all earlier 3 calls have correct output */ cout<<numberOfVertices<<endl; for(i=0 ; i<numberOfVertices ; i++) { pointList[i] = outputList[i]; } } void SutherlandHodgemanPolygonClip() { clipAgainstSide(LEFT); clipAgainstSide(RIGHT); clipAgainstSide(TOP); clipAgainstSide(BOTTOM); } void init() { glClearColor(1,1,1,0); glMatrixMode(GL_PROJECTION); gluOrtho2D(0,1000,0,500); } void display() { glClear(GL_COLOR_BUFFER_BIT); /* Displaying ORIGINAL box and polygon */ glColor3f(0,0,1); glBegin(GL_LINE_LOOP); glVertex2i(w.xmin, w.ymin); glVertex2i(w.xmin, w.ymax); glVertex2i(w.xmax, w.ymax); glVertex2i(w.xmax, w.ymin); glEnd(); glColor3f(1,0,0); glBegin(GL_LINE_LOOP); for(int i=0 ; i<numberOfVertices ; i++) { glVertex2i(pointList[i].x, pointList[i].y); } glEnd(); /* Clipping */ SutherlandHodgemanPolygonClip(); /* Displaying CLIPPED box and polygon, 500px right */ glColor3f(0,0,1); glBegin(GL_LINE_LOOP); glVertex2i(w.xmin+500, w.ymin); glVertex2i(w.xmin+500, w.ymax); glVertex2i(w.xmax+500, w.ymax); glVertex2i(w.xmax+500, w.ymin); glEnd(); glColor3f(1,0,0); glBegin(GL_LINE_LOOP); for(int i=0 ; i<numberOfVertices ; i++) { glVertex2i(pointList[i].x+500, pointList[i].y); } glEnd(); glFlush(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(1000,500); glutCreateWindow("Sutherland-Hodgeman polygon clipping"); init(); glutDisplayFunc(display); glutMainLoop(); return 0; }

    Read the article

  • Python: Best practice for including a version number in an app?

    - by Ben
    I have a PyQt application that reads and writes data files. I am including a 'version number' in each file written. This is a simple number similar to: 1.2 or something (major and minor versions). I am doing this so that I can change the format of these data files in future versions and then still correctly parse them simply by checking to see what the version is inside the file. My question is what is the best practice for keeping this number stored inside the app itself. I.e. do I just hard-code the app version number into the class that is responsible for reading and writing files? Or should I have some sort of object/variable stored at the top-level of the app and somehow access it from the class responsible for reading and writing these files. If the latter, how do I store it and how do I access it? Thanks.

    Read the article

  • Ruby - Is there a way to overwrite the __FILE__ variable?

    - by Markus Orrelly
    I'm doing some unit testing, and some of the code is checking to see if files exist based on the relative path of the currently-executing script by using the FILE variable. I'm doing something like this: if File.directory?(File.join(File.dirname(__FILE__),'..','..','directory')) blah blah blah ... else raise "Can't find directory" end I'm trying to find a way to make it fail in the unit tests without doing anything drastic. Being able to overwrite the __ FILE __ variable would be easiest, but as far as I can tell, it's impossible. Any tips?

    Read the article

  • C++ Beginner - Trouble using structs and constants!

    - by Francisco P.
    Hello everyone! I am currently working on a simple Scrabble implementation for a college project. I can't get a part of it to work, though! Check this out: My board.h: http://pastebin.com/J9t8VvvB The subroutine where the error lies: //Following snippet contained in board.cpp //I believe the function is self-explanatory... //Pos is a struct containing a char, y, a int, x and an orientation, o, which is not //used in this particular case void Board::showBoard() { Pos temp; temp.o = 0; for (temp.y = 'A'; temp.y < (65 + TOTAL_COLUMNS); ++temp.y) { for (temp.x = 1; temp-x < (1 + TOTAL_ROWS); ++temp.x) { cout << _matrix[temp].getContents(); } cout << endl; } } The errors returned on compile time: http://pastebin.com/bZv7fggq How come the error states that I am trying to compare two Pos when I am comparing chars and ints? I also really can't place these other errors... Thanks for your time!

    Read the article

  • Alternative to singleton for unique resources

    - by user1320881
    I keep reading over and over again that one should avoid using singletons for various reasons. I'm wondering how to correctly handle a situation where a class represents a unique system resource. For example, a AudioOutput class using SDL. Since SDL_OpenAudio can only be open once at a time it makes no sense having more then one object of this type and it seems to me preventing accidentally making more then one object would actually be good. Just wondering what experienced programmers think about this, am i missing another option ?

    Read the article

  • Reason for unintuitive UnboundLocalError behaviour 2

    - by Jonathan
    Following up on Reason for unintuitive UnboundLocalError behaviour (I will assume you've read it). Consider the following Python script: def f(): # a+=1 # 1 aa=a aa+=1 # b+='b' # 2 bb=b bb+='b' c[0]+='c' # 3 c.append('c') cc=c cc.append('c') # 4 a=1 b='b' c=['c'] f() print a print b print c The result of the script is: 1 b ['cc', 'c', 'c'] The commented out lines (marked 1,2) are lines that would through an UnboundLocalError and the SO question I referenced explains why. However, the line marked 3 works! By default, lists are copied by reference in Python, therefore it's understandable that c changes when cc changes. But why should Python allow c to change in the first place, if it didn't allow changes to a and b directly from the method's scope? I don't see how the fact that by default lists are copied by reference in Python should make this design decision inconsistent. What am I missing folks?

    Read the article

  • C++ how to make typedefs globally visible

    - by user231536
    I have a typedef typedef unsigned int my_type; used in a file. I would like to make it visible across all my files, without putting it in a header file included by everything. I don't want to go the header file route because as it stands this will be the only declaration in the header file (and it seems unnecessary to add a file just for this). Is there a way to do this? If instead I had: typedef X my_type; where X was a class, would I need to include X.h everywhere and have the typedef at the end of X.h ?

    Read the article

  • Checking for a session variable... returns (Object reference not set to an instance of an object.)

    - by Chocol8
    In the Session_Start i have Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Session("login") = False End Sub and in a custom .aspx page i included the following... Public ReadOnly Property GetLoginState() As Boolean Get If Current.Session("login") Is Nothing Then Current.Session("login") = False End If Return Current.Session("login") End Get End Property Why i am getting error the error Object reference not set to an instance of an object. at line If Current.Session("login") Is Nothing Then while checking for the login state as follows? If GetLogin = False Then 'Do something End if I mean i have already created the instance on the Session_Start... Haven't i? What am i doing wrong here?

    Read the article

  • In C++, how can I make typedefs visible to every file in my project?

    - by user231536
    I have a typedef typedef unsigned int my_type; used in a file. I would like to make it visible across all my files, without putting it in a header file included by everything. I don't want to go the header file route because as it stands this will be the only declaration in the header file (and it seems unnecessary to add a file just for this). Is there a way to do this? If instead I had: typedef X my_type; where X was a class, would I need to include X.h everywhere and have the typedef at the end of X.h ?

    Read the article

  • CultureManager issue

    - by Serge
    I have a bug I don't understand. While the following works fine: Resources.Classes.AFieldFormula.DirectFieldFormula this one throws an exception: new ResourceManager(typeof(Resources.Classes.AFieldFormula)).GetString("DirectFieldFormula"); Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"Resources.Classes.AFieldFormula.resources\" was correctly embedded or linked into assembly \"MygLogWeb\" at compile time, or that all the satellite assemblies required are loadable and fully signed. How comes? Resource designer.cs file: //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Resources.Classes { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class AFieldFormula { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal AFieldFormula() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MygLogWeb.Classes.AFieldFormula", typeof(AFieldFormula).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to Direct field. /// </summary> public static string DirectFieldFormula { get { return ResourceManager.GetString("DirectFieldFormula", resourceCulture); } } } }

    Read the article

  • Can you swap dpi buttons on the Astra Dragon War mouse with 4th and 5th buttons?

    - by Denny Nuyts
    I'm left-handed and I'm in need of a good computer mouse with at least five buttons. However, most computer mice on the market are sadly right-handed and very impracticable to use with the extra buttons on my pinkie side instead of on my thumb side. The Dragon War Astra has two buttons on both sides. Buttons 4 and 5 on the left side and the dpi-buttons on the right side. If I were just able to re-assign them so they swap positions I'd have a great left-handed mouse. Sadly, the program X-Mouse Button Control doesn't allow the user to re-assign dpi buttons. My question is whether there exist other methods to still get it to work for me (third party programs, perhaps?). Or should I get another gaming mouse?

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >