Search Results

Search found 2417 results on 97 pages for 'states'.

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

  • WPF: In Expression Blend, how to change Foreground of a custom button with a Border on different states?

    - by SubmarineX
    In Expression Blend 4, I want to change the Foreground of a custom button on different states. I'm just able to change the Background and BorderBrush. Just like this: If the state is "Normal", the color of text "Button" is Black, while the state is "Pressed", the color of text "Button" is White. On Brushes Panel under Properties Panel, there're 3 properties but no Foreground property: Who can help me? I'm so perplexed. Edit I find ContentControl have a Foreground property, but ContentPresenter haven't. Wether I should use ContentControl instead of ContentPresenter?

    Read the article

  • Any way to disable specific CPU idle (Cx) states?

    - by Philippe
    I just got a new Toshiba Tecra S11 notebook, which has a Core i5 520M CPU, and it appears to suffer from a well-known problem: a high pitched noise when the CPU is idle. Googling around revealed that this is caused by a specific power-saving mode in the CPU. In most cases, C4 mode is blamed for the noise. So my question is: is it possible to disable C4 mode (or any other "sleep" mode) using some utility or BIOS setting? I don't mind if it hurts battery life. I'd appreciate any advice on this matter. It's driving me crazy. FYI: I'm running Windows 7 64-bit

    Read the article

  • What do these remote addresses, local addresses, and states in TCPview mean?

    - by Joe
    I have been using TCPview lately to see what connections are made by different processes on my PC. Would somebody please explain what the following situations mean? Thanks. TCP Local Address: PC1234567890:3883 Remote Address: PC1234567890:0 State: LISTENING TCP Local Address: PC1234567890:4696 Remote Address: localhost:4697 State: ESTABLISHED Local Address: PC1234567890:4697 Remote Address: localhost:4696 State: ESTABLISHED UDP Local Address: PC1234567890:1234 Remote Address: . State:

    Read the article

  • What is the exact difference between MEM_RESERVE and MEM_COMMIT states?

    - by pj4533
    As I understand it MEM_RESERVE is actually 'free' memory, ie available to be used by my process, but just hasn't been allocated yet? Or it was previously allocated, but had since been freed? Specifically, see in my !address output below how I am nearly out of virtual address space (99900 KB free, 2307872 as MEM_PRIVATE. But the states shows that 44.75% of that is actually MEM_RESERVE. Does that mean it is actually free, in my process...but maybe fragmented? 0:000> !address -summary --------- PEB a8bd8000 not found ---- -------------------- Usage SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Pct(Busy) Usage 259af000 ( 616124) : 22.29% 23.12% : RegionUsageIsVAD 618f000 ( 99900) : 03.61% 00.00% : RegionUsageFree 13e22000 ( 325768) : 11.78% 12.22% : RegionUsageImage 42c04000 ( 1093648) : 39.56% 41.04% : RegionUsageStack 42d000 ( 4276) : 00.15% 00.16% : RegionUsageTeb 2625d000 ( 625012) : 22.61% 23.45% : RegionUsageHeap 0 ( 0) : 00.00% 00.00% : RegionUsagePageHeap 0 ( 0) : 00.00% 00.00% : RegionUsagePeb 1000 ( 4) : 00.00% 00.00% : RegionUsageProcessParametrs 1000 ( 4) : 00.00% 00.00% : RegionUsageEnvironmentBlock Tot: a8bf0000 (2764736 KB) Busy: a2a61000 (2664836 KB) -------------------- Type SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Usage 618f000 ( 99900) : 03.61% : <free> 13e22000 ( 325768) : 11.78% : MEM_IMAGE 1e77000 ( 31196) : 01.13% : MEM_MAPPED 8cdc8000 ( 2307872) : 83.48% : MEM_PRIVATE -------------------- State SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Usage 57235000 ( 1427668) : 51.64% : MEM_COMMIT 618f000 ( 99900) : 03.61% : MEM_FREE 4b82c000 ( 1237168) : 44.75% : MEM_RESERVE Largest free region: Base 7e4a1000 - Size 000ff000 (1020 KB)

    Read the article

  • How do I pass a LuaTable between two Lua states using LuaInterface?

    - by user316675
    I've been trying to pass a LuaTable class between two Lua states, like so: LuaManager L1 = new Lua(); LuaManager L2 = new Lua(); LuaTable table = L1.DoString("return {apple = 25}")[0]; L2["tbl"] = table; double results = L2.DoString("return tbl[\"apple\"]")[0]; Assert.AreEqual(25.0, results); The above test fails; I receive a return value of nil. Using the Immediate Window confirms that "table" is a non-null object, and that table["apple"] returns 25; it's something that's being lost in translation to L2. Interestingly, when the object is loaded back into the same state, the test works, like so: //Succeeds LuaManager lua = new Lua(); LuaTable table = lua.DoString("return {apple = 25}")[0]; lua["tbl"] = table; double results = lua.DoString("return tbl[\"apple\"]")[0]; Assert.AreEqual(25.0, results); How can I safely pass the LuaTables without hassles? Thanks in advance!

    Read the article

  • What do I need to know before accepting a contract position in the United States?

    - by Andrew
    I just received an initial job offer for a contract position as a PHP developer. I have never had a contract position before, so I don't know what the implications of this are, and how it differs from a salaried position with benefits. =/ What are some things that I should be aware of before accepting the contract position? (i.e. taxes, wages, benefits, etc) It also mentions that I will sign a "day-to-day contract". What does that mean? Resources Here are some links that I've collected so far: First timer's guide to contracting - Covers contracting in the U.K., but not the U.S. The contract employee's handbook - Talks about the differences between a "Contract Employee" and an "Independent Contractor"

    Read the article

  • What does this error states in asp.net-mvc?

    - by Pandiya Chendur
    I have repository class in asp.net mvc which has this, public Material GetMaterial(int id) { return db.Materials.SingleOrDefault(m => m.Mat_id == id); } And my controller has this for details action result, ConstructionRepository consRepository = new ConstructionRepository(); public ActionResult Details(int id) { Material material = consRepository.GetMaterial(id); return View(); } But why i get this error, The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Details(Int32)' in 'CrMVC.Controllers.MaterialsController'. To make a parameter optional its type should be either a reference type or a Nullable type. Parameter name: parameters Any suggestion...

    Read the article

  • free sql script to get a list of countries, provinces/states and their cities.

    - by reggie
    I am working on a registration page for a php website as mysql as the backend database. I need a sql script to insert the list of countries with their associated provinces and the provinces with their associated cities. I need all the countries, provinces and cities all over the world which are related to each other. I can get the individual list of countries, provinces and cities but there is no list that relates them together.. any help appreciated.. thanks in advance.

    Read the article

  • jquery html attribute not working in IE

    - by Gopal
    I am using country and state dropdowns in my form. Whenever the user selects the country in the dropdown, the respective states of the country will populate in the states dropdown. I am populating the states in the dropdown using ajax call. The problem is that the states get populated in Mozilla but it doesnt work in IE. I guess there is some problem in jquery while loading the states in the states dropdown. The jquery code i am using is $('select#edit-country').change(function(e) { $.getJSON("loadContactUsStates",{id: $(this).val(), ajax: 'true'}, function(j){ var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } <!-----I guess the problem is with the below line------------------> $("select#edit-state").html(options); })//end json });

    Read the article

  • what does this asp.net mvc compile time error states?

    - by Pandiya Chendur
    I have a repository class and it has this, using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using CrMVC.BusinessObjects; namespace CrMVC.Models { public class ConstructionRepository { private CRDataContext db = new CRDataContext(); public IQueryable<MaterialsObj> FindAllMaterials() { var materials = from m in db.Materials join Mt in db.MeasurementTypes on m.MeasurementTypeId equals Mt.Id select new MaterialsObj() { Id = Convert.ToInt64(m.Mat_id), Mat_Name = m.Mat_Name, Mes_Name = Mt.Name, }; return materials; } } } And My MaterialsObj class is under CrMVC.BusinessObjects namespace and i using it in my repository class.... namespace CrMVC.BusinessObjects { public class MaterialsObj { //My logic here } } But when i compile this i get this error c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\19360d4c\3d21e226\App_Web_materials.aspx.7d2669f4.a8f-zsw5.0.cs(148): error CS0426: The type name 'Materials' does not exist in the type 'CrMVC.Models.ConstructionRepository' Am i missing something any suggestion.... Edit: There is no class named Materials in my repository class then why i get this error..

    Read the article

  • Save object states in .data or attr - Performance vs CSS?

    - by Neysor
    In response to my answer yesterday about rotating an Image, Jamund told me to use .data() instead of .attr() First I thought that he is right, but then I thought about a bigger context... Is it always better to use .data() instead of .attr()? I looked in some other posts like what-is-better-data-or-attr or jquery-data-vs-attrdata The answers were not satisfactory for me... So I moved on and edited the example by adding CSS. I thought it might be useful to make a different Style on each image if it rotates. My style was the following: .rp[data-rotate="0"] { border:10px solid #FF0000; } .rp[data-rotate="90"] { border:10px solid #00FF00; } .rp[data-rotate="180"] { border:10px solid #0000FF; } .rp[data-rotate="270"] { border:10px solid #00FF00; } Because design and coding are often separated, it could be a nice feature to handle this in CSS instead of adding this functionality into JavaScript. Also in my case the data-rotate is like a special state which the image currently has. So in my opinion it make sense to represent it within the DOM. I also thought this could be a case where it is much better to save with .attr() then with .data(). Never mentioned before in one of the posts I read. But then i thought about performance. Which function is faster? I built my own test following: <!DOCTYPE HTML> <html> <head> <title>test</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> function runfirst(dobj,dname){ console.log("runfirst "+dname); console.time(dname+"-attr"); for(i=0;i<10000;i++){ dobj.attr("data-test","a"+i); } console.timeEnd(dname+"-attr"); console.time(dname+"-data"); for(i=0;i<10000;i++){ dobj.data("data-test","a"+i); } console.timeEnd(dname+"-data"); } function runlast(dobj,dname){ console.log("runlast "+dname); console.time(dname+"-data"); for(i=0;i<10000;i++){ dobj.data("data-test","a"+i); } console.timeEnd(dname+"-data"); console.time(dname+"-attr"); for(i=0;i<10000;i++){ dobj.attr("data-test","a"+i); } console.timeEnd(dname+"-attr"); } $().ready(function() { runfirst($("#rp4"),"#rp4"); runfirst($("#rp3"),"#rp3"); runlast($("#rp2"),"#rp2"); runlast($("#rp1"),"#rp1"); }); </script> </head> <body> <div id="rp1">Testdiv 1</div> <div id="rp2" data-test="1">Testdiv 2</div> <div id="rp3">Testdiv 3</div> <div id="rp4" data-test="1">Testdiv 4</div> </body> </html> It should also show if there is a difference with a predefined data-test or not. One result was this: runfirst #rp4 #rp4-attr: 515ms #rp4-data: 268ms runfirst #rp3 #rp3-attr: 505ms #rp3-data: 264ms runlast #rp2 #rp2-data: 260ms #rp2-attr: 521ms runlast #rp1 #rp1-data: 284ms #rp1-attr: 525ms So the .attr() function did always need more time than the .data() function. This is an argument for .data() I thought. Because performance is always an argument! Then I wanted to post my results here with some questions, and in the act of writing I compared with the questions Stack Overflow showed me (similar titles) And true enough, there was one interesting post about performance I read it and run their example. And now I am confused! This test showed that .data() is slower then .attr() !?!! Why is that so? First I thought it is because of a different jQuery library so I edited it and saved the new one. But the result wasn't changing... So now my questions to you: Why are there some differences in the performance in these two examples? Would you prefer to use data- HTML5 attributes instead of data, if it represents a state? Although it wouldn't be needed at the time of coding? Why - Why not? Now depending on the performance: Would performance be an argument for you using .attr() instead of data, if it shows that .attr() is better? Although data is meant to be used for .data()? UPDATE 1: I did see that without overhead .data() is much faster. Misinterpreted the data :) But I'm more interested in my second question. :) Would you prefer to use data- HTML5 attributes instead of data, if it represents a state? Although it wouldn't be needed at the time of coding? Why - Why not? Are there some other reasons you can think of, to use .attr() and not .data()? e.g. interoperability? because .data() is jquery style and HTML Attributes can be read by all... UPDATE 2: As we see from T.J Crowder's speed test in his answer attr is much faster then data! which is again confusing me :) But please! Performance is an argument, but not the highest! So give answers to my other questions please too!

    Read the article

  • moving between states I get an error in Flex.

    - by Adam
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. so i have a function that runs in state1 and has a while(myCanvas.rawChildren.numChildren > 0){ myCanvas.rawChildren.removeChildAt(0); } //this code is definitely the problem.... I can move to state2, but when I move back to state1 i get the error. why? the function that has the while loop only runs when something is searched in state1, so why is it running when coming back from state2?

    Read the article

  • ASP.net MVC3 entities, don't know how to count

    - by Spedax
    I have 2 tables, 1 with countries, 1 with states. The states table has a column with Population. I'm using entities and I have created a List of states for the countries public class TblCountries { //Entities for my table country ... public List<tblStates> States { get; set; } } So now I can for example List all the states that belong to a country. Now what I want to do is count the population, so I can show the population that of an entire country. I tried using in my view @foreach (var item in Model.Countries) { @Html.DisplayFor(modelItem => item.States.Count<population>) } But this doesn't work, anyone know how to do this? Thanks in advanced!

    Read the article

  • Is there a design pattern that expresses objects (an their operations) in various states?

    - by darren
    Hi I have a design question about the evolution of an object (and its state) after some sequence of methods complete. I'm having trouble articulating what I mean so I may need to clean up the question based on feedback. Consider an object called Classifier. It has the following methods: void initialise() void populateTrainingSet(TrainingSet t) void pupulateTestingSet(TestingSet t) void train() void test() Result predict(Instance i) My problem is that these methods need to be called in a certain order. Futher, some methods are invalid until a previous method is called, and some methods are invalid after a method has been called. For example, it would be invalid to call predict() before test() was called, and it would be invalid to call train() after test() was called. My approach so far has been to maintain a private enum that represents the current stateof the object: private static enum STATE{ NEW, TRAINED, TESTED, READY}; But this seems a bit cloogy. Is there a design pattern for such a problem type? Maybe something related to the template method.

    Read the article

  • How to store visited states in iterative deepening / depth limited search?

    - by colinfang
    Update: Search for the first solution. for a normal Depth First Search it is simple, just use a hashset bool DFS (currentState) = { if (myHashSet.Contains(currentState)) { return; } else { myHashSet.Add(currentState); } if (IsSolution(currentState) return true; else { for (var nextState in GetNextStates(currentState)) if (DFS(nextState)) return true; } return false; } However, when it becomes depth limited, i cannot simply do this bool DFS (currentState, maxDepth) = { if (maxDepth = 0) return false; if (myHashSet.Contains(currentState)) { return; } else { myHashSet.Add(currentState); } if (IsSolution(currentState) return true; else { for (var nextState in GetNextStates(currentState)) if (DFS(nextState, maxDepth - 1)) return true; } return false; } Because then it is not going to do a complete search (in a sense of always be able to find a solution if there is any) before maxdepth How should I fix it? Would it add more space complexity to the algorithm? Or it just doesn't require to memoize the state at all. Update: for example, a decision tree is the following: A - B - C - D - E - A | F - G (Goal) Starting from state A. and G is a goal state. Clearly there is a solution under depth 3. However, using my implementation under depth 4, if the direction of search happens to be A(0) -> B(1) -> C(2) -> D(3) -> E(4) -> F(5) exceeds depth, then it would do back track to A, however E is visited, it would ignore the check direction A - E - F - G

    Read the article

  • When a tech document states that something is IP-Aware was does that specifically mean?

    - by Mike
    I need a class room definition for IP-aware for a research assignment. I.E. something that would be used, lets say, in a dictionary. Does anyone know or provide me with a link to a defintiion, I am having no luck with searches. Are IP-Aware devices only devices that can read/find/make decisions based on IP addresses. For example a router would be one, but a network printer would not?

    Read the article

  • Create a model that switches between two different states using Temporal Logic?

    - by NLed
    Im trying to design a model that can manage different requests for different water sources. Platform : MAC OSX, using latest Python with TuLip module installed. For example, Definitions : Two water sources : w1 and w2 3 different requests : r1,r2,and r3 - Specifications : Water 1 (w1) is preferred, but w2 will be used if w1 unavailable. Water 2 is only used if w1 is depleted. r1 has the maximum priority. If all entities request simultaneously, r1's supply must not fall below 50%. - The water sources are not discrete but rather continuous, this will increase the difficulty of creating the model. I can do a crude discretization for the water levels but I prefer finding a model for the continuous state first. So how do I start doing that ? Some of my thoughts : Create a matrix W where w1,w2 ? W Create a matrix R where r1,r2,r3 ? R or leave all variables singular without putting them in a matrix I'm not an expert in coding so that's why I need help. Not sure what is the best way to start tackling this problem. I am only interested in the model, or a code sample of how can this be put together. edit Now imagine I do a crude discretization of the water sources to have w1=[0...4] and w2=[0...4] for 0, 25, 50, 75,100 percent respectively. == means implies Usage of water sources : if w1[0]==w2[4] -- meaning if water source 1 has 0%, then use 100% of water source 2 etc if w1[1]==w2[3] if w1[2]==w2[2] if w1[3]==w2[1] if w1[4]==w2[0] r1=r2=r3=[0,1] -- 0 means request OFF and 1 means request ON Now what model can be designed that will give each request 100% water depending on the values of w1 and w2 (w1 and w2 values are uncontrollable so cannot define specific value, but 0...4 is used for simplicity )

    Read the article

  • Strategy for restoring state via URL in web apps

    - by JW01
    This is a question about modern web apps, where a single page is loaded, and all subsequent navigation is done by XHR calls and modifying the DOM. We can use libraries that manipulate the hash string, which let us navigate by URL and support the back/forward buttons. But to use those libraries, we need to be able to move the UI from any one state to any other. Is there a good strategy for moving between UI states, that also allows them to be restored from scratch when you load a new URL? In a complex app, you might have a lot of different states. You don't want to reload the entire UI each time you change states. But you also don't want to require separate methods for moving from every state to each every state. Typically we need to: Restore a state from scratch, when you enter a new URL or hit Reload. Move from one state to another, when you use the Back/Forward buttons. Move from one state to another, when you perform an action within your app (like clicking a link). Move to certain states that shouldn't be added to the history, like ones that appear after form submissions. Move to some states that are built on the previous state, like a drill-down list. When you perform actions within your app, there's the additional question of which comes first: Do you change the URL, listen for the URL change, and change your state in response to it? Or do you change your state, then change the URL, but don't do anything in response? Does anyone have some experience to share on this topic?

    Read the article

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