Daily Archives

Articles indexed Wednesday June 16 2010

Page 18/119 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • how to turn off Register_globals in php.ini? hostgator wordpress server.

    - by zeemy23
    I am running an ecommerce theme on wordpress on a hostgator server, and coming up with this error. Security warning: set the value *register_globals* in the php ini to Off !! This theme will not work correctly otherwise. I can't find the php.ini in any of the folders. I tried creating a file with the added command and putting it in root as suggested via google, with no luck. Any recommendations?otherwise.

    Read the article

  • c# convert string that has ctrl+z to regular string

    - by I__
    i have a string like this: some_string="A simple demo of SMS text messaging." + Convert.ToChar(26)); what is the SIMPLEST way of me getting rid of the char 26? please keep in mind that sometimes some_string has char 26 and sometimes it does not, and it can be in different positions too, so i need to know what is the most versatile and easiest way to get rid of char 26?

    Read the article

  • Strange behaviour with mediaplayer and seekTo

    - by Mathias Lin
    I'm implementing a custom video player because I need custom video controls. I have an app with only one activity, which on startup shall start playing a video right away. Now, the problem I have is: I don't want the video to start from the beginning, but from a later position. Therefore I do a seekTo(16867). Since seekTo is asynchronous, I place the start call of the mediaplayer (player.start()) in the onSeekComplete of the onSeekCompleteListener. The strange behaviour I experience though is that I can see/hear the video playing from the beginning for a few millisecs before it actually plays from/jumps to the position I seeked to. But - on the other hand - the Log output I call before the player.start returns the correct position 16867, where I seeked to. Below is the relevant code section, the complete class is at http://pastebin.com/jqAAFsuX (I'm on Nexus One / 2.2 StageFright) private void playVideo(String url) { try { btnVideoPause.setEnabled(false); if (player==null) { player=new MediaPlayer(); player.setScreenOnWhilePlaying(true); } else { player.stop(); player.reset(); } url = "/sdcard/myapp/main/videos/main.mp4"; // <--- just for test purposes hardcoded here now player.setDataSource(url); player.setDisplay(holder); player.setAudioStreamType(AudioManager.STREAM_MUSIC); player.setOnCompletionListener(this); player.setOnPreparedListener(this); player.setOnSeekCompleteListener(new MediaPlayer.OnSeekCompleteListener() { public void onSeekComplete(MediaPlayer mediaPlayer) { Log.d("APP", "current pos... "+ player.getCurrentPosition() ); player.start(); // <------------------ start video on seek completed player.setOnSeekCompleteListener(null); } }); player.prepareAsync(); } catch (Throwable t) { Log.e(TAG, "Exception in btnVideoPause prep", t); } } public void onPrepared(MediaPlayer mediaplayer) { width=player.getVideoWidth(); height=player.getVideoHeight(); if (width!=0 && height!=0) { holder.setFixedSize(width, height); progressBar.setProgress(0); progressBar.setMax(player.getDuration()); player.seekTo(16867); // <------------------ seeking to position } btnVideoPause.setEnabled(true); }

    Read the article

  • "Downloading" a computed value form JavaScript

    - by Travis Jensen
    I'm hoping you can prove me wrong here (please, please, please! ;). I have a situation where I need to download encrypted data from a Server D (for "Data"). Server K (for "Key") has the encryption key. For security sake, I would really prefer that Server D never know the key that Server K knows. What I want is my client (e.g. your browser) to connect to Server D for the data and Server K for the key and doe the decryption locally so the unencrypted stuff never leaves your computer. I can do this fine for text areas in the dom by replacing the contents of the HTML. However, sometimes, I would like to do larger files that I stream to the file system. For instance, perhaps I want to encrypt a movie and decrypt it and stream the contents to the my video player. I am not a JavaScript guru by any stretch, especially when it comes to the edge cases of things like the security sandbox. For Small D, I can handle the decryption, but I don't know how to save the decrypted file. Large D seems problematic as memory runs out. Anybody have any ideas that don't involve native plugins? Thanks!

    Read the article

  • How to configure Ubuntu for X11 client only?

    - by Shannon Severance
    I have Ubuntu 10.04 LTS server running within a VM (VMware Fusion) Currently I can only access the machine via character mode console. I would like to install whatever I need to install to run X11 client software on Ubuntu, without installing a full X11 Server. (I'll be using the X11 server within OS X, and ssh -X) What should I do?

    Read the article

  • c# getting a string within another string

    - by I__
    i have a string like this: some_string = "A simple demo of SMS text messaging.\r\n+CMGW: 3216\r\n\r\nOK\r\n\" im coming from vb.net and i need to know in c#, if i know the position of CMGW, how do i get "3215" out of there? i know that my start should be the position of CMGW + 6, but how do i make it stop as soon as it finds "\r" ?? again, my end result should be 3216 thank you!

    Read the article

  • Function Pointer

    - by Shaista Naaz
    How is that function pointer better than if-else or switch case? Is it because function pointer helps callback functions and thus promotes asynchronous implementation?

    Read the article

  • How to find server is down,

    - by user363638
    I have client and server in unix machine, how can i find out my server is down and reconnect to server. without bringing my client down. I am doing connect (), but read() isiving me error Transport endpoint is already connected. I am using C++ in solaris. And what return value of read and connect should i check.

    Read the article

  • how to make dynamic xaml in silverlight

    - by lina
    Good day! I want to make a form - a set of questions with different answer types: some questions have a number of answers and you can check one of the answers using radiobutton, other questions you should answer using a textbox, some answers have a datetime type and you choose answer for them using a DatePicker and so on. I get all information about the questions and answer types from a WCF service. I want to make this form using making a dynamic xaml but i've naver made dynamic xaml and I don't know exactly how to make it. Please, can you give me a council about dynamic xaml or maybe you have any other ideas about how to make this form? Thank you.

    Read the article

  • Riak link-walking like a join?

    - by tesmar
    Hi guys! I am looking to store pictures in a NoSQL database (<5MB) and link them to articles in a different bucket. What kind of speed does Riak's link walking feature offer? Is it like a RDBMS join at all?

    Read the article

  • what will be the code to move to previous textfield ?

    - by rajesh
    i have the code if i press down button it goes to next textfield but to go to previous textfield what should be the code ... <html> <head> <script language="JavaScript"> function handleKeyDownEvent(elementRef,eventRef) { var charCode = (window.event) ? eventRef.keyCode : eventRef.which; //alert(charCode); // Arrow keys (37:left, 38:up, 39:right, 40:down)... if (charCode == 40) { if (window.event) window.event.keyCode = 9; else event.which = 9; return true; } return true; } </script> </head> <body> <table width="433" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="235" align="center"><input type="text" onKeyDown="handleKeyDownEvent(this,event);" onKeyUp="handleKeyUpEvent(this,event);"></td> <td width="235" align="center"><input type="text" onKeyDown="handleKeyDownEvent(this,event);" onKeyUp="handleKeyUpEvent(this,event);"></td> </tr> <tr> <td width="235" align="center"><input type="text" onKeyDown="handleKeyDownEvent(this,event);" onKeyUp="handleKeyUpEvent(this,event);"></td> <td width="235" align="center"><input type="text" onKeyDown="handleKeyDownEvent(this,event);" onKeyUp="handleKeyUpEvent(this,event);"></td> </tr> <tr> <td> <input type="radio" id="check" name="check" checked> </td> <td> <input type="radio" id="check" name="check" checked> </td> </tr> <tr> <td><input type="checkbox" id="check" name="check"></td> <td><input type="checkbox" id="check" name="check"></td> </tr> </table> </body> </html>

    Read the article

  • LuaInterface: add a table to the script scope

    - by user93422
    Question: how can I insert a table from C# into 'LuaInterface' script scope using a C# object (preferably anonymous type)? /// I want to do this, but it does not work /// (complains that 'test' is userdata and not table /// when I pass it to pairs() in the script) //lua["test"] = new { A = 1, B = 2 }; /// another option /// but building this string is a PITA (actual string is nested and long). lua.DoString("test = { A = 1, B = 2 }"); // So I have to do this lua.NewTable("test"); ((LuaTable) lua["test"])["A"] = 1; ((LuaTable) lua["test"])["B"] = 2; lua.DoString("for k,v in pairs(test) do print(k..': '..v) end");

    Read the article

  • Diophantine Equation

    - by swapnika
    Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n): "Largest number of McNuggets that cannot be bought in exact quantity: n" Hints: Hypothesize possible instances of numbers of McNuggets that cannot be purchased exactly, starting with 1 For each possible instance, called n, 1. Test if there exists non-negative integers a, b, and c, such that 6a+9b+20c = n. (This can be done by looking at all feasible combinations of a, b, and c) 2. If not, n cannot be bought in exact quantity, save n When you have found six consecutive values of n that in fact pass the test of having an exact solution, the last answer that was saved (not the last value of n that had a solution) is the correct answer, since you know by the theorem that any amount larger can also be bought in exact quantity

    Read the article

  • Excel Plug-In Assembly Loading Problem (Access Denied)

    - by PlagueEditor
    I am developing an Excel 2003 add-in using Visual Studio 2008. My add-in loads fine; however, it loads plug-ins from other C# DLL's. I would like this to be done dynamically at run time so referencing them during development is something I would rather not do. Anyways, anytime I try to load a DLL from the Excel add-in at start up, it throws a security exception. This particular example is HTML Agility Pack. It's not a plug-in but a plug-in's dependency. But nonetheless it won't even load: {System.IO.FileLoadException: Could not load file or assembly 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418) File name: 'HtmlAgilityPack, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' ---> System.Security.Policy.PolicyException: Execution permission cannot be acquired. at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence) at System.Reflection.Assembly.LoadFile(String path) at Cjack.Druid.SourcePluginManager.LoadPlugin(String filePath) in C:\Documents and Settings\Annie Tormey\My Documents\Visual Studio 2008\Projects\DruidAddin2003\Druid\SourcePluginManager.cs:line 26 } This is extremely frustrating because it runs perfectly fine for Office 2010 and as a standalone application. Thank-you to anyone who can give me an answer as to why this is happening or a solution to fix it. Thank-you for your time.

    Read the article

  • More 'Edit' navigation item

    - by lennox_19
    I am using a UITabBarController as well as a UINavigationController on my app. In my UITabBarController I am using more than 5 items so I automatically get the 'More' item. I've managed to add a saving procedure so the order of those items will be kept in case somebody changes the order etc. With 'More' active I get the More navigation controller with the 'Edit' item positioned under my UINavigationController. Both navigation controller are visible. When I click on 'Edit though the More navigation controller disappears and seem to be hiding under my UINavigationController and therefore I can't see/use the 'Done' function to save my new order What did I miss? Cheers

    Read the article

  • Rapid Prototyping for Embedded Systems

    - by dr_pepper
    For doing prototyping on small embedded projects that require physical motion, what hardware prototyping tools are available? For my projects, I tend to spend more time finding parts (i.e. wood, aluminum, etc.) and making the proper cuts, measurements, and connections than writing the software and configuring the electrical hardware. Are there any affordable products that will enable me to create physical hardware that is strong enough to support motion? If not, what techniques or tools are available to help develop the physical hardware more quickly? Currently, I typically build my projects from wood and plastic scraps that I have lying around. What types of materials enable you to prototype more quickly? CLARIFICATION: By motion, I mean something that has to bear stress like a robot arm powered by a servo motor and could handle moving or carrying 1-2 lbs.

    Read the article

  • nginx: js file loads indifferently every refresh

    - by poymode
    I have this nginx problem wherein a js file in a rails app loads indifferently. Whenever I try to access the JS file in the browser and refresh the page, the scrollbar changes length meaning sometimes it loads half the js page, sometimes the whole and sometimes just a part of it. the js file size is 71K. my nginx server is on different server,separate from my rails app. when I try to access the js file directly through the app server, lets say 10.48.30.150:3000/javascripts/file.js it works fine and doesnt show any half-loaded page. but when I use the nginx server which upstreams the rails app, it shows the indifferent page loads. here is my nginx http conf error_log /usr/local/nginx/logs/error.log; pid /usr/local/nginx/logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 256; access_log /usr/local/nginx/logs/access.log; sendfile on; #tcp_nopush on; keepalive_timeout 0; tcp_nodelay on; #gzip on; #gzip_min_length 4096; #gzip_buffers 16 8k; #gzip_types application/x-javascript text/css text/plain; large_client_header_buffers 4 8k; client_max_body_size 2G; include /usr/local/nginx/conf.d/*.conf; }

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >