Search Results

Search found 1325 results on 53 pages for 'factor'.

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

  • In what circumstances can large pages produce a speedup ?

    - by timday
    Modern x86 CPUs have the ability to support larger page sizes than the legacy 4K (ie 2MB or 4MB), and there are OS facilities (Linux, Windows) to access this functionality. The Microsoft link above states large pages "increase the efficiency of the translation buffer, which can increase performance for frequently accessed memory". Which isn't very helpful in predicting whether large pages will improve any given situation. I'm interested in concrete, preferably quantified, examples of where moving some program logic (or a whole application) to use huge pages has resulted in some performance improvement. Anyone got any success stories ? There's one particular case I know of myself: using huge pages can dramatically reduce the time needed to fork a large process (presumably as the number of TLB records needing copying is reduced by a factor on the order of 1000). I'm interested in whether huge pages can also benefit more mundane applications though.

    Read the article

  • Resources/Teaching ideas to teach computers to kids

    - by Shravan
    A small initiative from my work place plans to teach very basic computers to not so fortunate kids. I was looking for some very basic topics/resources. These kids are very young and have not seen/worked with a computer before. The fun factor should not be lost and hence I don't want it to be rigorous, just plain, what is computer, keyboard, mouse, browser, where to look for what (google.com) and so on. Has any-one done this sort of thing before, if yes, could you point me to some resources.

    Read the article

  • Is there a library / tool to query MySQL data files (MyISAM / InnoDB) without the server? (the SQLit

    - by MGW
    Oftentimes I want to query my MySQL data directly without a server running or without having access to the server (but having read / write rights to the files). Is there a tool or maybe even a library around to query MySQL data files like it is possible with SQLite? I'm specifically looking for InnoDB and MyISAM support. Performance is not a factor. I don't have any knowledge about MySQL internals, but I presume it should be possible to do and not too hard to get the specific code out? Thank you for any suggestions!

    Read the article

  • How to implement B+ Tree for file systems ?

    - by user312544
    I have a text file which contains some info on extents about all the files in the file system, like below C:\Program Files\abcd.txt 12345 100 23456 200 C:\Program Files\bcde.txt 56789 50 26746 300 ... Now i have another binary which tries to find out about extents for all the files. Now currently i am using linear search to find extent info for the files in the above mentioned text file. This is a time consuming process. Is there a better way of coding this ? Like Implementing any good data structure like BTree. If B+ Tree is used what is the key, branch factor i need to use ?

    Read the article

  • Refactoring multiple if statements for user authentication with subdomains

    - by go minimal
    I'm building a typical web app where once a user signs up they access the app through their own subdomain (company.myapp.com). The "checking what kind of user if any is logged in" piece is starting to get very hairy and it obviously needs to be well-written because its run so often so I was wondering how you guys would re-factor this stuff. Here are the different states: A user must be logged in, the user must not have a company name, and the sub-domain must be blank A user must be logged in, the user must have a company name, that company name must match the current sub-domain A user must be logged in, the user must have a company name, that company name must match the current sub-domain, and the user's is_admin boolean is true if !session[:user_id].nil? @user = User.find(session[:user_id]) if @user.company.nil? && request.subdomains.first.nil? return "state1" elsif [email protected]? if @user.company.downcase == request.subdomains.first.downcase && [email protected]_admin return "state2" elsif @user.company.downcase == request.subdomains.first.downcase && @user.is_admin return "state3" end end end

    Read the article

  • Mix and match class in C++/MFC

    - by Coder
    I'm trying to re-factor a code base, and there is some common functionality among unrelated classes that I'd love to unite. I would like to add that functionality in common base class, but I'm not sure if it's clean and good approach. Say I have CMyWnd class and CMyDialogEx class, both different, so they cannot inherit from one base class. I want to add a button to both classes and add the message handlers to both classes as well. So I'd like to do something like this: CMyWnd : public CWnd, public COnOkBtnFunctionality, public COnCancelBtnFunctionality CMyDialogEx: public CWnd, public COnOkBtnFunctionality Where COnOkBtnFunctionality would define CButton m_buttonOk, and all the afx_msg functions it should have. And so on. Is this approach doable/good? Or are there better patterns I should resort to?

    Read the article

  • Experience with protecting PHP code

    - by Alec Smart
    Hello, I am aware of that there are a number of code obfuscators/licensing programs for PHP. I wanted to know if anyone has actually used these and what their experience has been. Please note I do not want to know the solutions available. I want to know your experience using one of these solutions. Is it worth investing say 200$ purchasing a code obfuscator etc? I honestly would prefer something that does not have a loader etc. I know that it increases the chances of cracking, but I only want it to be a detrimental factor for them. Thank you for your time.

    Read the article

  • Ideas for band site, which technology to use?

    - by brux
    I am attempting to design and build a website for my friends band. There is minimal content to be included such as bio,news,enbemdded Audio/Visual material. My web dev expertise is average. I'm basicaly looking for inspiration, I was edging towards embedding a silverlight deepzoom xap object to add some visual stimulation, perhaps by featuring a high res photo of the bandshardware/equipment which zooms when mouseover occurs. Does anyone have any cool ideas for a central feature for this site, and which way to approact it in terms of technique (js,css,silverlight etc) If anyone has any immediate ideas which they think would be cool then I am eager to hear them! Also if anyone can link me to any cool band sites they have come across recently I would be greatful,nothing too complicated though please I will be doing all the work myself. Im want the site to be simple but have a certain wow factor!

    Read the article

  • Using c#,c/c++ or java to improve BBN with GA

    - by madicemickael
    I have a little problem in my little project , I wish that someone here could help me! I am planning to use a bayesian network as a decision factor in my game AI and I want to improve the decision making every step of the way , anyone knows how to do that ? Any tutorials / existing implementations will be very good,I hope some of you could help me. I heard that a programmer in this community did a good implementation of this put together for poker game AI.I am planning to use it like him ,but in another poker(Texas) or maybe Rentz. Looking for C/c++ or c# or java code. Thanks , Mike

    Read the article

  • Are there any well-known algorithms or computer models that computer scientists use to predict FIFA

    - by Khnle
    Occasionally I read news articles that mention about some computer models that computer scientists use to predict winners of some sporting events or the odds for betting which I think there must be a mathematical model behind it. I never bothered to think twice even though I am a "pseudo computer scientist" myself. With the 2010 FIFA World Cup just underway, and since I am also a "pseudo football/soccer player" myself, I just started to wonder about these calculations algorithms. For example, I know one factor is determining the strength of opponents, so that a win against a strong opponent can count more than a win against a weak opponent. But it now kind of gets in a circular loop, or at least how does one determine the strength of a team in the first place, before that team can be considered strong or weak? If it's based on a historical data then there's no way that could be accurate, because those players of the past are no longer on the fields so their impact is none (except maybe if they become coaches like Maradona) Anyway, long question short, if you're happen to be working in this field or have some knowledge, please shed some lights.

    Read the article

  • Stuck on solving the Minimal Spanning Tree problem.

    - by kunjaan
    I have reduced my problem to finding the minimal spanning tree in the graph. But I want to have one more constraint which is that the total degree for each vertex shouldnt exceed a certain constant factor. How do I model my problem? Is MST the wrong path? Do you know any algorithms that will help me? One more problem: My graph has duplicate edge weights so is there a way to count the number of unique MSTs? Are there algorithms that do this? Thank You. Edit: By degree, I mean the total number of edges connecting the vertex. By duplicate edge weight I mean that two edges have the same weight.

    Read the article

  • Best choice for off-site backup: dd vs tar

    - by plok
    I have two 1TB single-partition hard disks configured as RAID1, of which I would like to make an off-site backup on a third disk, which I am still to buy. The idea is to store the backup at a relative's house, considerably far away from my place, in the hope that all the information will be safe in the case of a global thermonuclear apocalypse. Of course, this backup would be well encrypted. What I still have to decide is whether I am going to simply tar the entire partition or, instead, use dd to create an image of the disks. Is there any non-trivial difference between these two approaches that I could be overlooking? This off-site backup would be updated no more than two or three times a year, in the best of the cases, so performance should not be a factor to be pondered at all. What, and why, would you use if you were me? dd, tar, or a third option?

    Read the article

  • File.Exists() returns false, but not in debug

    - by Tor Haugen
    I'm being completely confused here folks, My code throws an exception because File.Exists() returns false public override sealed TCargo ReadFile(string fileName) { if (!File.Exists(fileName)) { throw new ArgumentException("Provided file name does not exist", "fileName"); } Visual studio breaks at the throw statement, and I immediately check the value of File.Exists(fileName) in the immediate window. It returns true. When I drag the breakpoint back up to the if statement and execute it again, it throws again. fileName is an absolute path to a file. I'm not creating the file, nor writing to it (it's there all along). If I paste the path into the open dialog in Notepad, it reads the file without problems. The code is executing in a background worker. It's the only complicating factor I can think of. I am positive the file has not been opened already, either in the worker thread or elsewhere. What's going on here?

    Read the article

  • Where's the rest of the space used in this table?

    - by Eric H.
    I'm using SQL Server 2005. I have a table whose row size should be 124 bytes. It's all ints or floats, no NULL columns (so everything is fixed width). There is only one index, clustered. The fill factor is 0. After inserting a ton of data, sp_spaceused returns the following name rows reserved data index_size unused OHLC_Bar_Trl 117076054 29807664 KB 29711624 KB 92344 KB 3696 KB which shows a rowsize of approx (29807664*1024)/117076054 = 260 bytes/row. Where's the rest of the space? Is there some DBCC command I need to run to tighten up this table (I could not insert the rows in correct index order, so maybe it's just internal fragmentation)?

    Read the article

  • ggplot add percentage labels based on x-axis variables

    - by eugeneyan
    I've a ggplot that shows the counts of tweets for some brands as well as a label for the overall percentage. This was done with much help from this link: ggplot: showing % instead of counts in charts of categorical variables # plot ggplot of brands ggplot(data = test, aes(x = brand, fill = brand)) + geom_bar() + stat_bin(aes(label = sprintf("%.02f %%", ..count../sum(..count..)*100)), geom = 'text', vjust = -0.3) Next, I would like to plot it based on brand and sentiment, with the labels for the bars of each brand totalling up to 100%. However, I have difficulty amending my code to do this. Would you be able to help please? Also, would it be possible to change the colours for neu to blue and pos to green? # plot ggplot of brands and sentiment ggplot(data = test, aes(x = brand, fill = factor(sentiment))) + geom_bar(position = 'dodge') + stat_bin(aes(label = sprintf("%.02f %%", ..count../sum(..count..)*100)), geom = 'text', position = position_dodge(width = 0.9), vjust=-0.3)

    Read the article

  • Sound sample recognition library/code

    - by Daniel Mošmondor
    I don't want sound-to-text software. What I need is the following: I'll record multiple (say 50+) audio streams (recordings of radio stations) from that recordings, I'll mark interesting audio clips - their length ranges from 2 to 60 seconds - there will be few thousands of such audio clips library should be able to find other instances of same audio clips from recorded sound streams confidence factor should be reported to used and additional input provided so the recognition could perform better next time Do you know of such software library? LGPL would be most valuable to me, but I can go for commercial license as well.

    Read the article

  • [XNA] Forming bounding box only around visible sprites

    - by nadalian
    Hi, this site has been really amazing for helping me with game development however I'm unable to find an answer for the following question (nor am I able to solve it on my own). I am trying to do rectangle collision in my game. My idea is to 1) get the original collision bounding rectangle 2) Transform the texture (pos/rot/scale) 3) Factor changes of item into a matrix and then use this matrix to change the original collision bounds of the item. However, my textures contain a lot of transparency, transparency that affect the overall height/width of the texture (I do this to maintain power of two dimensions). My problem: How to create a rectangle that forms dimensions which ignore transparency around the object. A picture is provided below: http://img51.imageshack.us/img51/4772/boundingbox.png

    Read the article

  • is it safe to refactor my django models?

    - by Johnd
    My model is similar to this. Is this ok or should I make the common base class abstract? What are the differcenes between this or makeing it abstract and not having an extra table? It seems odd that there is only one primary key now that I have factored stuff out. class Input(models.Model): details = models.CharField(max_length=1000) user = models.ForeignKey(User) pub_date = models.DateTimeField('date published') rating = models.IntegerField() def __unicode__(self): return self.details class Case(Input): title = models.CharField(max_length=200) views = models.IntegerField() class Argument(Input): case = models.ForeignKey(Case) side = models.BooleanField() is this ok to factor stuff out intpu Input? I noticed Cases and Arguments share a primary Key. like this: CREATE TABLE "cases_input" ( "id" integer NOT NULL PRIMARY KEY, "details" varchar(1000) NOT NULL, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "pub_date" datetime NOT NULL, "rating" integer NOT NULL ) ; CREATE TABLE "cases_case" ( "input_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "cases_input" ("id"), "title" varchar(200) NOT NULL, "views" integer NOT NULL ) ; CREATE TABLE "cases_argument" ( "input_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "cases_input" ("id"), "case_id" integer NOT NULL REFERENCES "cases_case" ("input_ptr_id"), "side" bool NOT NULL )

    Read the article

  • Like-Button problems

    - by user1729293
    my name is Sebastian and i have massive problems with my like button on www.starsontv.com Everything should be ok said this link https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.starsontv.com%2F2012%2F10%2F06%2Fx-factor-2012-wer-schafft-es-noch-ins-juryhaus%2Fartikel-0014315%2F But you can´t use the like button. What is the problem? How can i solve this problem? This problems is there since yesterday. I have no idea and i didn´t change my website. Can anyone help me, please? Thank you very much.... Greetings from germany Sebastian

    Read the article

  • Pass the current state of a function into another function in C/C++

    - by sand
    Is there a way to pass the current state of a function into another function in C/C++? I mean all the parameters and local variables by current state. For example: void funcA (int a, int b) { char c; int d, e; // Do something with the variables. // ... funcB(); // Do something more. } void funcB() { // funcB() should be able to access variables a,b,c,d & e // and any change in these variables reflect into funcA(). } The code is in bad shape if there is a need for funcB() kind of functions. But can it be achieved? This can help if someone is starting to re-factor a long method with multiple parameters.

    Read the article

  • Aside from performance concerns, is Java still chosen over Groovy/JRuby etc.?

    - by yar
    [This is an empirical question about the state-of-the-art: I am NOT asking if Java is cooler or less cool than the dynamic languages that work in the JVM.] Aside from cases where performance is a main decision factor, do companies/developers still willingly chose Java over Groovy, JRuby or JPython? Personal Note: The reason I am asking is that, while I do some subset of my professional work in Ruby (not JRuby, for now), in my personal projects I use Java. While I have written non-trivial apps in Groovy, I prefer Java, but I wonder if I should just get over it and do everything in Groovy. I like Java because I feel that static typing saves me time and aids refactoring. (No, I am not familiar with Scala.) However, I feel that this very empirical, on-topic programming question may inform my decision.

    Read the article

  • Browser-Incompatability with image alignment in CSS using YUI grid (Firefox + Opera)

    - by Rotimi
    I'm having trouble with the alignment of two images on the footer of my temporary website (http://www.rotimioyewole.com). I'm new to the YUI grid, which I think may be a factor. It should look roughly like this (works correctly in Chrome and Safari, haven't tested IE yet): (http://cl.ly/44fH) But on FF and Opera look like this: http://cl.ly/44aO If I can have some sort of consistency then the website would at least be presentable. Ideally, I would also like to align both images on the same Y axis, as well as the text next to the icons. I had trouble figuring out how to search for a solution..can anybody help me? Thanks in advance

    Read the article

  • Can one extract model fit parameters after a ggplot stat_smooth call?

    - by Alex Holcombe
    Using stat_smooth, I can fit models to data. E.g. g=ggplot(tips,aes(x=tip,y=as.numeric(unclass(factor(tips$sex))-1))) +facet_grid(time~.) g=g+ stat_summary(fun.y=mean,geom="point") g=g+ stat_smooth(method="glm", family="binomial") I would like to know the coefficients of the glm binomial fits. I could re-do the fit with dlply and get the coefficients with ldply, but I'd like to avoid such duplication. Calling str(g) reveals the hierarchy of objects that ggplot creates, perhaps there's some way to get to the coefficients through that?

    Read the article

  • How to prevent illegal file and folder name creation in Windows Server 2003 or Windows Server 2008

    - by Joel Thibeault
    Preventing illegal file and Folder name creation on a Windows 2003/2008 file server is the goal. We know from articles like http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows that for some reason the file system allows creation of illegal file/folder chacters and paths that exceed the limitations of Windows. I need the following question answered: How to remove cabability to create file or folder creation in NTFS that contains invalid characters? Can you remove the POSIX subsystem from Windows to fix this issue? How does disabling 8.3 dos name creation factor into this issue? Will any of these fixes prevent linux clients from creating windows compliant files?

    Read the article

  • C# managed dll call or unmanaged dll call?

    - by 5YrsLaterDBA
    I was asking to do two dll calls from our application. These two dlls are from other group and other company. Have read a little about managed and unmanaged. I would prefer to do managed call. But whether use managed or unmanaged is the decision of the caller only or it also depends on the callee? All dlls can be called with managed code? If callee is also a factor, how can I know this dll can be called with managed code?

    Read the article

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