Daily Archives

Articles indexed Tuesday April 13 2010

Page 28/126 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • PHP - Plesk - Cron - Allowed memory size exhausted?

    - by John
    ini_set('max_execution_time',0); ini_set('memory_limit','1000M'); These are the first two lines at the very top of my script. I was under the impression if I ran something via cron memory limits didn't apply, but I was wrong. Safe mode is off and when I test to see if these values are being set they are but I keep getting the good ol' "PHP Fatal: Memory exhausted" error. Any ideas what I may be doing wrong? And whats the "more elegant way" of writing "infinite" for the "memory limit" value is it -1 or something?

    Read the article

  • how to create registry key through java program?

    - by Arivu2020
    I want to create registry key through java program to add the jar file in the start up. RegistryKey r=new RegistryKey(RootKey.HKEY_CURRENT_USER,"Software/Microsoft/Windows/CurrentVersion/Run"); r.createSubkey("sample"); But i got the error: Exception in thread "main" java.lang.UnsatisfiedLinkError: ca.beq.util.win32.registry.RegistryKey.testInitialized()V at ca.beq.util.win32.registry.RegistryKey.testInitialized(Native Method) How can i do that? Thanks

    Read the article

  • Cover flow model in iphone

    - by abdulsamad
    I am making the cover flow model on the iPhone using the tutorial found here: http://www.chaosinmotion.com/flowcover.m I want to move the cover flow animation up in the screen at height of about 150, but when I change the starting y point of the rectangle, then my image is cut off from the top. How can I prevent this?

    Read the article

  • Trying to match what is before /../ but after / with regular expressions

    - by tim
    I am trying to match what is before /../ but after / with regular expressions, but i want it to look back and stop at the first / I feel like I am close but it just looks at the first slash and then takes everything after it like... input is this: this/is/a/./path/that/../includes/face/./stuff/../hat and my regular expression is #\/(.*)\.\.\/# matching /is/a/./path/that/../includes/face/./stuff/../ instead of just that/../ and stuff/../ how can i adapt what i'm doing to work?

    Read the article

  • Setting height of a relatively positioned DIV

    - by Salman A
    I have following HTML+CSS markup: <div id="protofade" style="position: relative;"> <div style="position: absolute;"><img src="slide-01.jpg"></div> <div style="position: absolute;"><img src="slide-02.jpg"></div> <div style="position: absolute;"><img src="slide-03.jpg"></div> </div> Notice that the slides are absolute-positioned inside a relative-positioned element so that the top-left corners of all slides are aligned together. All slides are equal height, but the height is not pre-determined hence this problem: the "protofade" div does not have a height. Is there any CSS trick that can make this div as tall as the first slide without explicitly specifying height: NNpx.

    Read the article

  • If we don't like it for the presentation layer, then why do we tolerate it for the behavior layer?

    - by greim
    Suppose CSS as we know it had never been invented, and the closest we could get was to do this: <script> // this is the page's stylesheet $(document).ready(function(){ $('.error').css({'color':'red'}); $('a[href]').css({'textDecoration':'none'}); ... }); </script> If this was how we were forced to write code, would we put up with it? Or would every developer on Earth scream at browser vendors until they standardized upon CSS, or at least some kind of declarative style language? Maybe CSS isn't perfect, but hopefully it's obvious how it's better than the find things, do stuff method shown above. So my question is this. We've seen and tasted of the glory of declarative binding with CSS, so why, when it comes to the behavioral/interactive layer, does the entire JavaScript community seem complacent about continuing to use the kludgy procedural method described above? Why for example is this considered by many to be the best possible way to do things: <script> $(document).ready(function(){ $('.widget').append("<a class='button' href='#'>...</div>"); $('a[href]').click(function(){...}); ... }); </script> Why isn't there a massive push to get XBL2.0 or .htc files or some kind of declarative behavior syntax implemented in a standard way across browsers? Is this recognized as a need by other web development professionals? Is there anything on the horizon for HTML5? (Caveats, disclaimers, etc: I realize that it's not a perfect world and that we're playing the hand we've been dealt. My point isn't to criticize the current way of doing things so much as to criticize the complacency that exists about the current way of doing things. Secondly, event delegation, especially at the root level, is a step closer to having a declarative behavior layer. It solves a subset of the problem, but it can't create UI elements, so the overall problem remains.)

    Read the article

  • Visual Studio 2010 and .NET 4 Released

    - by ScottGu
    The final release of Visual Studio 2010 and .NET 4 is now available. Download and Install Today MSDN subscribers, as well as WebsiteSpark/BizSpark/DreamSpark members, can now download the final releases of Visual Studio 2010 and TFS 2010 through the MSDN subscribers download center.  If you are not an MSDN Subscriber, you can download free 90-day trial editions of Visual Studio 2010.  Or you can can download the free Visual Studio express editions of Visual Web Developer 2010, Visual Basic 2010, Visual C# 2010 and Visual C++.  These express editions are available completely for free (and never time out).  If you are looking for an easy way to setup a new machine for web-development you can automate installing ASP.NET 4, ASP.NET MVC 2, IIS, SQL Server Express and Visual Web Developer 2010 Express really quickly with the Microsoft Web Platform Installer (just click the install button on the page). What is new with VS 2010 and .NET 4 Today’s release is a big one – and brings with it a ton of new feature and capabilities. One of the things we tried hard to focus on with this release was to invest heavily in making existing applications, projects and developer experiences better.  What this means is that you don’t need to read 1000+ page books or spend time learning major new concepts in order to take advantage of the release.  There are literally thousands of improvements (both big and small) that make you more productive and successful without having to learn big new concepts in order to start using them.  Below is just a small sampling of some of the improvements with this release: Visual Studio 2010 IDE  Visual Studio 2010 now supports multiple-monitors (enabling much better use of screen real-estate).  It has new code Intellisense support that makes it easier to find and use classes and methods. It has improved code navigation support for searching code-bases and seeing how code is called and used.  It has new code visualization support that allows you to see the relationships across projects and classes within projects, as well as to automatically generate sequence diagrams to chart execution flow.  The editor now supports HTML and JavaScript snippet support as well as improved JavaScript intellisense. The VS 2010 Debugger and Profiling support is now much, much richer and enables new features like Intellitrace (aka Historical Debugging), debugging of Crash/Dump files, and better parallel debugging.  VS 2010’s multi-targeting support is now much richer, and enables you to use VS 2010 to target .NET 2, .NET 3, .NET 3.5 and .NET 4 applications.  And the infamous Add Reference dialog now loads much faster. TFS 2010 is now easy to setup (you can now install the server in under 10 minutes) and enables great source-control, bug/work-item tracking, and continuous integration support.  Testing (both automated and manual) is now much, much richer.  And VS 2010 Premium and Ultimate provide much richer architecture and design tooling support. VB and C# Language Features VB and C# in VS 2010 both contain a bunch of new features and capabilities.  VB adds new support for automatic properties, collection initializers, and implicit line continuation support among many other features.  C# adds support for optional parameters and named arguments, a new dynamic keyword, co-variance and contra-variance, and among many other features. ASP.NET 4 and ASP.NET MVC 2 With ASP.NET 4, Web Forms controls now render clean, semantically correct, and CSS friendly HTML markup. Built-in URL routing functionality allows you to expose clean, search engine friendly, URLs and increase the traffic to your Website.  ViewState within applications can now be more easily controlled and made smaller.  ASP.NET Dynamic Data support has been expanded.  More controls, including rich charting and data controls, are now built-into ASP.NET 4 and enable you to build applications even faster.  New starter project templates now make it easier to get going with new projects.  SEO enhancements make it easier to drive traffic to your public facing sites.  And web.config files are now clean and simple. ASP.NET MVC 2 is now built-into VS 2010 and ASP.NET 4, and provides a great way to build web sites and applications using a model-view-controller based pattern. ASP.NET MVC 2 adds features to easily enable client and server validation logic, provides new strongly-typed HTML and UI-scaffolding helper methods.  It also enables more modular/reusable applications.  The new <%: %> syntax in ASP.NET makes it easier to HTML encode output.  Visual Studio 2010 also now includes better tooling support for unit testing and TDD.  In particular, “Consume first intellisense” and “generate from usage" support within VS 2010 make it easier to write your unit tests first, and then drive your implementation from them. Deploying ASP.NET applications gets a lot easier with this release. You can now publish your Websites and applications to a staging or production server from within Visual Studio itself. Visual Studio 2010 makes it easy to transfer all your files, code, configuration, database schema and data in one complete package. VS 2010 also makes it easy to manage separate web.config configuration files settings depending upon whether you are in debug, release, staging or production modes. WPF 4 and Silverlight 4 WPF 4 includes a ton of new improvements and capabilities including more built-in controls, richer graphics features (cached composition, pixel shader 3 support, layoutrounding, and animation easing functions), a much improved text stack (with crisper text rendering, custom dictionary support, and selection and caret brush options).  WPF 4 also includes a bunch of support to enable you to take advantage of new Windows 7 features – including multi-touch and Windows 7 shell integration. Silverlight 4 will launch this week as well.  You can watch my Silverlight 4 launch keynote streamed live Tuesday (April 13th) at 8am Pacific Time.  Silverlight 4 includes a ton of new capabilities – including a bunch for making it possible to build great business applications and out of the browser applications.  I’ll be doing a separate blog post later this week (once it is live on the web) that talks more about its capabilities. Visual Studio 2010 now includes great tooling support for both WPF and Silverlight.  The new VS 2010 WPF and Silverlight designer makes it much easier to build client applications as well as build great line of business solutions, as well as integrate and bind with data.  Tooling support for Silverlight 4 with the final release of Visual Studio 2010 will be available when Silverlight 4 releases to the web this week. SharePoint and Azure Visual Studio 2010 now includes built-in support for building SharePoint applications.  You can now create, edit, build, and debug SharePoint applications directly within Visual Studio 2010.  You can also now use SharePoint with TFS 2010. Support for creating Azure-hosted applications is also now included with VS 2010 – allowing you to build ASP.NET and WCF based applications and host them within the cloud. Data Access Data access has a lot of improvements coming to it with .NET 4.  Entity Framework 4 includes a ton of new features and capabilities – including support for model first and POCO development, default support for lazy loading, built-in support for pluralization/singularization of table/property names within the VS 2010 designer, full support for all the LINQ operators, the ability to optionally expose foreign keys on model objects (useful for some stateless web scenarios), disconnected API support to better handle N-Tier and stateless web scenarios, and T4 template customization support within VS 2010 to allow you to customize and automate how code is generated for you by the data designer.  In addition to improvements with the Entity Framework, LINQ to SQL with .NET 4 also includes a bunch of nice improvements.  WCF and Workflow WCF includes a bunch of great new capabilities – including better REST, activation and configuration support.  WCF Data Services (formerly known as Astoria) and WCF RIA Services also now enable you to easily expose and work with data from remote clients. Windows Workflow is now much faster, includes flowchart services, and now makes it easier to make custom services than before.  More details can be found here. CLR and Core .NET Library Improvements .NET 4 includes the new CLR 4 engine – which includes a lot of nice performance and feature improvements.  CLR 4 engine now runs side-by-side in-process with older versions of the CLR – allowing you to use two different versions of .NET within the same process.  It also includes improved COM interop support.  The .NET 4 base class libraries (BCL) include a bunch of nice additions and refinements.  In particular, the .NET 4 BCL now includes new parallel programming support that makes it much easier to build applications that take advantage of multiple CPUs and cores on a computer.  This work dove-tails nicely with the new VS 2010 parallel debugger (making it much easier to debug parallel applications), as well as the new F# functional language support now included in the VS 2010 IDE.  .NET 4 also now also has the Dynamic Language Runtime (DLR) library built-in – which makes it easier to use dynamic language functionality with .NET.  MEF – a really cool library that enables rich extensibility – is also now built-into .NET 4 and included as part of the base class libraries.  .NET 4 Client Profile The download size of the .NET 4 redist is now much smaller than it was before (the x86 full .NET 4 package is about 36MB).  We also now have a .NET 4 Client Profile package which is a pure sub-set of the full .NET that can be used to streamline client application installs. C++ VS 2010 includes a bunch of great improvements for C++ development.  This includes better C++ Intellisense support, MSBuild support for projects, improved parallel debugging and profiler support, MFC improvements, and a number of language features and compiler optimizations. My VS 2010 and .NET 4 Blog Series I’ve been cranking away on a blog series the last few months that highlights many of the new VS 2010 and .NET 4 improvements.  The good news is that I have about 20 in-depth posts already written.  The bad news (for me) is that I have about 200 more to go until I’m done!  I’m going to try and keep adding a few more each week over the next few months to discuss the new improvements and how best to take advantage of them. Below is a list of the already written ones that you can check out today: Clean Web.Config Files Starter Project Templates Multi-targeting Multiple Monitor Support New Code Focused Web Profile Option HTML / ASP.NET / JavaScript Code Snippets Auto-Start ASP.NET Applications URL Routing with ASP.NET 4 Web Forms Searching and Navigating Code in VS 2010 VS 2010 Code Intellisense Improvements WPF 4 Add Reference Dialog Improvements SEO Improvements with ASP.NET 4 Output Cache Extensibility with ASP.NET 4 Built-in Charting Controls for ASP.NET and Windows Forms Cleaner HTML Markup with ASP.NET 4 - Client IDs Optional Parameters and Named Arguments in C# 4 - and a cool scenarios with ASP.NET MVC 2 Automatic Properties, Collection Initializers and Implicit Line Continuation Support with VB 2010 New <%: %> Syntax for HTML Encoding Output using ASP.NET 4 JavaScript Intellisense Improvements with VS 2010 Stay tuned to my blog as I post more.  Also check out this page which links to a bunch of great articles and videos done by others. VS 2010 Installation Notes If you have installed a previous version of VS 2010 on your machine (either the beta or the RC) you must first uninstall it before installing the final VS 2010 release.  I also recommend uninstalling .NET 4 betas (including both the client and full .NET 4 installs) as well as the other installs that come with VS 2010 (e.g. ASP.NET MVC 2 preview builds, etc).  The uninstalls of the betas/RCs will clean up all the old state on your machine – after which you can install the final VS 2010 version and should have everything just work (this is what I’ve done on all of my machines and I haven’t had any problems). The VS 2010 and .NET 4 installs add a bunch of new managed assemblies to your machine.  Some of these will be “NGEN’d” to native code during the actual install process (making them run fast).  To avoid adding too much time to VS setup, though, we don’t NGEN all assemblies immediately – and instead will NGEN the rest in the background when your machine is idle.  Until it finishes NGENing the assemblies they will be JIT’d to native code the first time they are used in a process – which for large assemblies can sometimes cause a slight performance hit. If you run into this you can manually force all assemblies to be NGEN’d to native code immediately (and not just wait till the machine is idle) by launching the Visual Studio command line prompt from the Windows Start Menu (Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt).  Within the command prompt type “Ngen executequeueditems” – this will cause everything to be NGEN’d immediately. How to Buy Visual Studio 2010 You can can download and use the free Visual Studio express editions of Visual Web Developer 2010, Visual Basic 2010, Visual C# 2010 and Visual C++.  These express editions are available completely for free (and never time out). You can buy a new copy of VS 2010 Professional that includes a 1 year subscription to MSDN Essentials for $799.  MSDN Essentials includes a developer license of Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, SQL Server 2008 DataCenter R2, and 20 hours of Azure hosting time.  Subscribers also have access to MSDN’s Online Concierge, and Priority Support in MSDN Forums. Upgrade prices from previous releases of Visual Studio are also available.  Existing Visual Studio 2005/2008 Standard customers can upgrade to Visual Studio 2010 Professional for a special $299 retail price until October.  You can take advantage of this VS Standard->Professional upgrade promotion here. Web developers who build applications for others, and who are either independent developers or who work for companies with less than 10 employees, can also optionally take advantage of the Microsoft WebSiteSpark program.  This program gives you three copies of Visual Studio 2010 Professional, 1 copy of Expression Studio, and 4 CPU licenses of both Windows 2008 R2 Web Server and SQL 2008 Web Edition that you can use to both develop and deploy applications with at no cost for 3 years.  At the end of the 3 years there is no obligation to buy anything.  You can sign-up for WebSiteSpark today in under 5 minutes – and immediately have access to the products to download. Summary Today’s release is a big one – and has a bunch of improvements for pretty much every developer.  Thank you everyone who provided feedback, suggestions and reported bugs throughout the development process – we couldn’t have delivered it without you.  Hope this helps, Scott P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • Where is the VM in LLVM?

    - by anon
    Note: marked as community wiki. Where is the Low Level Virtual Machine in LLVM? I see that we have llvm-g++ and c-lang, but to me, a LLVM is something almost like Valgrind of a simulator, where instructions are executed on it, and I can write programs to instrument the running code / interrupt when certain conditions happen / etc ... Where are the tools like this built on LLVM? Thanks!

    Read the article

  • How do i deserialize an object with pyYaml using safe_load?

    - by systempuntoout
    Having a snippet like this: import yaml class User(object): def __init__(self, name, surname): self.name= name self.surname= surname user = User('spam', 'eggs') serialized_user = yaml.dump(user) deserialized_user = yaml.load(serialized_user) print "name: %s, surname %s" % (deserialized_user.name, deserialized_user.surname) Yaml docs says that it is not safe to call yaml.load with any data received from an untrusted source; so, what do i need to modify to my snippet\class to use safe_load method? Is it possible?

    Read the article

  • Merging/filling pdf form file with xml data

    - by Giorgi
    Hello, Let's say I have a pdf form file available at website which is filled by the users and submitted to the server. On the server side (Asp.Net) I would like to merge the data that I receive in xml format with the empty pdf form that was filled and save it. As I have found there are several possible ways of doing it: Using pdf form created by adobe acrobat and filling it with itextsharp. Using pdf form created by adobe acrobat and filling it with FDF Toolkit .net (which seems to be using itextsharp internally) Usd pdfkt to fill the form. Use pdf form file created with adobe livecycle and merge the data by using Form Data Integration Service As I have no experience with this kind of task can you advise which option would be better/easier and give some additional tips? Thank you in advance.

    Read the article

  • Get current session /process id from inside a mysql query

    - by Indra Ginanjar
    I'm trying to create a table for pseudo array variable. That looks like CREATE TABLE IF NOT EXISTS `MyArray`.`ArrayTable` ( `ID` INT UNSIGNED NOT NULL COMMENT 'Hash value of SessionID + ArrayName' , `SessionID` INT UNSIGNED NOT NULL , `ArrayName` CHAR(26) NOT NULL COMMENT '32 digit char - 6 digit longest process id (assumtion)' , `Index` INT UNSIGNED NOT NULL , `Value` TEXT NOT NULL , PRIMARY KEY (`ID`, `SessionID`) ) ENGINE = MyISAM; The table is not normalized yet, 'hope this will make it a little simpler to understand :) To avoid collission between client, there should be a differentiator between client session. For that reason i think need to know current session/process id (just like "SHOW PROCESSLIST") but really need to know IN WHICH process the query are?

    Read the article

  • "NOT_SUPPORTED_BY_GUI" Exception in JCo

    - by cedar715
    We are having a BAPI that uploads the specified document to SAP. The BAPI accept three parameters: ID, FILE_LOC and FOLDER_NAME. And I'm setting the values as follows in the JCo code: JCO.ParameterList paramList = function.getImportParameterList(); paramList.setValue("101XS1", "EXTERNAL_ID"); paramList.setValue("tmp", "FOLDER_NAME"); paramList.setValue("D:/upload/foo.txt", "FILE_LOCATION"); But when I'm trying to execute the BAPI, am getting the following exception: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Exception condition "NOT_SUPPORTED_BY_GUI" raised. at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method) at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1242) at com.sap.mw.jco.JCO$Client.execute(JCO.java:3816) at com.sap.mw.jco.JCO$Client.execute(JCO.java:3261) The same BAPI is working fine if I execute through thick client(SAP Logon). But through JCo, its giving this error.

    Read the article

  • What are the basics of dealing with user input events in Android?

    - by user279112
    Hello. I thought I had understood this question, but something is quite wrong here. When the user (me, so far) tries to press keys, nothing really happens, and I am having a lot of trouble understanding what it is that I've missed. Consider this before I present some code to help clarify my problem: I am using Android's Lunar Lander example to make my first "real" Android program. In that example, of course, there exist a class LunarView, and class nested therein LunarThread. In my code the equivalents of these classes are Graphics and GraphicsThread, respectively. Also I can make sprite animations in 2D just fine on Android. I have a Player class, and let's say GraphicsThread has a Player member referred to as "player". This class has four coordinates - x1, y1, x2, and y2 - and they define a rectangle in which the sprite is to be drawn. I've worked it out so that I can handle that perfectly. Whenever the doDraw(Canvas canvas) method is invoked, it'll just look at the values of those coordinates and draw the sprite accordingly. Now let's say - and this isn't really what I'm trying to do with the program - I'm trying to make the program where all it does is display the Player sprite at one location of the screen UNTIL the FIRST time the user presses the Dpad's left button. Then the location will be changed to another set position on the screen, and the sprite will be drawn at that position for the rest of the program invariably. Also note that the GraphicsThread member in Graphics is called "thread", and that the SurfaceHolder member in GraphicsThread is called "mSurfaceHolder". So consider this method in class Graphics: @Override public boolean onKeyDown(int keyCode, KeyEvent msg) { return thread.keyDownHandler(keyCode, msg); } Also please consider this method in class GraphicsThread: boolean keyDownHandler(int keyCode, KeyEvent msg) { synchronized (mSurfaceHolder) { if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) { player.x1 = 100; player.y1 = 100; player.x2 = 120; player.y2 = 150; } } return true; } Now then assuming that player's coordinates start off as (200, 200, 220, 250), why won't he do anything different when I press Dpad: Left? Thanks!

    Read the article

  • C# Desktop Application "Encounters an error and has to exit" on first run of the day

    - by Sreedevi J
    Hello, It seems I tend to attract strange issues. This time, I have written a C# application, and handled most of the exceptions I can find. The problem is, when I run the installed/bundled version on any PC for the first time in a day (after the PC has been shut down and started after a while) it comes across some error and has to shutdown the application (even though the try-catch block surrounding the Main() does not fire). The application does not throw the same error on subsequent runs. I added an #if(!DEBUG) ... #else ... #endif surrounding the Main() code. Can anyone help me? Thanks!

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >