Search Results

Search found 55882 results on 2236 pages for 'instruction set'.

Page 40/2236 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • fetching from a specified index in a set using python

    - by tipu
    I'm using pagination on a values from a set. So what this results in is me needing to get values from x to x + 20 which can be in the middle of a set with 50,000 entries. Is it possible that I can fetch these values by grabbing by the space in the set? Would it make more sense to do result = [] my_dict = dict(very_big_set) for i in range(30000, 30020) result.append(my_dict[i])

    Read the article

  • How do you set a cookie to be accessible across the entire domain in Javascript

    - by Tzarkov
    I suppose there should be a way to set a cookie to be accessible from the entire domain nevermind from which directory you are setting the cookie. Say in mypage.com/blue/index.php y set the cookie "colour=blue;" this way: document.cookie = "colour" + "=" + "blue" + "; expires=" + expireDate.toGMTString() + "; path=/"; Using this code, the cookie retrieval function in mypage.com/home.php can't access the content of the cookie. If it was just from first level directories that the cookie needs to be set, we would be ok by doing path=../ instead of path=/ But how do you go about writing generic code that sets a cookie that is accessible from any page in that domain not minding how deep in the file structure is the page the cookie is being set from?

    Read the article

  • Set Positions returns E_NOTIMPL

    - by Manish
    Hi, I want to write only a specific portion of a .avi file in the output .avi file .For this I follow Source Filter -Avi mux-File Writer.I try to use IMediaSeeking on the Mux to set the specific start and stop times using Set Positions but it returns E_NOTIMPL. I also try to query the graph builder for IMediaSeeking and try to set the start and stop positions with no success.Can someone help?

    Read the article

  • NHibernate Empty Set Clauses in SQL Update Statements

    - by Brian Wilkinson
    I'm getting SQL update statements from NHibernate having a empty set clause ie UPDATE SET WHERE x == ? This propblem is occuring when a child entity is being updated for some reason the sql statement is being run against the Parent Entity, for some reason NHibenate is saying the parent has changed but when the set clause is being built no changes are found, can anyone help. The application I am constructing isn 3 tier. The domain entities are light weight data contract only entities.

    Read the article

  • C#: How to get all public (both get and set) string properties of a type

    - by Svish
    I am trying to make a method that will go through a list of generic objects and replace all their properties of type string which is either null or empty with a replacement. How is a good way to do this? I have this kind of... shell... so far: public static void ReplaceEmptyStrings<T>(List<T> list, string replacement) { var properties = typeof(T).GetProperties( -- What BindingFlags? -- ); foreach(var p in properties) { foreach(var item in list) { if(string.IsNullOrEmpty((string) p.GetValue(item, null))) p.SetValue(item, replacement, null); } } } So, how do I find all the properties of a type that are: Of type string Has public get Has public set ? I made this test class: class TestSubject { public string Public; private string Private; public string PublicPublic { get; set; } public string PublicPrivate { get; private set; } public string PrivatePublic { private get; set; } private string PrivatePrivate { get; set; } } The following does not work: var properties = typeof(TestSubject) .GetProperties(BindingFlags.Instance|BindingFlags.Public) .Where(ø => ø.CanRead && ø.CanWrite) .Where(ø => ø.PropertyType == typeof(string)); If I print out the Name of those properties I get there, I get: PublicPublic PublicPrivate PrivatePublic In other words, I get two properties too much. Note: This could probably be done in a better way... using nested foreach and reflection and all here... but if you have any great alternative ideas, please let me know cause I want to learn!

    Read the article

  • [Flex] Using same set of columns in AdvancedDataGrid in a TabBar

    - by user283403
    I have a TabBar control which will show an AdvancedDataGrid with same set of columns on different tabs, i am doing this so that i can show similar data on different tab pages. Column heading will be the same on all grids, is there a way I can put all column headings in an array and set that as columns of data grid? I tried setting the columns property but it doesn't work. Also I need to set ID property for a single column in the grid to set it the treecolumn so one column must have individual id field too.

    Read the article

  • Can Capistrano set variables based on a role?

    - by conickal
    I am trying to use Capistrano to deploy to two different roles, using Bundler on both, however the Bundler command and flags will be different. Is it possible to set variables that are specific to a role? Either something like: set :bundle_flags, "--deployment --quiet", :role => "web" or: role :web do set :bundler_cmd, "--deployment --quiet" end Neither of those two options work, of course. Is there a way to accomplish this, or something like it?

    Read the article

  • Insert an element to std::set using constructor

    - by Dave17
    is it possible to insert a new element to std::set like in case of std::list for example: //insert one element named "string" to sublist of mylist std::list< std::list<string> > mylist; mylist.push_back(std::list<string>(1, "string")); Now, mylist has one element of type std::string in its sub-list of type std::list. How can you do the same in if std::set is the sub-set of std::list my list i.e std::list<std::set <string>> mylist; if you can't then why not?

    Read the article

  • Set Date in a single line

    - by hibernate
    According to the java API, the constructor Date(year, month, day) is depreciated. I know that I can replace it with the following code: Calendar myCal = Calendar.getInstance(); myCal.set(Calendar.YEAR, theYear); myCal.set(Calendar.MONTH, theMonth); myCal.set(Calendar.DAY_OF_MONTH, theDay); Date theDate = myCal.getTime(); However, I would like something shorter to replace it with (ideally one-two lines). Any suggestions?

    Read the article

  • How to implement a set ?

    - by nomemory
    I want to implement a Set in C. Is it OK to use a linked list, when creating the SET, or should I use another approach ? How do you usually implement your own set (if needed). NOTE: If I use the Linked List approach, I will probably have the following complexities for my operations: init : O(1); destroy: O(n); insert: O(n); remove: O(n); union: O(n*m); intersection: O(n*m); difference: O(n*m); ismember: O(n); issubset: O(n*m); setisequal: O(n*m); O(n*m) seems may be a little to big especially for huge data... Is there a way to implement my Set more efficient ?

    Read the article

  • MDX: Filtering a member set by a measure's table values

    - by oyvinro
    I have some numbers in a fact table, and have generated a measure which use the SUM aggregator to summarize the numbers. But the problem is that I only want to sum the numbers that are higher than, say 10. I tried using a generic expression in the measure definition, and that works of course, but the problem is that I need to be able to dynamically set that value, because it's not always 10, meaning users should be able to select it themselves. More specifically, my current MDX looks like this: WITH SET [Email Measures] AS '{[Measures].[Number Of Answered Cases], [Measures].[Max Expedition Time First In Case], [Measures].[Avg Expedition Times First In Case], [Measures].[Number Of Incoming Email Requests], [Measures].[Avg Number Of Emails In Cases], [Measures].[Avg Expedition Times Total],[Measures].[Number Of Answered Incoming Emails]}' SET [Organizations] AS '{[Organization.Id].[860]}' SET [Operators] AS '{[Operator.Id].[3379],[Operator.Id].[3181]}' SET [Email Accounts] AS '{[Email Account.Id].[6]}' MEMBER [Time.Date].[Date Period] AS Aggregate ({[Time.Date].[2008].[11].[11] :[Time.Date].[2009].[1].[2] }) MEMBER [Email.Type].[Email Types] AS Aggregate ({[Email.Type].[0]}) SELECT {[Email Measures]} ON columns, [Operators] ON rows FROM [Email_Fact] WHERE ( [Time.Date].[Date Period] ) Now, the member in question is the calculated member [Avg Expedition Times Total]. This member takes in two measures; [Sum Expedition Times] and [Nr of Expedition Times] and splits one on the other to get the average, all this presently works. However, I want [Sum Expedition Times] to only summarize values over or under a parameter of my/the user's wish. How do I filter the numbers [Sum Expedition Times] iterates through, rather than filtering on the sum that the measure gives me in the end?

    Read the article

  • MYSQL variables - SET @var

    - by Lizard
    I am attempting to create a mysql snippet that will analyse a table and remove duplicate entries (duplicates are based on two fields not entire record) I have the following code that works when I hard code the variables in the queries, but when I take them out and put them as variables I get mysql errors, below is the script SET @tblname = 'mytable'; SET @fieldname = 'myfield'; SET @concat1 = 'checkfield1'; SET @concat2 = 'checkfield2'; ALTER TABLE @tblname ADD `tmpcheck` VARCHAR( 255 ) NOT NULL; UPDATE @tblname SET `tmpcheck` = CONCAT(@concat1,'-',@concat2); CREATE TEMPORARY TABLE `tmp_table` ( `tmpfield` VARCHAR( 100 ) NOT NULL ) ENGINE = MYISAM ; INSERT INTO `tmp_table` (`tmpfield`) SELECT @fieldname FROM @tblname GROUP BY `tmpcheck` HAVING ( COUNT(`tmpcheck`) > 1 ); DELETE FROM @tblname WHERE @fieldname IN (SELECT `tmpfield` FROM `tmp_table`); ALTER TABLE @tblname DROP `tmpcheck`; I am getting the following error: #1064 - 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 '@tblname ADD `tmpcheck` VARCHAR( 255 ) NOT NULL' at line 1 Is this because I can't use a variable for a table name? What else could be wrong or how wopuld I get around this issue. Thanks in adavnce

    Read the article

  • How does SET works with property in C#?

    - by Richard77
    Hello, I'd like to know how set works in a property when it does more than just setting the value of a private member variable. Let's say I've a private member in my class (private int myInt). For instance, I can make sure that the the value returned is not negative get { if(myInt < 0) myInt = 0; return myInt; } With SET, all I can do is affecting the private variable like so set { myInt = value; } I didn't see in any book how I can do more than that. How about if I wan't to do some operation before affecting the value to myInt? Let's say: If the value is negative, affect 0 to myInt. set { //Check if the value is non-negative, otherwise affect the 0 to myInt } Thanks for helping

    Read the article

  • How to set up email alias in exchange 2010

    - by Rothgar
    I have a couple users who need multiple email addresses (alias) forwarded to their accounts but setting up a separate user and forwarding the email is showing the email to the users main address instead of the aliased email. For example, here is what I need: [email protected] is the users email address but they also need to receive emails sent to [email protected], and [email protected]. When the emails are sent to the other two email addresses I want them to be forwarded to the user and showing that it was sent to the redundancy email address and not john.doe because the user needs to be able to filter these emails as well as reply from the redundancy department email address. How can I set up alias' in exchange 2010 to work this way? Thanks

    Read the article

  • Cannot set ILMerge path to console

    - by KMC
    I install ILMerge.exe; path is C:\Program Files\Microsoft\ILMerge\ILMerge.exe. I want to set the command to the Path so I can type ilmerge anywhere to use the application. I googled and tried all the following but none works: setx -m ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe setx -M ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe setx -m %PATH%;C:\Program Files\Microsoft\ILMerge\ILMerge.exe setx /S system /U administrator ilmerge;C:\Program Files\Microsoft\ILMerge\ILMerge.exe I then tried to add, the GUI's Environment Variables, click New and input the variable "ilmerge" and value "C:\Program Files\Microsoft\ILMerge\ILMerge.exe". But in command prompt and type in ilmerge, still gives me 'ilmerge' is not recognized as an internal or external command, operable program or bath file. Why something as basic as setting a path that confusing..

    Read the article

  • https not working... binding set, certificate installed

    - by rksprst
    I've installed the certificate and set the https bindings. However, when I load the site on https it does not load. I've looked at all the settings but everything seems correct. I've restarted the site numerous times. The certificate is stored on the local computer under personal-certificates... I have the private key for the certificate. The port (443) is open. If I try https://localhost on the server, the site loads... but with a domain error (i.e. it's localhost and not thedomain.com). But https://thedomain.com doesn't load. I really don't know why the https url isn't loading... anyone have any ideas? Thanks!

    Read the article

  • Ubuntu dual monitor set up - taskbars appear on other monitor

    - by DisgruntledGoat
    I'm trying to get my TV (connected via HDMI cable) to act as a second monitor to watch video etc. The TV is to my left, so in Display Preferences I unticked "Mirror Screens" and put the monitors like this: -------- ---------- | PC | | TV | | | ---------- -------- When I do this, the PC monitor comes up with just the desktop wallpaper and the interface - taskbar and windows, etc - moves to the TV screen. But if I swap the monitors around, the taskbars are still on the TV screen, with the windows (and desktop icons) on the PC screen. Is there a way to set the computer monitor as the main one and the TV as the second screen? PC: Dell Inspiron 531 Monitor: Samsung SyncMaster 720N TV: Philips 26PFL5522D LCD TV

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >