Search Results

Search found 2017 results on 81 pages for 'jason haniball'.

Page 16/81 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Web developing- Strange happenings

    - by Jason
    As I'm teaching myself PHP and MySQL during break, I'm experimenting coding in a Ubuntu virtual machine where Apache, MySQL and PHP have been installed and configured to a shared folder. I'm not a big fan of Kompozer because the source code layout is a PIA, so I've started checking out gPHPEdit. However, since using it, I've come across two issues: when I edit the .html and .php files, sometimes the file extension will change to .html~ and .php~, becoming invisible to the browser. The only solution is to switch to Windows, right click and rename the file extension. In Ubuntu Firefox, when I click on my prpject's Submit button for in a practice form, a dialog box pops up asking what Firefox should do with the .php file, rather than simply displaying it in the browser. When I do this in Windows Chrome & Firefox, it goes right to the response page. I'm not sure if this behavior is limited to gPHPEdit/Kompozer, but I've never noticed this happening in Dreamweaver. Any solutions? EDIT The behavior in Point 1 occurs both when Dreamweaver is open in Windows accessing the same files and when it is not. I changed the extension filename of welcome.php, added a comment in gPHPEdit, and the file changed to welcome.php~ upon saving.

    Read the article

  • Laser Cutter Plays Portal Theme Song While Cutting Aperture Science Logo [Video]

    - by Jason Fitzpatrick
    We’re at a total loss to think of anything more geeky than a laser cutter programmed to simultaneously laser cut the Aperture Science logo while playing “Stile Alive” from Portal. If you’re unfamiliar with the original tune, check out this video. [via Boing Boing] The HTG Guide to Hiding Your Data in a TrueCrypt Hidden Volume Make Your Own Windows 8 Start Button with Zero Memory Usage Reader Request: How To Repair Blurry Photos

    Read the article

  • Ten Benefits to Video Game Play [Video]

    - by Jason Fitzpatrick
    Want to justify spending the whole weekend playing video games? We’re here to help. Courtesy of AllTime10, this video rounds up ten benefits to playing video games ranging from improved dexterity to pain relief. Want to highlight a benefit not listed in the video? Sound off in the comments. [via Geeks Are Sexy] Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Ring in the Holiday with Papercraft Star Wars Snowflakes

    - by Jason Fitzpatrick
    Whether your holiday decorating is begging for a geeky touch (or your nieces and nephews are begging for something to occupy their time while visiting this holiday), Anthony Herrera’s Star Wars themed paper snowflakes are a perfect geeky holiday project. This year’s collection includes Admiral Ackbar, A-Wings, B-Wings, Chewbacca, Ewoks, and more. Be sure to check out the 2011 and 2010 editions, for even more characters. Star Wars Snowflakes 2012 [Anthony Herrera Designs] Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Explore the Earth at Night with Google Maps

    - by Jason Fitzpatrick
    Last week we shared a high-resolution video of the Earth at night. Now we’re back with a mashup that combines that same high-resolution data and Google Maps for an interactive look at a human-illuminated Earth. Hit up the link below to take the Google Maps mashup, titled City Lights 2012, for a spin. City Lights 2012 [Google Maps via Mashable] How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot Our Geek Trivia App for Windows 8 is Now Available Everywhere

    Read the article

  • Tesla Coil Fights Combines Electricity and Choreography [Video]

    - by Jason Fitzpatrick
    We’ve seen quite a few Tesla-coil tricks over the years but never choreographed fighting between two guys balanced on Tesla coils. This definitely falls deeply into the don’t try this at home category–two guys in special suits are standing atop Tesla coils and directing the blasts of electricity at each other in a type of stylized combat. While their suits are clearly acting as Faraday cages to protect them from the electricity, we prefer our Faraday cages to be beefier and not attached directly to our skin. [via Obvious Winner] HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8 How To Play DVDs on Windows 8

    Read the article

  • DIY Standing Desk Sports Super Sturdy Galvanized Pipe Legs

    - by Jason Fitzpatrick
    If you’re looking for a standing desk sturdy enough you can tap dance on it this DIY creation features thick pipe legs and a solid oak desktop. Courtesy of designer Jessica Allen, this standing desk can easily support a bank of monitors, heavy equipment, and even your entire body if need be, thanks to a sturdy galvanized plumbing pipe undercarriage and a 1″ thick oak top. We love the clean lines of the desk but we’d be tempted to clutter them up a little with a tower-rack mounted under the desk or on the inside of the thick pipe legs. Hit up the link below to check out the full build log. Have a cool standing desk (or desk tutorial) to share? Sound off in the comments. Steel Pipe Standing Desk HTG Explains: Why Screen Savers Are No Longer Necessary 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full

    Read the article

  • DIY Door Lock Grants Access via RFID

    - by Jason Fitzpatrick
    If you’re looking to lighten the load on your pocket and banish the jingling of keys, this RFID-key hack makes your front door keycard accessible–and even supports groups and user privileges. Steve, a DIYer and Hack A Day reader, was looking for a solution to a simple problem: he wanted to easily give his friends access to his home without having to copy lots of keys and bulk up their key rings. Since all his friends already carried a Boston public transit RFID card the least intrusive solution was to hack his front door to support RFID cards. His Arduino-based solution can store up to 50 RFID card identifiers, supports group-based access, and thanks to a little laser cutting and stain the project enclosure blends in with the Victorian styling of his home’s facade. Hit up the link below to see his code–for a closer look at the actual enclosure check out this photo gallery. RFID Front Door Lock [via Hack A Day] HTG Explains: What is DNS? How To Switch Webmail Providers Without Losing All Your Email How To Force Windows Applications to Use a Specific CPU

    Read the article

  • Mostrar Imagenes en ListView utilizando ImageList WinForms

    - by Jason Ulloa
    El día de hoy veremos como trabajar con los controles ListView e Imagelist de WindowsForms para poder leer y mostrar una serie de imágenes. Antes de ello debo decir que pueden existir otras formas de mostrar imagenes que solo requieren un control por ejemplo con un Gridview pero eso será en otro post, ahora nos centraremos en la forma de realizarlo con los controles antes mencionados. Lo primero que haremos será crear un nuevo proyecto de windows forms, en mi caso utilizando C#, luego agregaremos un Control ImageList. Este control será el que utilicemos para almacenar todas las imágenes una vez que las hemos leído. Si revisamos el control, veremos que tenemos la opción de agregar la imágenes mediante el diseñador, es decir podemos seleccionarlas manualmente o bien agregarlas mediante código que será lo que haremos. Lo segundo será agregar un control ListView al Formulario, este será el encargado de mostrar las imagenes, eso sí, por ahora será solo mostrarlas no tendrá otras funcionalidades. Ahora, vamos al codeBehind y en el Evento Load del form empezaremos a codificar: Lo primero será, crear una nueva variable derivando DirectoryInfo, a la cual le indicaremos la ruta de nuestra carpeta de imágenes. En nuestro ejemplo utilizamos Application.StartUpPath para indicarle que vamos a buscar en nuestro mismo proyecto (en carpeta debug por el momento). DirectoryInfo dir = new DirectoryInfo(Application.StartupPath + @"\images");   Una vez que hemos creado la referencia a la ruta, utilizaremos un for para obtener todas la imágenes que se encuentren dentro del Folder que indicamos, para luego agregarlas al imagelist y empezar a crear nuestra nueva colección. foreach (FileInfo file in dir.GetFiles()) { try { this.imageList1.Images.Add(Image.FromFile(file.FullName)); }   catch { Console.WriteLine("No es un archivo de imagen"); } }   Una vez, que hemos llenado nuestro ImageList, entonces asignaremos al ListView sus propiedades, para definir la forma en que las imágenes se mostrarán. Un aspecto a tomar en cuenta acá será la propiedad ImageSize ya que está será la que definirá el tamaño que tendrán las imágenes en el ListView cuando sean mostradas. this.listView1.View = View.LargeIcon;   this.imageList1.ImageSize = new Size(120, 100);   this.listView1.LargeImageList = this.imageList1;   Por último y con ayuda de otro for vamos a recorrer cada uno de los elementos que ahora posee nuestro ImageList y lo agregaremos al ListView para mostrarlo for (int j = 0; j < this.imageList1.Images.Count; j++) { ListViewItem item = new ListViewItem();   item.ImageIndex = j;   this.listView1.Items.Add(item); } Como vemos, a pesar de que utilizamos dos controles distintos es realmente sencillo  mostrar la imagenes en el ListView al final el control ImageList, solo funciona como un “puente” que nos permite leer la imagenes para luego mostrarlas en otro control. Para terminar, los proyectos de ejemplo: C# VB

    Read the article

  • Portal Ported to a Graphing Calculator

    - by Jason Fitzpatrick
    It’s not exactly a 3D-rendered GPU-burner, but this calculator-based version of Portal still features the same portal-jumping tricks that delighted players in the original game. Built using Axe Parser, an advanced programming language for graphing calculators, Portal: Prelude is part an experiment in pushing the limits of Axe Parser and part long standing tradition of porting popular video games to graphing calculators. You can read more about Axe Parser and the many games and program projects under development using it here. [via Geeks Are Sexy] How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot Our Geek Trivia App for Windows 8 is Now Available Everywhere

    Read the article

  • Motion Sensing Fog Machine Increases Savings and Spook Factor

    - by Jason Fitzpatrick
    This DIY add-on switches a standard fog machine from always-on to motion-activated–increase your savings and spook factor at the same time. Courtesy of tinker Greg, this modification involves a new relay and motion sensor mounted onto the existing switch of a store-bought fog machine. When the motion-sensor detects motion the fog machine releases a burst of fog for 5 seconds and then disarms itself for 10 seconds–long enough for the startled victim to move on and for the machine to recharge for the next passerby. Check out the video above to see it in action and then hit up the link below to see the project’s build guide. Motion Sensing Fog Machine Trigger [via Hack A Day] How Hackers Can Disguise Malicious Programs With Fake File Extensions Can Dust Actually Damage My Computer? What To Do If You Get a Virus on Your Computer

    Read the article

  • What You Said: How You Keep Your Email SPAM Free and Tidy

    - by Jason Fitzpatrick
    Earlier this week we asked you to share your favorite tips and tricks for keeping your inbox tidy. Now we’re back to share your–rather aggressive–SPAM dodging tricks. HTG readers are serious about beating back SPAM. While some readers such as TechGeek01 took a fairly laid back approach to junk mail: I usually just read emails, and delete them when my inbox gets kinda full. As for spam, I mark it as such, and the automated spam filter usually catches it the next time. It’s a fairly simple method, I know, but it’s efficient, and takes almost no effort, other than a monthly cleaning. For other readers it was outright war. ArchersCall uses a system of layers and whitelists: I have a triple system and rarely see spam. How to Banish Duplicate Photos with VisiPic How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It?

    Read the article

  • How to Best Optimize up Model Transforms, Import 3DS Animations Into XNA 4.0?

    - by Jason R. Mick
    Relative beginner to XNA, but trying to build a multi-purpose (3D) game frameworking in XNA 4. Been using the Reed (O'Reilly) and Cawood/McGee (McGraw Hill) guides. My question is multi-faceted and involves how to most efficiently handle models. I'm using 3DS Max 2010 with kw-Xport to ship out my models as .X files. Solved an early problem by using my depth stencil state. My models are now loading properly (yay!) and I have basic bounding working, I just want to optimize transforming models and get animations working as a next step. My questions on models are: 1. Do you have any suggestions for good resources on exporting 3DS animations to XNA? I've seen some resources on how to handle animations in XNA, but most skimp on basic topics of how to convert multi-animation 3DS files. For example how do I take one big long string of keyframed animations (say running, frame 5-20, climbing frames 25-45, etc.) and turned them into named XNA animations. To my understanding every XNA animation has to have a name, but I haven't seen any tutorials on creating a new named animation from a subset of frames. 2. Is it faster to load a model once and animate/transform that base model on the fly @ draw time, or to load multiple models? My game will have multiple enemies, and I've already seen some lagginess in XNA, so II want to make my code efficient... 3. I've heard people on app hub talking about making custom content processors for models-- what is the benefit of this? Does it speed up transforming or animating the models? If so, can you point me towards any good (model-centric) tutorials? (I've built a custom height map content processor to generate terrain, following Cawood's examples, I'm just a bit confused as to how a model content processor would be implemented.)

    Read the article

  • Mod Puts Mac OS 7 On the Nook Touch

    - by Jason Fitzpatrick
    Thanks to a mac-hardware emulator for Android, it’s now possible to run Mac OS 7 on the Nook Touch (or other Android-based tablet). If you’ve been looking for some retro-goodness to dump on your Nook or tablet–Oregon Trail anyone?–this simple hack will certainly help. Hit up the link below for additional screenshots and more information. Mini vMac for Android Development Thread [via MikeCanex] HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me? HTG Explains: How Windows 8′s Secure Boot Feature Works & What It Means for Linux

    Read the article

  • Dirt Cheap DSLR Viewfinder Improves Outdoor DSLR LCD Visibility

    - by Jason Fitzpatrick
    If the excitement you felt about having a DSLR capable of shooting video wore off the second you took it outside and realized you needed an expensive add-on viewfinder to use it in sunlight, this cheap DIY viewfinder is for you. The digital video capabilities of new DSLR cameras are amazing and changing the way people interact with movie production. What’s not awesome, however, is how the LCD screen gets completely washed out in bright conditions and you almost always have to buy a $50+ aftermarket accessory to make the LCD functional under those conditions. Courtesty of the Frugal Film Maker we have the following video tutorial showing us how to turn a plastic container, a cheap dollar-store magnifying glass, a headphone ear cover, and some glue and hair ties into a dirt cheap LCD viewfinder. You’ll never have to squint or miss a shot because of bright lighting conditions again–even better yet, you’ll only spend a few bucks for the whole project. For step by step instructions in print form, hit up the link below. Homemade DSLR Viewfinder [Instructables via Make] Latest Features How-To Geek ETC How To Make Disposable Sleeves for Your In-Ear Monitors Macs Don’t Make You Creative! So Why Do Artists Really Love Apple? MacX DVD Ripper Pro is Free for How-To Geek Readers (Time Limited!) HTG Explains: What’s a Solid State Drive and What Do I Need to Know? How to Get Amazing Color from Photos in Photoshop, GIMP, and Paint.NET Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Bring the Grid to Your Desktop with the TRON Legacy Theme for Windows 7 The Dark Knight and Team Fortress 2 Mashup Movie Trailer [Video] Dirt Cheap DSLR Viewfinder Improves Outdoor DSLR LCD Visibility Lakeside Sunset in the Mountains [Wallpaper] Taskbar Meters Turn Your Taskbar into a System Resource Monitor Create Shortcuts for Your Favorite or Most Used Folders in Ubuntu

    Read the article

  • Space Stations as Envisioned in the 1970s

    - by Jason Fitzpatrick
    Boy, they sure were ambitious back in the 70s; while today we’re happy to have a small apartment-sized environment in orbit, back then they were dreaming of entire cities in space. Courtesy of the NASA Ames Research Center archives, we’re treated to artist renderings of the space colonies of the future as imagined from the 1970s. The artwork spans visions of space colonies from 10,000 to 1,000,000 citizens strong–some of them include everything from bodies of water to office buildings. Hit up the link below for more images. Space Colony Art from the 1970s [via The Daily What] 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • Tour the Cosmos with 100,000 Stars

    - by Jason Fitzpatrick
    The newest Google Chrome Experiment, 100,000 Stars, combines web technologies to serve up a 3D star map you can manually zoom about or sit back and enjoy a star tour. From the automated tour that explores the Milky Way with an ever increasing scale to manually moving about the cloud of stars using the zoom and pan feature, the interactive map makes it easy to explore the 100,000 closest stars to our Sun in style. Hit up the link to take it for a spin. 100,000 Stars [Google Chrome Experiments] Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows HTG Explains: Why Screen Savers Are No Longer Necessary

    Read the article

  • Massive Minecraft Creation Is a Functional Graphing Calculator

    - by Jason Fitzpatrick
    We’re no stranger to cool Minecraft creations, but this project takes Minecraft design to a whole new level. An industrious teen has built functional graphing calculator out of Minecraft blocks. It’s an absolutely enormous project that, if constructed in real life instead of in a virtual Minecraft space, would loom over a city. To fully appreciate how much ingenuity and effort went into the project, we’d suggest hitting up the comments over at Slashdot where commenters discuss the numerous obstacles and design tricks he would have needed to overcome and employ to pull the project off. [via Slashdot] What’s the Difference Between Sleep and Hibernate in Windows? Screenshot Tour: XBMC 11 Eden Rocks Improved iOS Support, AirPlay, and Even a Custom XBMC OS How To Be Your Own Personal Clone Army (With a Little Photoshop)

    Read the article

  • The Lost Episode of Cosmos: The Meat Planet

    - by Jason Fitzpatrick
    In the 1980s Carl Sagan captivated TV viewers with his exploration of the universe; we present to you, a lost episode, The Meat Planet. Creators of the parody video, Darren Cullen and Mark Tolson, engaged in some expert splicing and dicing of past Cosmos episodes to create their masterpiece: the lost episode focused on the fabled Meat Planet. Watch the episode above or hit up the link below for more information about the project. Meat Planet [via Boing Boing] How Hackers Can Disguise Malicious Programs With Fake File Extensions Can Dust Actually Damage My Computer? What To Do If You Get a Virus on Your Computer

    Read the article

  • Legend of Zelda: Pot Smasher [Video]

    - by Jason Fitzpatrick
    Admit it, your favorite part of playing The Legend of Zelda games is wantonly smashing the crap out of unsuspecting pots. When we play games in The Legend of Zelda franchise, we like to think that we’re single handedly keeping the entire Potters’ Guild of Hyrule employed. [via Geeks Are Sexy] Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • Project Kapros: A Custom-Built Workstation Featuring an In-Desk Computer

    - by Jason Fitzpatrick
    While we’ve seen our fair share of case mods, it’s infrequent we see one as polished and built-in as this custom built work station. What started as an IKEA Galant desk, ended as a stunningly executed desk-as-computer build. High gloss paint, sand-blasted plexiglass windows, custom lighting, and some quality hardware all come together in this build to yield a gorgeous setup with plenty of power and style to go around. Hit up the link below for a massive photo album build guide detailing the process from start to finish. Project Kapros: IKEA Galant PC Desk Mod [via Kotaku] How to Stress Test the Hard Drives in Your PC or Server How To Customize Your Android Lock Screen with WidgetLocker The Best Free Portable Apps for Your Flash Drive Toolkit

    Read the article

  • A Six Step Plan for Introducing Kids to Tabletop RPGs

    - by Jason Fitzpatrick
    Introducing your kids, nieces and nephews, or other budding geeks to your geeky hobbies like role-playing games can be tricky. This handy plan lays out some simple steps to make RPGs fun for younger kids. Courtesy of Ryan Carlson over at Geek Dad, the six-step primer covers topics like simplifying the rules, varying task difficulty, fun character creation ideas, and ensuring there are adequate opportunities for in-game success. Hit up the link below for the full guide. Have a RPG-introduction success story or tip to share? Add to the conversation in the comments below. Running an Introductory Roleplaying Game for Kids [GeekDad] How To Use USB Drives With the Nexus 7 and Other Android Devices Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It

    Read the article

  • Google Rolls Out a New and Compact Navigation Bar

    - by Jason Fitzpatrick
    Earlier this spring Google introduced the black navigation bar; now they’ve updated the bar to take up less space and be more useful. Although the black bar is useful in-so-far as it gives you quick access to Google services (useful, of course, only if you use those services) the new navigation bar–seen in the video above–includes an improved layout. Rather than use the bar space to spread out links which the user may or may not use the service links are now tucked into a mouse-over menu accessed by hovering on the Google logo. The majority of the space previously just taken up by links and the black bar itself is now a a search box. If you don’t already see the new interface, look for it to appear in your Google account within the next few days. Hit up the link below to read the official announcement. The Next Stage In Our Redesign [The Official Google Blog] HTG Explains: Understanding Routers, Switches, and Network Hardware How to Use Offline Files in Windows to Cache Your Networked Files Offline How to See What Web Sites Your Computer is Secretly Connecting To

    Read the article

  • Poner aplicaci&oacute;n Asp.Net en modo OFFLINE

    - by Jason Ulloa
    Una de las opciones que todo aplicación debería tener es el poder ponerse en modo OFFLINE para evitar el acceso de usuarios. Esto es completamente necesario cuando queremos realizar cambios a nuestra aplicación (cambiar algo, poner una actualización, etc) o a nuestra base de datos y evitarnos problemas con los usuarios que se encuentren logueados dentro de la aplicación en ese momento. Muchos ejemplos a través de la Web exponen la forma de realizar esta tarea utilizando dos técnicas: 1. La primera de ellas es utilizar el archivo App_Offline.htm sin embargo, esta técnica tiene un inconveniente. Y es que, una vez que hemos subido el archivo a nuestra aplicación esta se bloquea completamente y no tenemos forma de volver a ponerla ONLINE a menos que eliminemos el archivo. Es decir no podemos controlarla. 2. La segunda de ellas es el utilizar la etiqueta httpRuntime, pero nuevamente tenemos el mismo problema. Al habilitar el modo OFFLINE mediante esta etiqueta, tampoco podremos acceder a un modo de administración para cambiarla. Un ejemplo de la etiqueta httpRuntime <configuration> <system.web> <httpRuntime enable="false" /> </system.web> </configuration>   Tomando en cuenta lo anterior, lo mas optimo seria que podamos por medio de alguna pagina de administración colocar nuestro sitio en modo OFFLINE, pero manteniendo el acceso a la pagina de administración para poder volver a cambiar el valor que pondrá nuestra aplicación nuevamente en modo ONLINE. Para ello, utilizaremos el web.config de nuestra aplicación y una pequeña clase que se encargara de Leer y escribir los valores. Lo primero será, abrir nuestro web.config y definir dentro del appSettings dos nuevas KEY que contendrán los valores para el modo OFFLINE de nuestra aplicación: <appSettings> <add key="IsOffline" value="false" /> <add key="IsOfflineMessage" value="Sistema temporalmente no disponible por tareas de mantenimiento." /> </appSettings>   En las KEY anteriores tenemos el IsOffLine con value de false, esto es para indicarle a nuestra aplicación que actualmente su modo de funcionamiento es ONLINE, este valor será el que posteriormente cambiemos a TRUE para volver al modo OFFLINE. Nuestra segunda KEY (IsOfflineMessage) posee el value (Sistema temporalmente….) que será mostrado al usuario como un mensaje cuando el sitio este en modo OFFLINE. Una vez definidas nuestras dos KEY en el web.config, escribiremos una clase personalizada para leer y escribir los valores. Así que, agregamos un nuevo elemento de tipo clase al proyecto llamado SettingsRules y la definimos como Public. Está clase contendrá dos métodos, el primero será para leer los valores: public string readIsOnlineSettings(string sectionToRead) { Configuration cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); KeyValueConfigurationElement isOnlineSettings = (KeyValueConfigurationElement)cfg.AppSettings.Settings[sectionToRead]; return isOnlineSettings.Value; }   El segundo método, será el encargado de escribir los nuevos valores al web.config public bool saveIsOnlineSettings(string sectionToWrite, string value) { bool succesFullySaved;   try { Configuration cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); KeyValueConfigurationElement repositorySettings = (KeyValueConfigurationElement)cfg.AppSettings.Settings[sectionToWrite];   if (repositorySettings != null) { repositorySettings.Value = value; cfg.Save(ConfigurationSaveMode.Modified); } succesFullySaved = true; } catch (Exception) { succesFullySaved = false; } return succesFullySaved; }   Por último, definiremos en nuestra clase una región llamada instance, que contendrá un método encargado de devolver una instancia de la clase (esto para no tener que hacerlo luego) #region instance   private static SettingsRules m_instance;   // Properties public static SettingsRules Instance { get { if (m_instance == null) { m_instance = new SettingsRules(); } return m_instance; } }   #endregion instance   Con esto, nuestra clase principal esta completa. Así que pasaremos a la implementación de las páginas y el resto de código que completará la funcionalidad.   Para complementar la tarea del web.config utilizaremos el fabuloso GLOBAL.ASAX, este contendrá el código encargado de detectar si nuestra aplicación tiene el valor de ONLINE o OFFLINE y además de bloquear todas las paginas y directorios excepto el que le hayamos definido como administrador, esto para luego poder volver a configurar el sitio.   El evento del Global.Asax que utilizaremos será el Application_BeginRequest   protected void Application_BeginRequest(Object sender, EventArgs e) {   if (Convert.ToBoolean(SettingsRules.Instance.readIsOnlineSettings("IsOffline"))) {   string Virtual = Request.Path.Substring(0, Request.Path.LastIndexOf("/") + 1);   if (Virtual.ToLower().IndexOf("/admin/") == -1) { //We don't makes action, is admin section Server.Transfer("~/TemporarilyOfflineMessage.aspx"); }   } } La primer Línea del IF, verifica si el atributo del web.config es True o False, si es true toma la dirección WEB que se ha solicitado y la incluimos en un IF para verificar si corresponde a la Sección admin (está sección no es mas que un folder en nuestra aplicación llamado admin y puede ser cambiado a cualquier otro). Si el resultado de ese if es –1 quiere decir que no coincide, entonces, esa será la bandera que nos permitirá bloquear inmediatamente la pagina actual, transfiriendo al usuario a una pagina de mantenimiento. Ahora, en nuestra carpeta Admin crearemos una nueva pagina asp.net llamada OnlineSettings.aspx para actualizar y leer los datos del web.config y una pagina Default.aspx para pruebas. Nuestra página OnlineSettings tendrá dos pasos importantes: 1. Leer los datos actuales de configuración protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { IsOffline.Checked = Convert.ToBoolean(mySettings.readIsOnlineSettings("IsOffline")); OfflineMessage.Text = mySettings.readIsOnlineSettings("IsOfflineMessage"); } }   2. Actualizar los datos con los nuevos valores. protected void UpdateButton_Click(object sender, EventArgs e) { string htmlMessage = OfflineMessage.Text.Replace(Environment.NewLine, "<br />");   // Update the Application variables Application.Lock(); if (IsOffline.Checked) { mySettings.saveIsOnlineSettings("IsOffline", "True"); mySettings.saveIsOnlineSettings("IsOfflineMessage", htmlMessage); } else { mySettings.saveIsOnlineSettings("IsOffline", "false"); mySettings.saveIsOnlineSettings("IsOfflineMessage", htmlMessage); }   Application.UnLock(); }   Por último en la raíz de la aplicación, crearemos una nueva página aspx llamada TemporarilyOfflineMessage.aspx que será la que se muestre cuando se bloquee la aplicación. Al final nuestra aplicación se vería algo así Página bloqueada Configuración del Bloqueo Y para terminar la aplicación de ejemplo

    Read the article

  • Toolbox Mod Makes the Wii Ultra Portable

    - by Jason Fitzpatrick
    Given the social nature of most Wii games, modifying a toolbox to serve as a Wii briefcase to make toting it to a friend’s house easy is only fitting. Courtesy of tinker SpicaJames, we find this simple but effective toolbox modification. James originally started his search by investigating getting a Pelican case for his Wii and accessories. When he found the $125 price tag prohibitive (as many of us would for such a side project) he sought out alternatives. A cheap $12 toolbox, a little impact foam, and some handy work with a pair of tin snips to cut out shapes for the Wiimotes, and he had a super cheap and easy to pack and unpack Wii briefcase. Hit up the link below to check out the pictures of his build. Wii Briefcase (translated by Google Translate) [via Hack A Day] Can Dust Actually Damage My Computer? What To Do If You Get a Virus on Your Computer Why Enabling “Do Not Track” Doesn’t Stop You From Being Tracked

    Read the article

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