Search Results

Search found 166 results on 7 pages for 'indirect'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • Excel INDIRECT function and conditional formatting - highlighting a row

    - by Ehryk
    I'm having an issue with conditional formatting using the INDIRECT function. I'm doing something similar to Using INDIRECT and AND/IF for conditional formatting , but the only answer there isn't working for me. Basically, I want to highlight rows where B is not blank and F is blank. INDIRECT will work for ONE of the conditions, but = AND(INDIRECT("B"&ROW()) > 0, INDIRECT("F"&ROW()) = "") does not work at all. The answer in the question points to replacing the references with relative ones, so I'm thinking this should work: = AND ($B2 > 0, $F2 = "") But it does not, nor does ISBLANK($F@) or ISEMPTY($F2) (the cell contains a formula that sometimes will return "", I want the row highlighted in these cases but only when something is in column B). Am I missing something about relative references? Why doesn't INDIRECT work with AND/OR?

    Read the article

  • Indirect load of type fails in PowerShell

    - by Dan
    When invoking [System.Configuration.ConfigurationManager]::GetSection("MySection") from within a PowerShell prompt, it throws an exception because the assembly containing the type represented by "MySection" in the app config is unable to be loaded. However, I have previously loaded the assembly containing that type, and I am even able to instantiate the type directly using 'new-object'. How is the ConfigurationManager resolving types such that the assemblies already loaded into the PowerShell app domain are not visible to it?

    Read the article

  • indirect rendering issue on 12.04, using ati driver

    - by lurscher
    I have ubuntu 12.04 64-bit system, when i run glxinfo i see some strange error about indirect rendering and failed to load some lib32/dri/swrast_dri libraries. Any idea what is going on? please let me know if i can enhance the relevant information provided in this question $ LIBGL_DEBUG=verbose glxinfo name of display: :0 libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib32/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib32/dri/swrast_dri.so libGL error: dlopen /usr/lib32/dri/swrast_dri.so failed (/usr/lib32/dri/swrast_dri.so: cannot open shared object file: No such file or directory) libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so libGL error: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory) libGL error: unable to load driver: swrast_dri.so libGL error: reverting to indirect rendering display: :0 screen: 0 direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) server glx vendor string: ATI server glx version string: 1.4 server glx extensions: GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group client glx vendor string: Mesa Project and SGI client glx version string: 1.4 client glx extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event GLX version: 1.4 GLX extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_multithread_makecurrent, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: AMD Radeon HD 6800 Series OpenGL version string: 1.4 (2.1 (4.2.11762 Compatibility Profile Context)) OpenGL extensions: GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, GL_ARB_framebuffer_object, GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow, GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp, GL_ARB_texture_compression, GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle, GL_ARB_transpose_matrix, GL_ARB_vertex_program, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture3D, GL_EXT_texture_compression_s3tc, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_lod, GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_ATI_draw_buffers, GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once, GL_ATIX_texture_env_combine3, GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, GL_NV_texture_rectangle, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SGIX_shadow_ambient, GL_SUN_multi_draw_arrays

    Read the article

  • How flexible is the 'indirect' function?

    - by Chuck
    My curiosity pushes me to ask this question. If I were to have a series of functions that referenced a different column in a worksheet but all ended on the same row of data is there a way to point the 'row' part of a cell reference to a blank cell and use it has a variable to show the results of the functions up to a desired row simultaneously? Example: =Average('worksheet 1'.$A$1:'worksheet 1'.$A100) =Max('worksheet 1'.$B$1:'worksheet 1'.$B100) =Min('worksheet 1'.$C$1:'worksheet 1'.$C100) =Sum('worksheet 1'.$D$1:'worksheet 1'.$D100) Pseudo formulas... =Average('worksheet 1'.$A$1:'worksheet 1'.$A*('worksheet 2'.$A$1)*) =Max('worksheet 1'.$B$1:'worksheet 1'.$B*('worksheet 2'.$A$1)*) =Min('worksheet 1'.$C$1:'worksheet 1'.$C*('worksheet 2'.$A$1)*) =Sum('worksheet 1'.$D$1:'worksheet 1'.$D*('worksheet 2'.$A$1)*) Where 'worksheet 2'.$A$1 would only contain a number corresponding to a row in 'worksheet 1'. After stumbling upon and playing with the indirect() function I have only been able to replace the entire cell reference (Column and Row) with any success. The formula so far =SUM('worksheet 1'.C3:INDIRECT(A1)) Where A1 is on 'worksheet 2' and contains a full cell reference pointing to 'worksheet 1'. Any pointers?

    Read the article

  • Direct invocation vs indirect invocation in C

    - by Mohit Deshpande
    I am new to C and I was reading about how pointers "point" to the address of another variable. So I have tried indirect invocation and direct invocation and received the same results (as any C/C++ developer could have predicted). This is what I did: int cost; int *cost_ptr; int main() { cost_ptr = &cost; //assign pointer to cost cost = 100; //intialize cost with a value printf("\nDirect Access: %d", cost); cost = 0; //reset the value *cost_ptr = 100; printf("\nIndirect Access: %d", *cost_ptr); //some code here return 0; //1 } So I am wondering if indirect invocation with pointers has any advantages over direct invocation or vice-versa. Some advantages/disadvantages could include speed, amount of memory consumed performing the operation (most likely the same but I just wanted to put that out there), safeness (like dangling pointers) , good programming practice, etc. 1Funny thing, I am using the GNU C Compiler (gcc) and it still compiles without the return statement and everything is as expected. Maybe because the C++ compiler will automatically insert the return statement if you forget.

    Read the article

  • Indirect Postfix bounces create new user directories

    - by hheimbuerger
    I'm running Postfix on my personal server in a data centre. I am not a professional mail hoster and not a Postfix expert, it is just used for a few domains served from that server. IIRC, I mostly followed this howto when setting up Postfix. Mails addressed to one of the domains the server manages are delivered locally (/srv/mail) to be fetched with Dovecot. Mails to other domains require usage of SMTPS. The mailbox configuration is stored in MySQL. The problem I have is that I suddenly found new mailboxes being created on the disk. Let's say I have the domain 'example.com'. Then I would have lots of new directories, e.g. /srv/mail/example.com/abenaackart /srv/mail/example.com/abenaacton etc. There are no entries for these addresses in my database, neither as a mailbox nor as an alias. It's clearly spam from auto-generated names. Most of them start with 'a', a few with 'b' and a couple of random ones with other letters. At first I was afraid of an attack, but all security restrictions seem to work. If I try to send mail to these addresses, I get an "Recipient address rejected: User unknown in virtual mailbox table" during the 'RCPT TO' stage. So I looked into the mails stored in these mailboxes. Turns out that all of them are bounces. It seems like all of them were sent from a randomly generated name to an alias that really exists on my system, but pointed to an invalid destination address on another host. So Postfix accepted it, then tried to redirect it to another mail server, which rejected it. This bounced back to my Postfix server, which now took the bounce and stored it locally -- because it seemed to be originating from one of the addresses it manages. Example: My Postfix server handles the example.com domain. [email protected] is configured to redirect to [email protected]. [email protected] has since been deleted from the Hotmail servers. Spammer sends mail with FROM:[email protected] and TO:[email protected]. My Postfix server accepts the mail and tries to hand it off to hotmail.com. hotmail.com sends a bounce back. My Postfix server accepts the bounce and delivers it to /srv/mail/example.com/bob. The last step is what I don't want. I'm not quite sure what it should do instead, but creating hundreds of new mailboxes on my disk is not what I want... Any ideas how to get rid of this behaviour? I'll happily post parts of my configuration, but I'm not really sure where to start debugging the problem at this point.

    Read the article

  • indirect path for download files

    - by Mac Taylor
    hey guys i need to create a download section on my website , but as i concern , i want my users can only download files with indirect links , to prevent them from sharing my files on my server such as : http://mysite.com/download/12.zip to http://mysite.com/download/12 is there a way in php to do so ?

    Read the article

  • Indirect property notification

    - by Carlo
    Hello, this question might look a little trivial, but it might not be. I'm just wondering which of the following two cases is better for indirect property notification, or perhaps there is an even better way. The scenario: I have two properties, the first one is an object called HoldingObject, the second one is a boolean called IsHoldingObject, which is false if HoldingObject == null, otherwise it's true. I'm just wondering what is the best notification mechanism for IsHoldingObject: Case (A) - Notify IsHoldingObject changed from the HoldingObject proeperty: public class NotifyingClass1 : INotifyPropertyChanged { private object _holdingObject; public object HoldingObject { get { return _holdingObject; } set { if (_holdingObject != value) { _holdingObject = value; NotifyPropertyChanged("HoldingObject"); // Notify from the property that is being checked NotifyPropertyChanged("IsHoldingObject"); } } } public bool IsHoldingObject { get { return this.HoldingObject == null; } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string propertyName) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } #endregion } Case (B) - Notify IsHoldingObject changed from the IsHoldingObject directly, by setting it to false or true from HoldingObject property: public class NotifyingClass2 : INotifyPropertyChanged { private object _holdingObject; public object HoldingObject { get { return _holdingObject; } set { if (_holdingObject != value) { _holdingObject = value; NotifyPropertyChanged("HoldingObject"); // 1) Set the property here this.IsHoldingObject = _holdingObject != null; } } } private bool _isHoldingObject; public bool IsHoldingObject { get { return _isHoldingObject; } set { if (_isHoldingObject != value) { _isHoldingObject = value; // 2) Notify directly from the property NotifyPropertyChanged("IsHoldingObject"); } } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string propertyName) { if (this.PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } #endregion } I personally lean to the first one because it requires less code, but I'm not sure how recommendable it is to do that. Let me know if there is another (better) way. Thanks!

    Read the article

  • Indirect function call in JavaScript

    - by Art
    There are things like f.call(...) f.apply(...) But then there's this (1, alert)('Zomg what is this????!!!11') "1" does not seem to mean much in this context, the following works just fine: (null, alert)('Zomg what is this????!!!11') (1, null, alert)('Zomg what is this????!!!11') (undefined, alert)('Zomg what is this????!!!11') Could you point to a specific part of ECMAScript which describes that syntax?

    Read the article

  • How do I use this indirect relationship?

    - by tyjkenn
    I'm working on incorporating a reputation system into my site, similar to SO. Here is how it is structured: User hasMany Project User hasMany Answer Project hasMany Rating Answer hasMany Rating Rating belongsTo Project where Rating.parent_type = Project Rating belongsTo Answer where Rating.parent_type = Answer Rating's value field will be a number between 1 and 5. The user should gain +10 for every 5-star review, +5 for every 4-star review, and +1 for every 3-star review. The way I currently have it set up is this: a recalcRep($id) action in the UsersController (along with other actions in other controllers, when necessary) calls the calcRep($id) method inside the User model, which is supposed to calculate the reputation of a user with an id of $id. public function calcRep($id) { $rep = 0; $data = $this->Rating->find('all'); //does not work, because it is not directly associated foreach($data as $rating) { if(($rating['Rating']['parent_type'] == 'Project' && $rating['Project']['user_id']==$id) or ($rating['Rating']['parent_type'] == 'Answer' && $rating['Answer']['user_id']==$id)) { if($rating['Rating']['value']==5) { $rep += 10; } else if($rating['Rating']['value']==4) { $rep += 5; } else if($rating['Rating']['value']==3) { $rep += 2; } } } $data['User']['reputation'] = $rep; $this->save($data); } I may be approaching this in completely the wrong way, but I can't figure out how to find all the ratings that belong to any of the children of a specific user.

    Read the article

  • Do I Need To Reference Indirect DLLs

    - by ChloeRadshaw
    Suppose I have DLLA which is a standalone library that contains classes I use I have DLLB that references DLLA I now have DLLC that references DLLB - Why is it that DLLC also needs a reference to DLLA? Can I not have VS2005 build a dll which contains all the assemblies it needs embedded inside it?

    Read the article

  • Satisfying indirect references at runtime.

    - by automatic
    I'm using C# and VS2010. I have a dll that I reference in my project (as a dll reference not a project reference). That dll (a.dll) references another dll that my project doesn't directly use, let's call it b.dll. None of these are in the GAC. My project compiles fine, but when I run it I get an exception that b.dll can't be found. It's not being copied to the bin directory when my project is compiled. What is the best way to get b.dll into the bin directory so that it can be found at run time. I've thought of four options. Use a post compile step to copy b.dll to the bin directory Add b.dll to my project (as a file) and specify copy to output directory if newer Add b.dll as a dll reference to my project. Use ILMerge to combine b.dll with a.dll I don't like 3 at all because it makes b.dll visible to my project, the other two seem like hacks. Am I missing other solutions? Which is the "right" way? Would a dependency injection framework be able to resolve and load b.dll?

    Read the article

  • Creating packages in code - Package Configurations

    Continuing my theme of building various types of packages in code, this example shows how to building a package with package configurations. Incidentally it shows you how to add a variable, and a connection too. It covers the five most common configurations: Configuration File Indirect Configuration File SQL Server Indirect SQL Server Environment Variable  For a general overview try the SQL Server Books Online Package Configurations topic. The sample uses a a simple helper function ApplyConfig to create or update a configuration, although in the example we will only ever create. The most useful knowledge is the configuration string (Configuration.ConfigurationString) that you need to set. Configuration Type Configuration String Description Configuration File The full path and file name of an XML configuration file. The file can contain one or more configuration and includes the target path and new value to set. Indirect Configuration File An environment variable the value of which contains full path and file name of an XML configuration file as per the Configuration File type described above. SQL Server A three part configuration string, with each part being quote delimited and separated by a semi-colon. -- The first part is the connection manager name. The connection tells you which server and database to look for the configuration table. -- The second part is the name of the configuration table. The table is of a standard format, use the Package Configuration Wizard to help create an example, or see the sample script files below. The table contains one or more rows or configuration items each with a target path and new value. -- The third and final part is the optional filter name. A configuration table can contain multiple configurations, and the filter is  literal value that can be used to group items together and act as a filter clause when configurations are being read. If you do not need a filter, just leave the value empty. Indirect SQL Server An environment variable the value of which is the three part configuration string as per the SQL Server type described above. Environment Variable An environment variable the value of which is the value to set in the package. This is slightly different to the other examples as the configuration definition in the package also includes the target information. In our ApplyConfig function this is the only example that actually supplies a target value for the Configuration.PackagePath property. The path is an XPath style path for the target property, \Package.Variables[User::Variable].Properties[Value], the equivalent of which can be seen in the screenshot below, with the object being our variable called Variable, and the property to set is the Value property of that variable object. The configurations as seen when opening the generated package in BIDS: The sample code creates the package, adds a variable and connection manager, enables configurations, and then adds our example configurations. The package is then saved to disk, useful for checking the package and testing, before finally executing, just to prove it is valid. There are some external resources used here, namely some environment variables and a table, see below for more details. namespace Konesans.Dts.Samples { using System; using Microsoft.SqlServer.Dts.Runtime; public class PackageConfigurations { public void CreatePackage() { // Create a new package Package package = new Package(); package.Name = "ConfigurationSample"; // Add a variable, the target for our configurations package.Variables.Add("Variable", false, "User", 0); // Add a connection, for SQL configurations // Add the SQL OLE-DB connection ConnectionManager connectionManagerOleDb = package.Connections.Add("OLEDB"); connectionManagerOleDb.Name = "SQLConnection"; connectionManagerOleDb.ConnectionString = "Provider=SQLOLEDB.1;Data Source=(local);Initial Catalog=master;Integrated Security=SSPI;"; // Add our example configurations, first must enable package setting package.EnableConfigurations = true; // Direct configuration file, see sample file this.ApplyConfig(package, "Configuration File", DTSConfigurationType.ConfigFile, "C:\\Temp\\XmlConfig.dtsConfig", string.Empty); // Indirect configuration file, the emvironment variable XmlConfigFileEnvironmentVariable // contains the path to the configuration file, e.g. C:\Temp\XmlConfig.dtsConfig this.ApplyConfig(package, "Indirect Configuration File", DTSConfigurationType.IConfigFile, "XmlConfigFileEnvironmentVariable", string.Empty); // Direct SQL Server configuration, uses the SQLConnection package connection to read // configurations from the [dbo].[SSIS Configurations] table, with a filter of "SampleFilter" this.ApplyConfig(package, "SQL Server", DTSConfigurationType.SqlServer, "\"SQLConnection\";\"[dbo].[SSIS Configurations]\";\"SampleFilter\";", string.Empty); // Indirect SQL Server configuration, the environment variable "SQLServerEnvironmentVariable" // contains the configuration string e.g. "SQLConnection";"[dbo].[SSIS Configurations]";"SampleFilter"; this.ApplyConfig(package, "Indirect SQL Server", DTSConfigurationType.ISqlServer, "SQLServerEnvironmentVariable", string.Empty); // Direct environment variable, the value of the EnvironmentVariable environment variable is // applied to the target property, the value of the "User::Variable" package variable this.ApplyConfig(package, "EnvironmentVariable", DTSConfigurationType.EnvVariable, "EnvironmentVariable", "\\Package.Variables[User::Variable].Properties[Value]"); #if DEBUG // Save package to disk, DEBUG only new Application().SaveToXml(String.Format(@"C:\Temp\{0}.dtsx", package.Name), package, null); Console.WriteLine(@"C:\Temp\{0}.dtsx", package.Name); #endif // Execute package package.Execute(); // Basic check for warnings foreach (DtsWarning warning in package.Warnings) { Console.WriteLine("WarningCode : {0}", warning.WarningCode); Console.WriteLine(" SubComponent : {0}", warning.SubComponent); Console.WriteLine(" Description : {0}", warning.Description); Console.WriteLine(); } // Basic check for errors foreach (DtsError error in package.Errors) { Console.WriteLine("ErrorCode : {0}", error.ErrorCode); Console.WriteLine(" SubComponent : {0}", error.SubComponent); Console.WriteLine(" Description : {0}", error.Description); Console.WriteLine(); } package.Dispose(); } /// <summary> /// Add or update an package configuration. /// </summary> /// <param name="package">The package.</param> /// <param name="name">The configuration name.</param> /// <param name="type">The type of configuration</param> /// <param name="setting">The configuration setting.</param> /// <param name="target">The target of the configuration, leave blank if not required.</param> internal void ApplyConfig(Package package, string name, DTSConfigurationType type, string setting, string target) { Configurations configurations = package.Configurations; Configuration configuration; if (configurations.Contains(name)) { configuration = configurations[name]; } else { configuration = configurations.Add(); } configuration.Name = name; configuration.ConfigurationType = type; configuration.ConfigurationString = setting; configuration.PackagePath = target; } } } The following table lists the environment variables required for the full example to work along with some sample values. Variable Sample value EnvironmentVariable 1 SQLServerEnvironmentVariable "SQLConnection";"[dbo].[SSIS Configurations]";"SampleFilter"; XmlConfigFileEnvironmentVariable C:\Temp\XmlConfig.dtsConfig Sample code, package and configuration file. ConfigurationApplication.cs ConfigurationSample.dtsx XmlConfig.dtsConfig

    Read the article

  • Do the ‘up to date’ guarantees for values of Java's final fields extend to indirect references?

    - by mattbh
    The Java language spec defines semantics of final fields in section 17.5: The usage model for final fields is a simple one. Set the final fields for an object in that object's constructor. Do not write a reference to the object being constructed in a place where another thread can see it before the object's constructor is finished. If this is followed, then when the object is seen by another thread, that thread will always see the correctly constructed version of that object's final fields. It will also see versions of any object or array referenced by those final fields that are at least as up-to-date as the final fields are. My question is - does the 'up-to-date' guarantee extend to the contents of nested arrays, and nested objects? An example scenario: Thread A constructs a HashMap of ArrayLists, then assigns the HashMap to final field 'myFinal' in an instance of class 'MyClass' Thread B sees a (non-synchronized) reference to the MyClass instance and reads 'myFinal', and accesses and reads the contents of one of the ArrayLists In this scenario, are the members of the ArrayList as seen by Thread B guaranteed to be at least as up to date as they were when MyClass's constructor completed? I'm looking for clarification of the semantics of the Java Memory Model and language spec, rather than alternative solutions like synchronization. My dream answer would be a yes or no, with a reference to the relevant text.

    Read the article

  • Java IDE - find all INDIRECT usages/references of a function or class?

    - by GreenieMeanie
    In Netbeans or in Eclipse, you can use "Find Usages" or "References" from the right click context menu. If a() calls b(), using the functionality from b() will show you a(). However, what I want is to be able to see some kind of tree or have an option to see all usages of a given/class or method, such that if z() calls a() that using the functionality will show both z() and a(). Any IDE plugins or external tools that can do this?

    Read the article

  • In XSLT, how can you sort using an indirect key?

    - by edholder
    I am having trouble getting xsl:sort to understand the scope of the attributes I am referencing. Here is an XML sample document to illustrate: <Root> <DrinkSelections> <Drink id=1000 name="Coffee"/> <Drink id=1001 name="Water"/> <Drink id=1002 name="Tea"/> <Drink id=1003 name="Almost But Not Quite Entirely Unlike Tea"/> </DrinkSelections> <CustomerOrder> <Drinks> <Drink oid="1001"/> <Drink oid="1002"/> <Drink oid="1003"/> </Drinks> </CustomerOrder </Root> I want to produce a list of drinks (sorted by name) contained in the CustomerOrder. Here is the XSLT code I am fiddling with: <xsl:for-each select="/Root/CustomerOrder/Drinks/Drink"> <xsl:sort select="/Root/DrinkSelections/Drink[@id = @oid]/@name"/> <xsl:variable name=var_oid select="@oid"/> <xsl:value-of select="/Root/DrinkSelections/Drink[@id = $var_oid]/@name"/> </xsl:for-each> Apparently, the xsl:sort command is trying to apply the "oid" attribute to the Drink elements in DrinkSelections, rather than local Drink element. I can get around this using a variable, as in the xsl:value-of statement. But since xsl:sort must be the first statement after the xsl:for-each statement, I can't insert the xsl:variable statement before xsl:sort. Is there a way to explicitly state that the attribute value should be taken from the "local" element?

    Read the article

  • Do the 'up to date' guarantees provided by final field in Java's memory model extend to indirect ref

    - by mattbh
    The Java language spec defines semantics of final fields in section 17.5: The usage model for final fields is a simple one. Set the final fields for an object in that object's constructor. Do not write a reference to the object being constructed in a place where another thread can see it before the object's constructor is finished. If this is followed, then when the object is seen by another thread, that thread will always see the correctly constructed version of that object's final fields. It will also see versions of any object or array referenced by those final fields that are at least as up-to-date as the final fields are. My question is - does the 'up-to-date' guarantee extend to the contents of nested arrays, and nested objects? An example scenario: Thread A constructs a HashMap of ArrayLists, then assigns the HashMap to final field 'myFinal' in an instance of class 'MyClass' Thread B sees a (non-synchronized) reference to the MyClass instance and reads 'myFinal', and accesses and reads the contents of one of the ArrayLists In this scenario, are the members of the ArrayList as seen by Thread B guaranteed to be at least as up to date as they were when MyClass's constructor completed?

    Read the article

  • SUM of metric for normalized logical hierarchy

    - by Alex254
    Suppose there's a following table Table1, describing parent-child relationship and metric: Parent | Child | Metric (of a child) ------------------------------------ name0 | name1 | a name0 | name2 | b name1 | name3 | c name2 | name4 | d name2 | name5 | e name3 | name6 | f Characteristics: 1) Child always has 1 and only 1 parent; 2) Parent can have multiple children (name2 has name4 and name5 as children); 3) Number of levels in this "hierarchy" and number of children for any given parent are arbitrary and do not depend on each other; I need SQL request that will return result set with each name and a sum of metric of all its descendants down to the bottom level plus itself, so for this example table the result would be (look carefully at name1): Name | Metric ------------------ name1 | a + c + f name2 | b + d + e name3 | c + f name4 | d name5 | e name6 | f (name0 is irrelevant and can be excluded). It should be ANSI or Teradata SQL. I got as far as a recursive query that can return a SUM (metric) of all descendants of a given name: WITH RECURSIVE temp_table (Child, metric) AS ( SELECT root.Child, root.metric FROM table1 root WHERE root.Child = 'name1' UNION ALL SELECT indirect.Child, indirect.metric FROM temp_table direct, table1 indirect WHERE direct.Child = indirect.Parent) SELECT SUM(metric) FROM temp_table; Is there a way to turn this query into a function that takes name as an argument and returns this sum, so it can be called like this? SELECT Sum_Of_Descendants (Child) FROM Table1; Any suggestions about how to approach this from a different angle would be appreciated as well, because even if the above way is implementable, it will be of poor performance - there would be a lot of iterations of reading metrics (value f would be read 3 times in this example). Ideally, the query should read a metric of each name only once.

    Read the article

  • No wireless connection using a conceptronic c54i (RT2561/RT61 rev B)

    - by jrosell
    Detected but not working. New install on ubuntu 11.10 using coneptronic C54Ri. As documentation says it uses Ralink drivers.... Any ideas why my wireless does not work? $ lspci -nn | grep -i 'ralink' 01:05.0 Network controller: Ralink corp. RT2561/RT61 rev B 802.11g ifconfig eth0 Link encap:Ethernet HWaddr 00:1e:90:e5:af:13 inet addr:192.168.0.197 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::21e:90ff:fee5:af13/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:28361 errors:0 dropped:0 overruns:0 frame:0 TX packets:16858 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:39812172 (39.8 MB) TX bytes:1633405 (1.6 MB) Interrupt:43 Base address:0xc000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:80 errors:0 dropped:0 overruns:0 frame:0 TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6608 (6.6 KB) TX bytes:6608 (6.6 KB) iwconfig wlan0 wlan0 IEEE 802.11abg ESSIDff/any Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm Retry long limit:7 RTS thrff Fragment thrff Power Managementff lsmod | grep rt rt61pci 27493 0 crc_itu_t 12627 1 rt61pci rt2x00pci 14202 1 rt61pci rt2x00lib 48114 2 rt61pci,rt2x00pci mac80211 272785 2 rt2x00pci,rt2x00lib cfg80211 172392 2 rt2x00lib,mac80211 eeprom_93cx6 12653 1 rt61pci parport_pc 32114 1 parport 40930 3 ppdev,parport_pc,lp lsmod | grep rt [ 2497.816989] phy0 -> rt2x00pci_regbusy_read: Error - Indirect register access failed: offset=0x0000308c, value=0xffffffff [ 2497.827112] phy0 -> rt2x00pci_regbusy_read: Error - Indirect register access failed: offset=0x0000308c, value=0xffffffff [ 2497.837430] phy0 -> rt2x00pci_regbusy_read: Error - Indirect register access failed: offset=0x0000308c, value=0xffffffff [ 2497.847528] phy0 -> rt2x00pci_regbusy_read: Error - Indirect register access failed: offset=0x0000308c, value=0xffffffff [ 2497.847632] phy0 -> rt61pci_wait_bbp_ready: Error - BBP register access faile d, aborting. [ 2497.847637] phy0 -> rt61pci_set_device_state: Error - Device failed to enter state 4 (-5). sudo lshw -C network *-network DISABLED description: Wireless interface product: RT2561/RT61 rev B 802.11g vendor: Ralink corp. physical id: 5 bus info: pci@0000:01:05.0 logical name: wlan0 version: 00 serial: fa:b8:14:58:62:35 width: 32 bits clock: 33MHz capabilities: pm cap_list ethernet physical wireless configuration: broadcast=yes driver=rt61pci driverversion=3.0.0-12-generic firmware=0.8 latency=0 link=no multicast=yes wireless=IEEE 802.11abg resources: irq:16 memory:fdef8000-fdefffff iwlist scan lo Interface doesn't support scanning. eth0 Interface doesn't support scanning. wlan0 Failed to read scan data : Network is down uname -mr 3.0.0-12-generic i686 Edit 1 $ rfkill list all 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no On reboot, sudo lshw -C network returns network is ok. Hovever, WPA keeps on asking the wireless key

    Read the article

  • How to include worksheet 3 and 4 in a cell formula provided?

    - by user21255
    I have been kindly given this formula with an explanation on how it works: Insert this formula into the cell B4 of the sheet "Cases": =IF(NOT(ISBLANK('1st'!B25)),'1st'!B25,IF(NOT(ISBLANK(INDIRECT("'2nd'!R" & (ROW($B4)-(COUNTA('1st'!$B:$B)-COUNTA('1st'!$B$1:$B$24))-4+25) & "C" & COLUMN(B4),FALSE))),INDIRECT("'2nd'!R" & (ROW($B4)-(COUNTA('1st'!$B:$B)-COUNTA('1st'!$B$1:$B$24))-4+25) & "C" & COLUMN(B4),FALSE),"")) Copy the formula to the other cells in the worksheet; the relative addresses will adjust automatically. The formula works like this: Check if there is content in 1st. If yes, copy it. If no, find out how many entries there are in 1st in total. (This is done by using the COUNTA function on the whole B column in 1st and subtracting the number of non-empty cells above the actual case data.) Use this information together with the current cells's number to find out the location of the cell that has to be copied from 2nd. Create the address of the cell and use the ISBLANK function on the INDIRECT function with that address to check if the cell is empty. If it is not, use the INDIRECT function again to display it. If it is empty, just display an empty string. Now this works fine when I have only 2 sheets. But lets say I want to include a third and fourth sheet (name as 3rd and 4th respectively), then what and should I put the formula for this in the formula above? There are actually 31 sheets but if I know how to add 3rd and 4th sheet in the formula, then I can figure out how to do the rest. Thanks

    Read the article

  • Different ways to query this search in SQL?

    - by Bart Terrell
    I am teaching myself MS-SQL and I am trying to find different ways to find the Count of Paid and Unpaid Claims for 2012 grouped by Region from these 3 tables. If there is a returned date, the claim is unpaid if the returned date is null then the claim is paid. I will attach the code I have ran, but I am not sure if there are better ways to do it. Thanks. Here is the code: SET dateformat ymd; CREATE TABLE Claims ( ClaimID INT, SubID INT, [Claim Date] DATETIME ); CREATE TABLE Phoneship ( ClaimID INT, [Shipping Number] INT, [Claim Date] DATETIME, [Ship Date] DATETIME, [Returned Date] DATETIME ); CREATE TABLE Enrollment ( SubID INT, Enrollment_Date DATETIME, Channel NVARCHAR(255), Region NVARCHAR(255), Status FLOAT, Drop_Date DATETIME ); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (102, 201, '2011-10-13 00:00:00', '2011-10-14 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 202, '2011-11-02 00:00:00', '2011-11-03 00:00:00', '2011-11-20 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (103, 203, '2011-11-02 00:00:00', '2011-11-22 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (105, 204, '2012-01-16 00:00:00', '2012-01-17 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 205, '2012-02-15 00:00:00', '2012-02-16 00:00:00', '2012-02-26 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (106, 206, '2012-02-15 00:00:00', '2012-02-27 00:00:00', '2012-03-06 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (107, 207, '2012-03-12 00:00:00', '2012-03-13 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (108, 208, '2012-05-11 00:00:00', '2012-05-12 00:00:00', NULL); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 209, '2012-05-13 00:00:00', '2012-05-14 00:00:00', '2012-05-28 00:00:00'); INSERT INTO [Phoneship] ([ClaimID], [Shipping Number], [Claim Date], [Ship Date], [Returned Date]) VALUES (109, 210, '2012-05-13 00:00:00', '2012-05-30 00:00:00', NULL); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (101, 12345678, '2011-03-06 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (102, 12347190, '2011-10-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (103, 12348723, '2011-11-02 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (104, 12349745, '2011-11-09 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (105, 12347190, '2012-01-16 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (106, 12349234, '2012-02-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (107, 12350767, '2012-03-12 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (108, 12350256, '2012-05-11 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (109, 12347701, '2012-05-13 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (110, 12350256, '2012-05-15 00:00:00'); INSERT INTO [Claims] ([ClaimID], [SubID], [Claim Date]) VALUES (111, 12350767, '2012-06-30 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12345678, '2011-01-05 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346178, '2011-03-13 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12346679, '2011-05-19 00:00:00', 'Indirect Dealers', 'Southeast', 0, '2012-03-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347190, '2011-07-25 00:00:00', 'Retail', 'Northeast', 0, '2012-05-21 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12347701, '2011-08-14 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348212, '2011-09-30 00:00:00', 'Retail', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12348723, '2011-10-20 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349234, '2012-01-06 00:00:00', 'Indirect Dealers', 'West', 0, '2012-02-14 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12349745, '2012-01-26 00:00:00', 'Retail', 'Northeast', 0, '2012-04-15 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350256, '2012-02-11 00:00:00', 'Retail', 'Southeast', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12350767, '2012-03-02 00:00:00', 'Indirect Dealers', 'West', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351278, '2012-04-18 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12351789, '2012-05-08 00:00:00', 'Indirect Dealers', 'West', 0, '2012-07-04 00:00:00'); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352300, '2012-06-24 00:00:00', 'Retail', 'Midwest', 1, NULL); INSERT INTO [Enrollment] ([SubID], [Enrollment_Date], [Channel], [Region], [Status], [Drop_Date]) VALUES (12352811, '2012-06-25 00:00:00', 'Retail', 'Southeast', 1, NULL); And Query1 SELECT Count(ClaimID) AS 'Paid Claim', (SELECT Count(ClaimID) FROM dbo.phoneship WHERE [returned date] IS NOT NULL) AS 'Unpaid Claim' FROM dbo.Phoneship WHERE [Returned Date] IS NULL GROUP BY claimid Query2 SELECT Count(*) AS 'Paid Claims', (SELECT Count(*) FROM dbo.Phoneship WHERE [Returned Date] IS NOT NULL) AS 'Unpaid Claims' FROM dbo.Phoneship WHERE [Returned Date] IS NULL; Query3 Select Distinct(C.[Shipping Number]), Count(C.ClaimID) AS 'COUNT ClaimID', A.Region, A.SubID From dbo.HSEnrollment A Inner Join dbo.Claims B On A.SubId = B.SubId Inner Join dbo.Phoneship C On B.ClaimID = C.ClaimID Where C.[Returned Date] IS NULL Group By A.Region, A.Subid, C.ClaimID, C.[Shipping Number] Order By A.Region

    Read the article

1 2 3 4 5 6 7  | Next Page >