Search Results

Search found 9122 results on 365 pages for 'dynamic scripting'.

Page 53/365 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • does unused vertices in a 3D object affect performance?

    - by Gajet
    For my game I need to generate a mesh dynamically. now I'm wondering does it have a noticeable affect in fps if I allocate more vertices than what I'm actually using or not? and does it matter if I'm using DirectX or OpenGL? edit final output will be a w*h cell grid, but for technical issues it's much more easier for me to allocate (w+1)*(h+1) vertices. sure I'll only use w*h vertices in indexing, and I know there is some memory wasting there, but I want to know if it also affect fps or not? (note that mesh is only generated once in each time you play the game)

    Read the article

  • Script for creating directories and subdirectories on SBS 2008

    - by Rich Piedmont
    I have a small business server 2008 and have a directory named LAWFILES. I have a 6 digit file system (eg 106568) and I create a directory to store anything to do with the file (documents, outlook emails, PDFs, WAV files, ect.) I group 100 files in a 4 digit directory (eg 1065) for quicker access. My new years resolution is to organize these directories. I used to have a script the batch created directories and sub directories but it didn't work the last time I tried it (2 years ago). I would like to run a batch file that would ask for the 4 digit directory name (eg 1065) and then create that directory and 100 subdirectories (106500 - 106599) each of which contained subdirectories named "Documents," "Correspondence" & "Email-Voicemail" Can anyone suggest where I would go to find a scripting language that would be available to accomplish this? Thanks for the Help. Rich Piedmont

    Read the article

  • PropertyGrid: Merging multiple dynamic properties when editing multiple objects

    - by Andrei Stanescu
    Hi, Let's say I have a class A and a class B. I would like to edit using .NET PropertyGrid multiple instances of A and B simultaneously. The desired behavior would be to have the intersection of properties displayed. If A and B have static (written in the source code) properties everything works fine. Selecting A and B instances will only display the intersection of properties. However, if A and B also have dynamic properties (returned as a PropertyDescriptorCollection through the GetProperties() method) the behavior is wrong. When selecting multiple objects I will only see those static properties and none of the dynamic ones. When I select only one instance I can see all properties (static and dynamic). Anybody any ideas? I couldn't find anything on the internet.

    Read the article

  • Algorithm and data structure learning resources for dynamic programming

    - by Pranav
    Im learning dynamic programming now, and while I know the theory well, designing DP algorithms for new problems is still difficult. This is what i would really like now- A book or a website, which poses a problem which can be solved by dynamic programming. Also there is the solution with an explanation available, which i would like to see if i cant solve the problem even after butting my head at it for a few hours. Is there some resource that provides this sort of a thing for several categories of algorithms- like graph algorithms, dynamic programming, etc? P.S. I considered Topcoder, but the solutions there are not really appropriate for learning to implement efficient solutions.

    Read the article

  • How to make schema and code dynamic?

    - by Jonarch
    I want to make my database schema and application code as dynamic as possible to handle "unknown" use cases and changes. Developing in PHP and MySQL. Twice now I have had to change my entire schema including table and column names and this means the developers have to go back to the application code and modify all the SQL queries and table/columns names. So to prevent this I want to if just like we do on pages where we have page content, title bar etc dynamic like a %variable%, can we do it for the schema and maybe even for the php code functions and classes somehow? It takes weeks to re-do all changes like this vs if it is dynamic it can be done in under a day.

    Read the article

  • Problems with dynamic programming

    - by xan
    I've got difficulties with understanding dynamic programming, so I decided to solve some problems. I know basic dynamic algorithms like longest common subsequence, knapsack problem, but I know them because I read them, but I can't come up with something on my own :-( For example we have subsequence of natural numbers. Every number we can take with plus or minus. At the end we take absolute value of this sum. For every subsequence find the lowest possible result. in1: 10 3 5 4; out1: 2 in2: 4 11 5 5 5; out2: 0 in3: 10 50 60 65 90 100; out3: 5 explanation for 3rd: 5 = |10+50+60+65-90-100| what it worse my friend told me that it is simple knapsack problem, but I can't see any knapsack here. Is dynamic programming something difficult or only I have big problems with it?

    Read the article

  • Dynamic SQL queries in code possible?

    - by SeanD
    Instead of hard coding sql queries like Select * from users where user_id =220202 can these be made dynamic like Select * from $users where $user_id = $input. Reason i ask is when changes are needed to table/column names i can just update it in one place and don't have to ask developers to go line by line to find all references to update. It is very time consuming. And I do not like the idea of exposing database stuff in the code. My major concern is load time. Like with dynamic pages, the database has to fetch the page content, same way if queries are dynamic first system has to lookup the references then execute the queries, so does it impact load times? I am using codeignitor PHP. If it it possible then the next question is where to store all the references? In the app, in a file, in the DB, and how?

    Read the article

  • Dynamic control

    - by Geetha
    Hi all, I am creating dynamic label and textbox based on the number of values from the database for the selected item of the dropdownlist. Then the dynamic labels will have the names and the text box with the values. To retain the values of these controls im using Page_init event. So im using cache to hold the selectteditem from the dropdownlist. Problem: The process is going fine. But if i try to refresh the page no items are selected in the dropdown list but the cache is not getting clear so using this cache value dynamic control are creating. Geetha

    Read the article

  • Returning objects with dynamic memory

    - by Caulibrot
    I'm having trouble figuring out a way to return an object (declared locally within the function) which has dynamic memory attached to it. The problem is the destructor, which runs and deletes the dynamic memory when the object goes out of scope, i.e. when I return it and want to use the data in the memory that has been deleted! I'm doing this for an overloaded addition operator. I'm trying to do something like: MyObj operator+( const MyObj& x, const MyObj& y ) { MyObj z; // code to add x and y and store in dynamic memory of z return z; } My destructor is simply: MyObj::~MyObj() { delete [] ptr; } Any suggestions would be much appreciated!

    Read the article

  • Test disk recovery

    - by AIB
    I had a 250GB hard disk having several NTFS partitions. The disk was a dynamic disk (created in windows). Now when I formatted windows (which was in another disk), the dynamic disk is shown as offline. I tried using the testdisk tool to recover the data and created a partial backup. Testdisk is able to list all partitions in the disk. All partitions are shown as type 'D' (Deleted). I want to change the 'D' to 'P' (Primary), 'L'(Logical), 'E' (Extended) appropriately and build a new partition table. If I can write the partition table to disk, the disk will be of 'basic' type and should be readable in all OS. What should be the appropriate partition types? I checked the files on the partitions and no OS was ound. So none of the partitions were bootable. Will randomly selecting P,L,E hurt the data in anyway?

    Read the article

  • Which software raid modes does each version of Windows 7 support?

    - by Goyuix
    Being familiar with the software raid modes and dynamic disks from the server versions, I was wondering if there is a document or even just common crowd knowledge that indicated what software raid support was available for each version of Windows 7. Also - all the various raid levels supported for booting or just a data recovery mechanism (e.g. you can connect three RAID-5 dynamic disks to an already booted system). I would prefer to stay away from modified/copied DLL's from the server variants, as well - please note - this is Windows software RAID - not fake-raid from your BIOS or an add-on card.

    Read the article

  • Excel 2007 Pivot Tables: Overlapping issue hampers my summary sheet

    - by Mike
    I've created a Workbook that has 5 Pivot Tables (PT). I want to make a summary sheet that holds all these PT's, but when they expand the 'not allowed to overlap issue' causes me updating problems - they don't update/expand effectively. Therefore, can't be printed off easily. The sheet would basically help my users give their bosses a simple quick overview of the larger worksheet - this way they would be more inclined to fill it in (give a little too get a little philosophy). I had thought about using the Camera Tool, but I'm not sure how you could make it dynamic, or whether it can be dynamic with a PT? Any advice, links or step-by-steps are greatly appreciated. Thanks Mike.

    Read the article

  • virtualbox 2 vmware disk

    - by anol
    I have a virtualbox disk I'd like to convert to a vmware disk. The disk is dynamic which makes it a lot more trickier. If I follow the instructions at http://xpapad.wordpress.com/2010/02/21/migrating-from-virtualbox-to-vmware-in-linux, the vdi-to-raw conversion will result in a 2 TB file. I don't even have that much disk space! The first step therefore seems to be a dynamic to static conversion of the virtualbox disk, right? How do I do that or is there perhaps a better way to convert to vmware? Help!

    Read the article

  • Hardware needed for 2000 users? [closed]

    - by Trcx
    I have school assignment that is fairly well defined, requiring us to come up with a plan for an environment serving dynamic web applications to 2000 users, and should be able to scale up to six thousand. I have done plenty of research as far as load balancing, redundancy, UPSs, etc, but am having a hard time figuring out how much hardware is actually needed in the way of physical servers, ram, processing power, etc. The assignment states that the server will have a lot of dynamic code, email, and a database are required, all utilizing the appropriate microsoft service (MS SQL, Exchange, IIS). I already plan on splitting them out on to separate servers, but can't even fathom the hardware requirements of something that large scale. Could someone with experience weight in on this, or point me two some good articles?

    Read the article

  • The last MVVM you'll ever need?

    - by Nuri Halperin
    As my MVC projects mature and grow, the need to have some omnipresent, ambient model properties quickly emerge. The application no longer has only one dynamic pieced of data on the page: A sidebar with a shopping cart, some news flash on the side – pretty common stuff. The rub is that a controller is invoked in context of a single intended request. The rest of the data, even though it could be just as dynamic, is expected to appear on it's own. There are many solutions to this scenario. MVVM prescribes creating elaborate objects which expose your new data as a property on some uber-object with more properties exposing the "side show" ambient data. The reason I don't love this approach is because it forces fairly acute awareness of the view, and soon enough you have many MVVM objects laying around, and views have to start doing null-checks in order to ensure you really supplied all the values before binding to them. Ick. Just as unattractive is the ViewData dictionary. It's not strongly typed, and in both this and the MVVM approach someone has to populate these properties – n'est pas? Where does that live? With MVC2, we get the formerly-futures  feature Html.RenderAction(). The feature allows you plant a line in a view, of the format: <% Html.RenderAction("SessionInterest", "Session"); %> While this syntax looks very clean, I can't help being bothered by it. MVC was touting a very strong separation of concerns, the Model taking on the role of the business logic, the controller handling route and performing minimal view-choosing operations and the views strictly focused on rendering out angled-bracket tags. The RenderAction() syntax has the view calling some controller and invoking it inline with it's runtime rendering. This – to my taste – embeds too much  knowledge of controllers into the view's code – which was allegedly forbidden.  The one way flow "Controller Receive Data –> Controller invoke Model –> Controller select view –> Controller Hand data to view" now gets a "View calls controller and gets it's own data" which is not so one-way anymore. Ick. I toyed with some other solutions a bit, including some base controllers, special view classes etc. My current favorite though is making use of the ExpandoObject and dynamic features with C# 4.0. If you follow Phil Haack or read a bit from David Heyden you can see the general picture emerging. The game changer is that using the new dynamic syntax, one can sprout properties on an object and make use of them in the view. Well that beats having a bunch of uni-purpose MVVM's any day! Rather than statically exposed properties, we'll just use the capability of adding members at runtime. Armed with new ideas and syntax, I went to work: First, I created a factory method to enrich the focuse object: public static class ModelExtension { public static dynamic Decorate(this Controller controller, object mainValue) { dynamic result = new ExpandoObject(); result.Value = mainValue; result.SessionInterest = CodeCampBL.SessoinInterest(); result.TagUsage = CodeCampBL.TagUsage(); return result; } } This gives me a nice fluent way to have the controller add the rest of the ambient "side show" items (SessionInterest, TagUsage in this demo) and expose them all as the Model: public ActionResult Index() { var data = SyndicationBL.Refresh(TWEET_SOURCE_URL); dynamic result = this.Decorate(data); return View(result); } So now what remains is that my view knows to expect a dynamic object (rather than statically typed) so that the ASP.NET page compiler won't barf: <%@ Page Language="C#" Title="Ambient Demo" MasterPageFile="~/Views/Shared/Ambient.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> Notice the generic ViewPage<dynamic>. It doesn't work otherwise. In the page itself, Model.Value property contains the main data returned from the controller. The nice thing about this, is that the master page (Ambient.Master) also inherits from the generic ViewMasterPage<dynamic>. So rather than the page worrying about all this ambient stuff, the side bars and panels for ambient data all reside in a master page, and can be rendered using the RenderPartial() syntax: <% Html.RenderPartial("TagCloud", Model.SessionInterest as Dictionary<string, int>); %> Note here that a cast is necessary. This is because although dynamic is magic, it can't figure out what type this property is, and wants you to give it a type so its binder can figure out the right property to bind to at runtime. I use as, you can cast if you like. So there we go – no violation of MVC, no explosion of MVVM models and voila – right? Well, I could not let this go without a tweak or two more. The first thing to improve, is that some views may not need all the properties. In that case, it would be a waste of resources to populate every property. The solution to this is simple: rather than exposing properties, I change d the factory method to expose lambdas - Func<T> really. So only if and when a view accesses a member of the dynamic object does it load the data. public static class ModelExtension { // take two.. lazy loading! public static dynamic LazyDecorate(this Controller c, object mainValue) { dynamic result = new ExpandoObject(); result.Value = mainValue; result.SessionInterest = new Func<Dictionary<string, int>>(() => CodeCampBL.SessoinInterest()); result.TagUsage = new Func<Dictionary<string, int>>(() => CodeCampBL.TagUsage()); return result; } } Now that lazy loading is in place, there's really no reason not to hook up all and any possible ambient property. Go nuts! Add them all in – they won't get invoked unless used. This now requires changing the signature of usage on the ambient properties methods –adding some parenthesis to the master view: <% Html.RenderPartial("TagCloud", Model.SessionInterest() as Dictionary<string, int>); %> And, of course, the controller needs to call LazyDecorate() rather than the old Decorate(). The final touch is to introduce a convenience method to the my Controller class , so that the tedium of calling Decorate() everywhere goes away. This is done quite simply by adding a bunch of methods, matching View(object), View(string,object) signatures of the Controller class: public ActionResult Index() { var data = SyndicationBL.Refresh(TWEET_SOURCE_URL); return AmbientView(data); } //these methods can reside in a base controller for the solution: public ViewResult AmbientView(dynamic data) { dynamic result = ModelExtension.LazyDecorate(this, data); return View(result); } public ViewResult AmbientView(string viewName, dynamic data) { dynamic result = ModelExtension.LazyDecorate(this, data); return View(viewName, result); } The call to AmbientView now replaces any call the View() that requires the ambient data. DRY sattisfied, lazy loading and no need to replace core pieces of the MVC pipeline. I call this a good MVC day. Enjoy!

    Read the article

  • Getting values from Dynamic elements.

    - by nCdy
    I'm adding some dynamic elements to my WebApp this way : (Language used is Nemerele (It has a simple C#-like syntax)) unless (GridView1.Rows.Count==0) { foreach(index with row = GridView1.Rows[index] in [0..GridView1.Rows.Count-1]) { row.Cells[0].Controls.Add ({ def TB = TextBox(); TB.EnableViewState = false; unless(row.Cells[0].Text == "&nbsp;") { TB.Text = row.Cells[0].Text; row.Cells[0].Text = ""; } TB.ID=TB.ClientID; TB.Width = 60; TB }); row.Cells[0].Controls.Add ({ def B = Button(); B.EnableViewState = false; B.Width = 80; B.Text = "?????????"; B.UseSubmitBehavior=false; // Makes no sense //B.OnClientClick="select(5);"; // HERE I CAN KNOW ABOUT TB.ID //B.Click+=EventHandler(fun(_,_) : void { }); // POST BACK KILL THAT ALL B }); } } This textboxes must make first field of GridView editable so ... but now I need to save a values. I can't do it on server side because any postback will Destroy all dynamic elements so I must do it without Post Back. So I try ... <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript"> function CallPageMethod(methodName, onSuccess, onFail) { var args = ''; var l = arguments.length; if (l > 3) { for (var i = 3; i < l - 1; i += 2) { if (args.length != 0) args += ','; args += '"' + arguments[i] + '":"' + arguments[i + 1] + '"'; } } var loc = window.location.href; loc = (loc.substr(loc.length - 1, 1) == "/") ? loc + "Report.aspx" : loc; $.ajax({ type: "POST", url: loc + "/" + methodName, data: "{" + args + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: onSuccess, fail: onFail }); } function select(index) { var id = $("#id" + index).html(); CallPageMethod("SelectBook", success, fail, "id",id); } function success(response) { alert(response.d); } function fail(response) { alert("&#1054;&#1096;&#1080;&#1073;&#1082;&#1072;."); } </script> So... here is a trouble string : var id = $("#id" + index).html(); I know what is ID here : TB.ID=TB.ClientID; (when I add it) but I have no idea how to send it on Web Form. If I can add something like this div : <div id="Result" onclick="select(<%= " TB.ID " %>);"> Click here. </div> from the code it will be really goal, but I can't add this element as from CodeBehind as a dynamic element. So how can I transfer TB.ID or TB.ClientID to some static div Or how can I add some clickable dynamic element without PostBack to not destroy all my dynamic elements. Thank you.

    Read the article

  • How can I sandbox Python in pure Python?

    - by Blixt
    I'm developing a web game in pure Python, and want some simple scripting available to allow for more dynamic game content. Game content can be added live by privileged users. It would be nice if the scripting language could be Python. However, it can't run with access to the environment the game runs on since a malicious user could wreak havoc which would be bad. Is it possible to run sandboxed Python in pure Python? If not, are there any open source script interpreters written in pure Python that I could use? The requirements are support for variables, basic conditionals and function calls (not definitions).

    Read the article

  • PowerShell Script to Find and Replace for all Files with a Specific Extension

    - by Brandon
    I have several configuration files on Windows Server 2008 nested like such: C:\Projects\Project_1\project1.config C:\Projects\Project_2\project2.config In my configuration I need to do a string replace like such: <add key="Environment" value="Dev"/> will become: <add key="Environment" value="Demo"/> I thought about using batch scripting, but there was no good way to do this, and I heard that with PowerShell scripting you can easily perform this. I have found examples of find/replace, but I was hoping for a way that would traverse all folders within my C:\Projects directory and find any files that end with the '.config' extension. When it finds one, I want it to replace my string values. Any good resources to find out how to do this or any PowerShell gurus that can offer some insight?

    Read the article

  • Does the Frontier Kernel have a future?

    - by pbreitenbach
    Whatever you think about Dave Winer, Frontier is an incredible piece of software. It includes quite a few advances that have yet to be surpassed: the object database, the database viewer, the scripting environment, the hierarchical-including website generation scheme, the elegant scripting language, the mixing of scripts and compilation, rapid prototyping, built in web server, simple debugger, cross-platform, simple UI, etc. My question: Dave turned Frontier over to open source and there is a Frontier Kernel project. However it is fairly quiet. Does Frontier have a future from here?

    Read the article

  • Ruby on Rails: What are Erubis' disadvantages and why isn't it packaged with Rails by default? How t

    - by williamjones
    I just discovered Erubis, a replacement for the default view renderer for Ruby on Rails. However, from what I can tell from reading about it, it's superior across the board. It is much faster. It has many more options. It can prevent cross site scripting without having to use h. Does this have any disadvantages versus the standard erb renderer? Why isn't this the standard renderer packaged with Rails? Also, the docs for Erubis say to install it just by installing the gem, and then add the following to environment.rb: require 'erubis/helpers/rails_helper' #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby Reading the docs, FastEruby seems to be just a faster renderer than Eruby. Why wouldn't it be default and used by everyone? I'm highly interested in using the engine erubis::EscapedEruby which automatically calls h to escape html on fields from the database. Are there any gotchas I should be aware of or does this pretty much solve all cross site scripting?

    Read the article

  • Checking if parsed date is within a date range

    - by Brett Powell
    So I am using a scripting language with c++-like syntax, and I am trying to think of the best way to check if a date is within range. The problem I am running into is that if the current day is in a new month, the check is failing. Here is what my code looks like: if(iMonth >= iStartMonth && iMonth <= iEndMonth) { if(iDay >= iStartDay && iDay <= iEndDay) { if(iYear >= iStartYear && iYear <= iEndYear) { bEnabled = true; return; When I have something like this: Start date: 3 27 2010 End Date: 4 15 2010 Current Date: 3 31 2010 The day check fails because if (iDay <= iEndDay) does not pass. The scripting language doesn't have a lot of time related functions, and I can't compare timestamps because I'm allowing users to put like "03:27:2010" and "04:15:2010" as start/end dates in a config file. I'm assuming I am just not thinking straight and missing an easy fix.

    Read the article

  • How to copy files from local machine to server using SSH file transfer protocol?

    - by morpheous
    I have an Ubuntu 9.10 desktop machine which I use locally. I am setting up a server on a hosting provider. The server will run a very minimal version of Ubuntu server LTS (only LAMP and email server no GUI). I want to write a script (scheduled as a cron job) that will allow me to upload local files onto the server. I want to use [SFTP][1], for security reasons. I am new to shell scripting - but I guess shell scripting is the way to do this (unless I am mistaken). Can anyone provide me with the initial pointers on how to go about writing such a script, in order to SECURELY upload local files to the server? Ideally, I would like to compress the files before the transfer (to save on bandwidth) [1]: http://SSH file transfer protocol

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >