Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 99/332 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Where can I find a good definition of a Software construct?

    - by Hugh
    I have scoured for 2 hours now across the internet, I have found courses with modules on software constructs but no clear definition only hints as to what one is. As far as I understand the definition it is an object that can be defined with a purpose for example a TCP/IP connection uses a Port which is a Software construct. Can anyone refer me to a full definition or give a more robust one?

    Read the article

  • Python: import the containing package

    - by guy
    In a module residing inside a package, i have the need to use a function defined within the __init__.py of that package. how can i import the package within the module that resides within the package, so i can use that function? Importing __init__ inside the module will not import the package, but instead a module named __init__, leading to two copies of things with different names... Is there a pythonic way to do this?

    Read the article

  • How to handle ordering of @Rule's when they are dependant on eachother

    - by Lennart Schedin
    I use embedded servers that run inside Junit test cases. Sometimes these servers require a working directory (for example the Apache Directory server). The new @Rule in Junit 4.7 can handle these cases. The TemporaryFolder-Rule can create a temporary directory. A custom ExternalResource-Rule can be created for server. But how do I handle if I want to pass the result from one rule into another: import static org.junit.Assert.assertEquals; import java.io.*; import org.junit.*; import org.junit.rules.*; public class FolderRuleOrderingTest { @Rule public TemporaryFolder folder = new TemporaryFolder(); @Rule public MyNumberServer server = new MyNumberServer(folder); @Test public void testMyNumberServer() throws IOException { server.storeNumber(10); assertEquals(10, server.getNumber()); } /** Simple server that can store one number */ private static class MyNumberServer extends ExternalResource { private TemporaryFolder folder; /** The actual datafile where the number are stored */ private File dataFile; public MyNumberServer(TemporaryFolder folder) { this.folder = folder; } @Override protected void before() throws Throwable { if (folder.getRoot() == null) { throw new RuntimeException("TemporaryFolder not properly initialized"); } //All server data are stored to a working folder File workingFolder = folder.newFolder("my-work-folder"); dataFile = new File(workingFolder, "datafile"); } public void storeNumber(int number) throws IOException { dataFile.createNewFile(); DataOutputStream out = new DataOutputStream(new FileOutputStream(dataFile)); out.writeInt(number); } public int getNumber() throws IOException { DataInputStream in = new DataInputStream(new FileInputStream(dataFile)); return in.readInt(); } } } In this code the folder is sent as a parameter into the server so that the server can create a working directory to store data. However this does not work because Junit processes the rules in reverse order as they are defined in the file. The TemporaryFolder Rule will not be executed before the server Rule. Thus the root-folder in TempraryFolder will be null, resulting that any files are created relative to the current working directory. If I reverse the order of the attributes in my class I get a compile error because I cannot reference a variable before it is defined. I'm using Junit 4.8.1 (because the ordering of rules was fixed a bit from the 4.7 release)

    Read the article

  • Can extension methods be applied to interfaces?

    - by Greg
    Hi, Is it possible to apply an extension method to an interface? (C# question) That is for example to achieve the following: create an ITopology interface create an extension method for this interface (e.g. public static int CountNodes(this ITopology topologyIf) ) then when creating a class (e.g. MyGraph) which implements ITopology, then it would automatically have the Count Nodes extension. This way the classes implementing the interface would not have to have a set class name to align with what was defined in the extension method.

    Read the article

  • How can i configure my mail server in open atrium?

    - by Gushiken
    Hi, i have just succesfully installed open atrium, but i can't find the configuration of the mailserver... i currently cant send any mails because there is no SMTP Server defined, an without mails being send, no new users can be registered, because they recieve their pasword via mail... i hope that somebody can help me :)

    Read the article

  • Looking for programmer in NYC

    - by Oren
    I have taken the idea of "language maintenance" a niche that no one is paying attention to and created a company focused on live conversation with complimentary tools. Looking to create a web 2.0 style social network with an already clearly defined brand identity, design and plan. Already have assembled a team but am looking for a passionate programmer to take the technical lead and create a functional alpha and beta.

    Read the article

  • LINQ to group objects according to timestamp

    - by Benny
    I have a serial of object defined as: public class Foo { public DateTime Time {get;set;} } now I want to group objects(IEnumerable<Foo>) according to the time, e.g. I want to group them according to hour or day or month. for example (group into hour): group 1(13:00-14:00) : foo1, foo2, foo3 group 2(14:00-15:00): foo4, foo5 How to write LINQ over this? hope I made myself clear.

    Read the article

  • Autocomplete problem with scrollbar

    - by Geetha
    Hi All, I am using autocomplete with scrollbar for my textbox. Autocomplete for touch screen. I can scroll up and down using the mouse wheel but i want to Use the mouse button to scroll up or down by dragging the scroll bar. if i use mouse button it moves the focus away from the text box field. Autocomplete is working only when using the keyboard not with the user defined keys. Geetha

    Read the article

  • How to access core data objects from Javascript?

    - by Eli
    How can I gain access to Core Data objects from Javascript/WebKit on Mac OS X? I've made custom subclasses of NSManagedObject for each of my tables, with accessors defined using @property/@dynamic for each attribute, but neither isSelectorExcludedFromWebScript: or isKeyExcludedFromWebScript: is called for any of them, so Javascript just stops when I try to access any of the attributes. It returns 'undefined' if I access it as a property (eg business.name ) and javascript execution stops if I access it as a function (eg business.name() ).

    Read the article

  • Play Framework custom validation errors with multiple String parameters

    - by Mark
    I'm trying to set a custom validation error with multiple params in Play!, but it seems like my validation parameters are not rendered correctly. I have defined in messages: validation.customerror=This is first param "%s", and this is the second "%s" The in my code I execute: validation.addError("","validation.customerror", "FIRST", "SECOND"); And I get: This is first param "", and this is the second "FIRST" Thoughts?

    Read the article

  • java applet communication port

    - by udhaya
    Communication ports: Change a given class in an applet in that way, that browser-defined proxy-configuration files can be used for applet communication with serve(upload method). i.e browser communicate via port 8080 or via ssl(443) - applet should also communicate by this port automatically. In the given method port 80 is hardcoded. -- please give some code or program for this..

    Read the article

  • named route (RESTful) for actions other than index, delete, create, and edit

    - by Hadi
    To illustrate: class Customer has_many :sales_orders end class SalesOrder belongs_to :customer end i want to have customer to list sales_order which is ready to be sent, should i: put the routing http://.../sales_orders/can_be_delivered or create a new controller for reporting http://.../reports/sales_orders_can_be_delivered for the 1st one, what should goes in the route.rb? for the 2nd one, nothing goes in route.rb, we can use the last defined route which is :controller/:action.. <-- but this isn't named route any ideas for this kind of problem?

    Read the article

  • iphone integer multiplication

    - by Rob
    I don't understand why this doesn't work: [abc = ([def intValue] - 71) * 6]; '*' should be the viable way of doing multiplication and 'abc' is defined as an NSInteger. ('def' is an NSString)

    Read the article

  • JPA and PostqreSQL: long string persistence

    - by emanemos
    Can anybody tell me how to persist long text using JPA (I use PostgreSQL)? Here's the way I defined a very long string in my class: @Lob private String body; However, this produces a field of type charactervarying(255) in the database. Furthermore, I've tried to use @Column annotation: @Column(columnDefinition="TEXT") private String body; But everything in vain. I would be gratefull for a helpfull comment on this problem.

    Read the article

  • c# parameters question

    - by n00b
    I am new to c# and need help understanding what going on in the following function public bool parse(String s) { table.Clear(); return parse(s, table, null); } where table is a Dictionary. I can see that is is recursive but how is parse being passed three params when it is defined to take just a string?

    Read the article

  • Running Maven Goals in CLI.

    - by Jeeyoung Kim
    Hello, I have a maven pom.xml file with multiple instances of a same goal defined (inside with different s). I'm wondering how I can run a specific goal via maven command line. I've tried mvn --help, but I couldn't find an entry regarding this.

    Read the article

  • MySQL query being performed when PHP if condition not met?

    - by Ryan
    The script I'm using is if($profile['username'] == $user['username']) { $db->query("UPDATE users SET newcomments = 0 WHERE username = '$user[username]'"); echo "This is a test"; } (Note that $db-query is exactly the same as mysql_query) For some very odd reason, the MySQL query is being performed even if the defined condition is false The "This is a test" works properly and only appears when the condition is met, but the MySQL query is performed anyway Whats the problem with it?

    Read the article

  • Check user language selection in NSIS MUI2

    - by wls
    I have multiple language packs in my NSIS installer, using the MUI2 interface. Now I try to select the language pack, which is installed by the "Typical" installation type according to the user's chosen setup language. My problem is, that I can't figure out, how to get the user's language selection. I already tried to access the variables $LANGUAGE and $mui.LangDLL.RegistryLanguage, as well as trying to compare a defined language string to a specific translation string, but without success.

    Read the article

  • Passing Variable in load

    - by Tyler
    I have a load action tied to the submit button of a form. jQuery('#content').load("/control/ajxdata/installs.php?country=" + country); jQuery('#content').load("/control/ajxdata/installs.php",{ 'country': country }); The name, and the id of the form element I am trying to utilize is "country" In the error console, I am getting "Error: country is not defined"

    Read the article

  • Where can I get the CUR files for the Firefox cursor values?

    - by harpo
    I'm using some of Firefox's specially-defined values for cursor, in particular -moz-zoom-in -moz-zoom-out -moz-grab -moz-grabbing In order to display these on other browsers, I'd like to deploy the equivalent CUR files — but I can't seem to find these online, or in my copy of Firefox. Anyone know where these are available?

    Read the article

  • OleDB Jet - Float issues in reading excel data

    - by Patrick
    When I read a sheet into a DataTable using the OleDbDataReader, floating point numbers loose their precision. I tried forcing OleDb to read the excel data as string, but although the data is now contained in a DataRow with each Column defined as System.String it looses precision (18.125 - 18.124962832). Any idea how to avoid this behaviour?

    Read the article

  • What is a proper way to store site-level global variables in a SharePoint site?

    - by ccomet
    One thing that has driven me nuts about SharePoint2007 is the apparent inability to have defineable settings that apply specifically to a site or site collection itself, and not the content. I mean, you have some pre-defined settings like the Site Logo, the Site Name, and various other things, but there doesn't appear to be anywhere to add new kinds of settings. The application I am working on needs to be able to create multiple kinds of "project site collections" that all follow a basic template, but have certain additional settings that apply specifically to that site collection and that one alone. In addition to the standard site name we also need to define the Project Number, the Project Name, and the Client Name. And given the requests of some of our clients, we also reach a point where we have to have configurable settings that alter how some of the workflows work, like whether files are marked with Letters or Numbers. Our current solution, which I'm hesitant about, has been to store an XML file on the SharePoint server. This file contains one node for each site collection, identified by the URL of the root site. Inside the node are all of the elements that need to be defined for that site collection. When we need them, we have to access the XML file (which will always require SPSecurity.RunWithElevatedPrivileges to access files right on the server) every time to load it and retrieve the data. There are a lot of automated processes which will have to do this, and I'm hesitant about the stability of this method when we reach hundreds of sites with thousands of files running tens of thousands of workflows, all wanting to access this file. Maybe they're unfounded worries, but I'd rather worry than risk everything breaking in a couple years. I was looking into the SPWeb object and found the AllProperties hashtable. It looks like just the kind of thing which might work, but I don't know how safe it is to be modifying this. I read through both MSDN and the WSS SDK but found nothing that clarified on adding completely new properties into AllProperties. Is it safe to use AllProperties for this kind of thing? Or is there yet another feature that I am missing, which could handle the concept of global variables at the site collection or site scope?

    Read the article

  • Using empty row as default in a ComboBox with Style "DropDownList"?

    - by Pesche Helfer
    Hi board I am trying to write a method, that takes a ComboBox, a DataTable and a TextBox as arguments. The purpose of it is to filter the members displayed in the ComboBox according to the TextBox.Text. The DataTable contains the entire list of possible entries that will then be filtered. For filtering, I create a DataView of the DataTable, add a RowFilter and then bind this View to the ComboBox as DataSource. To prevent the user from typing into the ComboBox, I choose the DropDownStyle DropDownList. That’s working fine so far, except that the user should also be able to choose nothing / empty line. In fact, this should be the default member to be displayed (to prevent choosing a wrong member by accident, if the user clicks through the dialog too fast). I tried to solve this problem by adding a new Row to the view. While this works for some cases, the main issue here is that any DataTable can be passed to the method. If the DataTable contains columns that cannot be null and don’t contain a default value, I suppose I will raise an error by adding an empty row. A possibility would be to create a view that contains only the column that is defined as DisplayMember, and the one that is defined as ValueMember. Alas, this can’t be done with a view in C#. I would like to avoid creating a true copy of the DataTable at all cost, since who knows how big it will get with time. Do you have any suggestions how to get around this problem? Instead of a view, could I create an object containing two members and assign the DisplayMember and the ValueMember to these members? Would the members be passed as reference (what I hope) or would true copied be created (in which case it would not be a solution)? Thank you very much for your help! Best regards public static void ComboFilter(ComboBox cb, DataTable dtSource, TextBox filterTextBox) { cb.DropDownStyle = ComboBoxStyle.DropDownList; string displayMember = cb.DisplayMember; DataView filterView = new DataView(dtSource); filterView.AddNew(); filterView.RowFilter = displayMember + " LIKE '%" + filterTextBox.Text + "%'"; cb.DataSource = filterView; }

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >