Search Results

Search found 653 results on 27 pages for 'brain buddies'.

Page 5/27 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do you stay focused at work?

    - by BlairHippo
    Sometimes, the things I have to do for my job are interesting and engaging. Sometimes, they aren't. Occasionally, they really aren't. Do you have any particular strategies or tricks for dealing with those dull stretches when your brain would rather be doing anything other than what you're supposed to be doing, particularly when the Internet and its boundless opportunities for interesting Slack beckon?

    Read the article

  • First look at Ubuntu 10.04

    <b>Distrowatch:</b> "Quite a few of changes have been poured into 10.04, code named "Lucid Lynx", and I was curious to see what the Ubuntu team had put together. Before trying the new release, I had a chance to pick the brain of Gerry Carr, Head of Platform Marketing at Canonical."

    Read the article

  • What kind of process should I use to learn a big system?

    - by user394128
    I just joined a new company and started to study one of the their bigger system. For me to be productive, I need to understand the entire system without too much help. Other programers are really busy and dont' have time to hold my hands. I used to use brain map to draw a pictorial representation of the system. Any recommendations on what is the right appproach to dissect a big program? It is a .net prgoram by the way.

    Read the article

  • HTTP GATEWAY TIMEOUT

    - by Googler
    Hi buddies, When i tried to request the data through the internet to a webservices. I receive an error as: Error: The request failed with HTTP status 504: Gateway Time-out. Can anyone pleased give an insight about this error and solution too. Thanks in advance.

    Read the article

  • Joomla + CB (Community Builder) + Google Apps

    I started wondering today if it would be possible to integrate Joomla+CB with Google apps. If that would be possible we could have one great product! The first thing that I would want to integrate is the logon-process, one login for Joomla+Google apps. Then it would be great to have some Google apps modules: - your latest e-mails - your next calendar entries - your google talk buddies online/offline - your most recent docs and spreadsheets

    Read the article

  • How can I have a web link perform an action in a specific desktop application?

    - by John
    The specific situation is I have a .zip file that I want to open with a certain application. However, I don't want all ZIP files associated with that application. I think the answer is that instead of saying, "download this zip file, and open it with application X" I could have the browser basically go well my desktop application to go fetch it on its own (the same way directives like itunes: mailto: or aim: do things like launch the itunes store, add buddies, etc). Thoughts?

    Read the article

  • Clustering Basics and Challenges

    - by Karoly Vegh
    For upcoming posts it seemed to be a good idea to dedicate some time for cluster basic concepts and theory. This post misses a lot of details that would explode the articlesize, should you have questions, do not hesitate to ask them in the comments.  The goal here is to get some concepts straight. I can't promise to give you an overall complete definitions of cluster, cluster agent, quorum, voting, fencing, split brain condition, so the following is more of an explanation. Here we go. -------- Cluster, HA, failover, switchover, scalability -------- An attempted definition of a Cluster: A cluster is a set (2+) server nodes dedicated to keep application services alive, communicating through the cluster software/framework with eachother, test and probe health status of servernodes/services and with quorum based decisions and with switchover/failover techniques keep the application services running on them available. That is, should a node that runs a service unexpectedly lose functionality/connection, the other ones would take over the and run the services, so that availability is guaranteed. To provide availability while strictly sticking to a consistent clusterconfiguration is the main goal of a cluster.  At this point we have to add that this defines a HA-cluster, a High-Availability cluster, where the clusternodes are planned to run the services in an active-standby, or failover fashion. An example could be a single instance database. Some applications can be run in a distributed or scalable fashion. In the latter case instances of the application run actively on separate clusternodes serving servicerequests simultaneously. An example for this version could be a webserver that forwards connection requests to many backend servers in a round-robin way. Or a database running in active-active RAC setup.  -------- Cluster arhitecture, interconnect, topologies -------- Now, what is a cluster made of? Servers, right. These servers (the clusternodes) need to communicate. This of course happens over the network, usually over dedicated network interfaces interconnecting all the clusternodes. These connection are called interconnects.How many clusternodes are in a cluster? There are different cluster topologies. The most simple one is a clustered pair topology, involving only two clusternodes:  There are several more topologies, clicking the image above will take you to the relevant documentation. Also, to answer the question Solaris Cluster allows you to run up to 16 servers in a cluster. Where shall these clusternodes be placed? A very important question. The right answer is: It depends on what you plan to achieve with the cluster. Do you plan to avoid only a server outage? Then you can place them right next to eachother in the datacenter. Do you need to avoid DataCenter outage? In that case of course you should place them at least in different fire zones. Or in two geographically distant DataCenters to avoid disasters like floods, large-scale fires or power outages. We call this a stretched- or campus cluster, the clusternodes being several kilometers away from eachother. To cover really large distances, you probably need to move to a GeoCluster, which is a different kind of animal.  What is a geocluster? A Geographic Cluster in Solaris Cluster terms is actually a metacluster between two, separate (locally-HA) clusters.  -------- Cluster resource types, agents, resources, resource groups -------- So how does the cluster manage my applications? The cluster needs to start, stop and probe your applications. If you application runs, the cluster needs to check regularly if the application state is healthy, does it respond over the network, does it have all the processes running, etc. This is called probing. If the cluster deems the application is in a faulty state, then it can try to restart it locally or decide to switch (stop on node A, start on node B) the service. Starting, stopping and probing are the three actions that a cluster agent does. There are many different kinds of agents included in Solaris Cluster, but you can build your own too. Examples are an agent that manages (mounts, moves) ZFS filesystems, or the Oracle DB HA agent that cares about the database, or an agent that moves a floating IP address between nodes. There are lots of other agents included for Apache, Tomcat, MySQL, Oracle DB, Oracle Weblogic, Zones, LDoms, NFS, DNS, etc.We also need to clarify the difference between a cluster resource and the cluster resource group.A cluster resource is something that is managed by a cluster agent. Cluster resource types are included in Solaris cluster (see above, e.g. HAStoragePlus, HA-Oracle, LogicalHost). You can group cluster resources into cluster resourcegroups, and switch these groups together from one node to another. To stick to the example above, to move an Oracle DB service from one node to another, you have to switch the group between nodes, and the agents of the cluster resources in the group will do the following:  On node A Shut down the DB Unconfigure the LogicalHost IP the DB Listener listens on unmount the filesystem   Then, on node B: mount the FS configure the IP  startup the DB -------- Voting, Quorum, Split Brain Condition, Fencing, Amnesia -------- How do the clusternodes agree upon their action? How do they decide which node runs what services? Another important question. Running a cluster is a strictly democratic thing.Every node has votes, and you need the majority of votes to have the deciding power. Now, this is usually no problem, clusternodes think very much all alike. Still, every action needs to be governed upon in a productive system, and has to be agreed upon. Agreeing is easy as long as the clusternodes all behave and talk to eachother over the interconnect. But if the interconnect is gone/down, this all gets tricky and confusing. Clusternodes think like this: "My job is to run these services. The other node does not answer my interconnect communication, it must be down. I'd better take control and run the services!". The problem is, as I have already mentioned, clusternodes very much think alike. If the interconnect is gone, they all assume the other node is down, and they all want to mount the data backend, enable the IP and run the database. Double IPs, double mounts, double DB instances - now that is trouble. Also, in a 2-node cluster they both have only 50% of the votes, that is, they themselves alone are not allowed to run a cluster.  This is where you need a quorum device. According to Wikipedia, the "requirement for a quorum is protection against totally unrepresentative action in the name of the body by an unduly small number of persons.". They need additional votes to run the cluster. For this requirement a 2-node cluster needs a quorum device or a quorum server. If the interconnect is gone, (this is what we call a split brain condition) both nodes start to race and try to reserve the quorum device to themselves. They do this, because the quorum device bears an additional vote, that could ensure majority (50% +1). The one that manages to lock the quorum device (e.g. if it's an FC LUN, it SCSI reserves it) wins the right to build/run a cluster, the other one - realizing he was late - panics/reboots to ensure the cluster config stays consistent.  Losing the interconnect isn't only endangering the availability of services, but it also endangers the cluster configuration consistence. Just imagine node A being down and during that the cluster configuration changes. Now node B goes down, and node A comes up. It isn't uptodate about the cluster configuration's changes so it will refuse to start a cluster, since that would lead to cluster amnesia, that is the cluster had some changes, but now runs with an older cluster configuration repository state, that is it's like it forgot about the changes.  Also, to ensure application data consistence, the clusternode that wins the race makes sure that a server that isn't part of or can't currently join the cluster can access the devices. This procedure is called fencing. This usually happens to storage LUNs via SCSI reservation.  Now, another important question: Where do I place the quorum disk?  Imagine having two sites, two separate datacenters, one in the north of the city and the other one in the south part of it. You run a stretched cluster in the clustered pair topology. Where do you place the quorum disk/server? If you put it into the north DC, and that gets hit by a meteor, you lose one clusternode, which isn't a problem, but you also lose your quorum, and the south clusternode can't keep the cluster running lacking the votes. This problem can't be solved with two sites and a campus cluster. You will need a third site to either place the quorum server to, or a third clusternode. Otherwise, lacking majority, if you lose the site that had your quorum, you lose the cluster. Okay, we covered the very basics. We haven't talked about virtualization support, CCR, ClusterFilesystems, DID devices, affinities, storage-replication, management tools, upgrade procedures - should those be interesting for you, let me know in the comments, along with any other questions. Given enough demand I'd be glad to write a followup post too. Now I really want to move on to the second part in the series: ClusterInstallation.  Oh, as for additional source of information, I recommend the documentation: http://docs.oracle.com/cd/E23623_01/index.html, and the OTN Oracle Solaris Cluster site: http://www.oracle.com/technetwork/server-storage/solaris-cluster/index.html

    Read the article

  • What I've Gained from being a Presenter at Tech Events

    - by MOSSLover
    Originally posted on: http://geekswithblogs.net/MOSSLover/archive/2014/06/12/what-ive-gained-from-being-a-presenter-at-tech-events.aspxI know I fail at blogging lately.  As I've said before life happens and it gets in the way of best laid out plans.  I thought about creating some type of watch with some app that basically dictates using dragon naturally speaking to Wordpress, but alas no time and the write processing capabilities just don't exist yet.So to get to my point Alison Gianotto created this blog post: http://www.snipe.net/2014/06/why-you-should-stop-stalling-and-start-presenting/.  I like the message she has stated in this post and I want to share something personal.It was around 2007 that I was seriously looking into leaving the technology field altogether and going back to school.  I was calling places like Washington University in Saint Louis and University of Missouri Kansas City asking them how I could go about getting into some type of post graduate medical school program.  My entire high school career was based on Medical Explorers and somehow becoming a doctor.  I did not want to take my hobby and continue using it as a career mechanism.  I was unhappy, but I didn't realize why I was unhappy at the time.  It was really a lot of bad things involving the lack of self confidence and self esteem.  Overall I was not in a good place and it took me until 2011 to realize that I still was not in a good place in life.So in about April 2007 or so I started this blog that you guys have been reading or occasionally read.  I kind of started passively stalking people by reading their blogs in the SharePoint and .Net communities.  I also started listening to .Net Rocks & watching videos on their corresponding training for SharePoint, WCF, WF, and a bunch of other technologies.  I wanted more knowledge, so someone suggested I go to a user group.  I've told this story before about how I met Jeff Julian & John Alexander, so that point I will spare you the details.  You know how I got to my first user group presentation and how I started getting involved with events, so I'll also spare those details.The point I want to touch on is that I went out I started speaking and that path I took helped me gain the self confidence and self respect I needed.  When I first moved to NYC I couldn't even ride a subway by myself or walk alone without getting lost.  Now I feel like I can go out and solve any problem someone throws at me.  So you see what Alison states in her blog post is true and I am a great example to that point.  I stood in front of 800 or so people at SharePoint Conference in 2011 and spoke about a topic.  In 2007 I would have hidden or stuttered the entire time.  I have now spoken at over 70 events and user groups.  I am a top 25 influencer in my technology.  I was a most valued professional for years in a row in Microsoft SharePoint.  People are constantly trying to gain my time, so that they can pick my brain for solutions and other life problems.  I went from maybe five or six friends to over hundreds of friends in various cities across the globe.  I'm not saying it's an instant fame and it doesn't take a ton of work, but I have never looked back once at my life and regretted the choice I made in 2007.  It has lead me to a lot of other things in my life, including more positivity and happiness.  If anyone ever wants to contact me and pick my brain on a presentation go ahead.  If you want me to help you find the best meetup that suits you for that presentation I can try to help too (I might be a little more helpful in the Microsoft or iOS arenas though).  The best thing I can state is don't be scared just do it.  If you need an audience I can try to pencil it in my schedule.  I can't promise anything, but if you are in NYC I can at least try.

    Read the article

  • Windows 8 Apps with HTML5 and JavaScript

    - by Stephen.Walther
    Last week, I finished writing Windows 8 Apps with HTML5 and JavaScript – Yikes! That is a long title. This book is all about writing apps for Windows 8 which can be added to the Windows Store. The book focuses on building apps using HTML5 and JavaScript. If you are already comfortable building websites, then building Windows Store apps is not a huge leap.  I explain how you can create productivity apps, like a Task List app, and games, like a simple arcade game. I also explain how you can publish your app to the Windows Store and make money. To celebrate the release of Windows 8, my publisher is offering a huge 40% discount on the book until November 30, 2012. If you want to take advantage of this discount, follow the link below and enter the discount code WINDEV40 during checkout. http://www.informit.com/promotions/promotion.aspx?promo=139036&walther So what’s in the book?  Here’s an overview of each of the chapters: Chapter 1 – Building Windows Store Apps Contains a walkthrough of creating a super simple Windows app for taking pictures from your webcam. Explains how to publish your app to the Windows Store. Chapter 2 – WinJS Fundamentals Provides an overview of the Windows Library for JavaScript which is the Microsoft library for creating Windows Store apps with JavaScript. Chapter 3 – Observables, Bindings, and Templates You learn how to display a list of items using a template. For example, you learn how to create a template which can be used to display a list of products. Chapter 4 – Using WinJS Controls Overview of the core set of JavaScript controls included with the WinJS library. You learn how to use the Tooltip, ToggleSwitch, Rating, DatePicker, TimePicker, and FlipView controls. Chapter 5 – Creating Forms This chapter explains how to take advantage of HTML5 forms to display specialized keyboards and perform form validation. Chapter 6 – Menus and Flyouts You learn how to display popups, menus, and toolbars using the JavaScript controls included with the WinJS library. Chapter 7 – Using the ListView Control This entire chapter is devoted to the ListView control which is the most important control in the WinJS library. You can use the ListView control to display, sort, filter, and edit a list of items. Chapter 8 – Creating Data Sources Learn how to use a ListView control to display data from the file system, a web service, and IndexedDB. Chapter 9 – App Events and States This chapter explains the standard application events which are raised in a Windows Store app such as the activated and checkpoint events. You also learn how to build apps which adapt automatically to different view states such as portrait and landscape. Chapter 10 – Page Fragments and Navigation This chapter discusses two subjects: You learn how to create custom WinJS controls with Page Controls and you learn how to build apps with multiple pages.  Chapter 11 – Using the Live Connect API Learn how to use Windows Live Services to authenticate users, interact with SkyDrive, and retrieve user profile information (such as a user’s birthday or profile picture). Chapter 12 – Graphics and Games This chapter is devoted to building the Brain Eaters app which is a simple arcade game. Navigate a maze and eat all of the food pellets while avoiding the brain-eating zombies to win the game. Learn how to create the game using HTML5 Canvas.   If you want to buy the book, remember to use the magic discount code WINDEV40 and visit the following link: http://www.informit.com/promotions/promotion.aspx?promo=139036&walther

    Read the article

  • Archbeat Link-O-Rama Top 10 Facebook Faves for October 20-26, 2013

    - by OTN ArchBeat
    Here's this week's list of the Top 10 items shared on the OTN ArchBeat Facebook Page from October 27 - November 2, 2013. Visualizing and Process (Twitter) Events in Real Time with Oracle Coherence | Noah Arliss This OTN Virtual Developer Day session explores in detail how to create a dynamic HTML5 Web application that interacts with Oracle Coherence as it’s processing events in real time, using the Avatar project and Oracle Coherence’s Live Events feature. Part of OTN Virtual Developer Day: Harnessing the Power of Oracle WebLogic and Oracle Coherence, November 5, 2013. 9am to 1pm PT / 12pm to 4pm ET / 1pm to 5pm BRT. Register now! HTML5 Application Development with Oracle WebLogic Server | Doug Clarke This free OTN Virtual Developer Day session covers the support for WebSockets, RESTful data services, and JSON infrastructure available in Oracle WebLogic Server. Part of OTN Virtual Developer Day: Harnessing the Power of Oracle WebLogic and Oracle Coherence, November 5, 2013. 9am to 1pm PT / 12pm to 4pm ET / 1pm to 5pm BRT. Register now! Video: ADF BC and REST services | Frederic Desbiens Spend a few minutes with Oracle ADF principal product manager Frederic Desbiens and learn how to publish ADF Business Components as RESTful web services. One Client Two Clusters | David Felcey "Sometimes its desirable to have a client connect to multiple clusters, either because the data is dispersed or for instance the clusters are in different locations for high availability," says David Felcey. David shows you how in this post, which includes a simple example. Exceptions Handling and Notifications in ODI | Christophe Dupupet Oracle Fusion Middleware A-Team director Christophe Dupupet reviews the techniques that are available in Oracle Data Integrator to guarantee that the appropriate individuals are notified in the event that ODI processes are impacted by network outages or other mishaps. Securing WebSocket applications on Glassfish | Pavel Bucek WebSocket is a key capability standardized into Java EE 7. Many developers wonder how WebSockets can be secured. One very nice characteristic for WebSocket is that it in fact completely piggybacks on HTTP. In this post Pavel Bucek demonstrates how to secure WebSocket endpoints in GlassFish using TLS/SSL. Oracle Coherence, Split-Brain and Recovery Protocols In Detail | Ricardo Ferreira Ricardo Ferreira's article "provides a high level conceptual overview of Split-Brain scenarios in distributed systems," focusing on a "specific example of cluster communication failure and recovery in Oracle Coherence." Non-programmatic Authentication Using Login Form in JSF (For WebCenter & ADF) | JayJay Zheng Oracle ACE JayJay Zheng shares an approach that "avoids the programmatic authentication and works great for having a custom login page developed in WebCenter Portal integrated with OAM authentication." The latest article in the Industrial SOA series looks at mobile computing and how companies are developing SOA to go. http://pub.vitrue.com/PUxT Tech Article: SOA in Real Life: Mobile Solutions The ACE Director Thing | Dr. Frank Munz Frank Munz finally gets around to blogging about achieving Oracle ACE Director status and shares some interesting insight into what will change—and what won't—thanks to that new status. A good, short read for those interested in learning more about the Oracle ACE program. Thought for the Day "Even if you're on the right track, you'll get run over if you just sit there." — Will Rogers, American humorist (November 4, 1879 – August 15, 1935) Source: brainyquote.com

    Read the article

  • How to consistently enable screen sharing with iChat

    - by Joel
    I am unable to consistently get screen sharing in iChat to work. When I select an online buddy, under the Buddies menu the options "Share my screen with Bob" and "Ask to Share Bob's Screen" are disabled. Sometimes starting a chat with that person will enable the screen sharing but often not. Once its enabled it works fine but I have no idea what the key is to getting it enabled. It seems fairly random when it works. This is over the public internet using Google Talk. Both ends are running OSX 10.5.

    Read the article

  • How to consistently enable screen sharing with iChat

    - by Joel
    I am unable to consistently get screen sharing in iChat to work. When I select an online buddy, under the Buddies menu the options "Share my screen with Bob" and "Ask to Share Bob's Screen" are disabled. Sometimes starting a chat with that person will enable the screen sharing but often not. Once its enabled it works fine but I have no idea what the key is to getting it enabled. It seems fairly random when it works. This is over the public internet using Google Talk. Both ends are running OSX 10.5.

    Read the article

  • Lua Alien Module - Trouble using WriteProcessMemory function, unsure on types (unit32)

    - by jefferysanders
    require "alien" --the address im trying to edit in the Mahjong game on Win7 local SCOREREF = 0x0744D554 --this should give me full access to the process local ACCESS = 0x001F0FFF --this is my process ID for my open window of Mahjong local PID = 1136 --function to open proc local op = alien.Kernel32.OpenProcess op:types{ ret = "pointer", abi = "stdcall"; "int", "int", "int"} --function to write to proc mem local wm = alien.Kernel32.WriteProcessMemory wm:types{ ret = "long", abi = "stdcall"; "pointer", "pointer", "pointer", "long", "pointer" } local pRef = op(ACCESS, true, PID) local buf = alien.buffer("99") -- ptr,uint32,byte arr (no idea what to make this),int, ptr print( wm( pRef, SCOREREF, buf, 4, nil)) --prints 1 if success, 0 if failed So that is my code. I am not even sure if I have the types set correctly. I am completely lost and need some guidance. I really wish there was more online help/documentation for alien, it confuses my poor brain. What utterly baffles me is that it WriteProcessMemory will sometimes complete successfully (though it does nothing at all, to my knowledge) and will also sometimes fail to complete successfully. As I've stated, my brain hurts. Any help appreciated.

    Read the article

  • Are licenses relevant for small code snippets?

    - by Martin
    When I'm about to write a short algorithm, I first check in the base class library I'm using whether the algorithm is implemented in it. If not, I often do a quick google search to see if someone has done it before (which is the case, 19 times out of 20). Most of the time, I find the exact code I need. Sometimes it's clear what license applies to the source code, sometimes not. It may be GPL, LGPL, BSD or whatever. Sometimes people have posted a code snippet on some random forum which solves my problem. It's clear to me that I can't reuse the code (copy/paste it into my code) without caring about the license if the code is in some way substantial. What is not clear to me is whether I can copy a code snippet containing 5 lines or so without doing a license violation. Can I copy/paste a 5-line code snippet without caring about the license? What about one-liner? What about 10 lines? Where do I draw the line (no pun intended)? My second problem is that if I have found a 10-line code snippet which does exactly what I need, but feel that I cannot copy it because it's GPL-licensed and my software isn't, I have already memorized how to implement it so when I go around implementing the same functionality, my code is almost identical to the GPL licensed code I saw a few minutes ago. (In other words, the code was copied to my brain and my brain after that copied it into my source code).

    Read the article

  • Programming time schedule for porting a program.

    - by Lothar
    I'm working on a large program which has an abstracted GUI API. It is very GUI based, many dialogs and a few nasty features which rely heavily on the message flow of the GUI (correct sequences of focus/mouse/active handling etc.) - not easy to port I now want to port it from the currently used FOX Toolkit to native Cocoa/MFC. I give myself a timeframe until the end of the year but my main work will be to continue development work with the existing toolkit, but there is no planned release for end customers before both tasks are done. My question is how should i spend my time? Stop working on the main program and do a 90% port (about 3 month) of the GUI first Splitting everything into smaller sessions of one month each. Assigning Monday/Tuesday to the GUI project and the rest of the week for the app. Finishing the App first, then port. I think there are three arguments which i need to balance. Motivation, i want to see something going on on both projects Brain Input Overflow, both tasks require a lot of detail information in my brain and sometimes enough is just enough. I guess the porting is intervowen so porting would also require a lot of code changes in the existing code and the new code that will be written in the meantime.

    Read the article

  • How to make use of Grails Dependencies in your IDE

    - by raoulsson
    Hi All, So I finally got my dependencies working with Grails. Now, how can my IDE, eg IntelliJ or Eclipse, take advantage of it? Or do I really have to manually manage what classes my IDE knows about at "development time"? If the BuildConfig.groovy script is setup right (see here), you will be able to code away with vi or your favorite editor without any troubles, then run grails compile which will resolve and download the dependencies into the Ivy cache and off you go... If, however, you are using an IDE like Eclipse or IntelliJ, you will need the dependencies at hand while coding. Obviously - as these animals will need them for the "real time" error detection/compilation process. Now, while it is certainly possible to code with all the classes shining up in bright red all over the place that are unknown to your IDE, it is certainly not much fun... The Maven support or whatever it is officially called lives happily with the pom file, no extra "jar directory" pointers needed, at least in IntelliJ. I would like to be able to do the same with Grails dependencies. Currently I am defining them in the BuildConfig.groovy and additionally I copy/paste the current jars around on my local disk and let the IDE point to it. Not very satisfactory, as I am working in a highly volatile project module environment with respect to code change. And this situation ports me directly into "jar hell", as my "develop- and build-dependencies" easily get out of sync and I have to manage manually, that is, with my brain... And my brain should be busy with other stuff... Thanks! Raoul P.S: I'm currently using Grails 1.2M4 and IntelliJ 92.105. But feel free to add answers on future versions of Grails and different, future IDEs, as the come in...

    Read the article

  • MVC3 View For Loop values initialization

    - by Ryan
    So I have a for loop in my View that is supposed to render out the input boxes. Now inside these input boxes I want to put lables that disappear when you click on them. This is all simple. Now it's probably because my brain was wired for php first, and it has been difficult to get it to think in lambdas and object orientation, but I can't figure out how to do this: @{ for (int i = 0; i < 3; i++) { <div class="editor-label grid_2">User</div> Model.Users[i].UserFirstName = "First Name"; Model.Users[i].UserLastName = "Last Name"; Model.Users[i].UserEmailAddress = "Email Address"; <div class="grid_10"> @Html.TextBoxFor(m => Model.Users[i].UserFirstName, new { @class = "user-input" }) @Html.TextBoxFor(m => Model.Users[i].UserLastName, new { @class = "user-input" }) @Html.TextBoxFor(m => Model.Users[i].UserEmailAddress, new { @class = "user-input-long" }) @Html.CheckBoxFor(m => Model.Users[i].IsUserAdmin) <span>&nbsp;admin?</span> </div> <div class="clear"> </div> } } And initialize the values for the users. And you're probably thinking "Of course that won't work. You're going to get a Null Reference Exception", and you would be correct. I might need to initialize them somewhere else and I don't realize it but I'm just not sure. I've tried the [DefaultValue("First Name")] route and that doesn't work. I'm probably thinking about this wrong, but my brain is already shot from trying to figure out how to wire up these events to the controller, so any help would be appreciated!

    Read the article

  • Hide All But First Matching Element

    - by Batfan
    I am using jquery to sort through multiple paragraphs. Currently I have it set to show only paragraphs that start with a current letter. But now, I would like to consolidate further. If the text between the paragraph tags has multiple instances, I would like all but the first hidden. This is what I have so far but, it is not working. var letter = '<?php echo(strlen($_GET['letter']) == 1) ? $_GET['letter'] : ''; ?>' function finish(){ jQuery('p').each(function(){ if(jQuery(this).text().substr(0,1).toUpperCase() == letter){ jQuery(this).addClass('current-series'); jQuery(this).html(letter + '<span class="hidden">'+jQuery(this).text().slice(1)+ '</span>'); } else{ jQuery(this).hide();} }) } Update: Sorry guys, I know this is kind of hard to explain. Here's a basic example: The selected letter is B The values returned are: Ball Ball Ball Boy Brain Bat Bat Each of these values is in a paragraph tag. Is there a way to consolidate to this? Ball Boy Brain Bat

    Read the article

  • PHP: Three item validation comparison

    - by DavidYell
    I have 3 featured product panels on the homepage, and I'm writing a CMS page for it. I'm trying to validate the items. They are selected via three <select> elements, featured1, featured2 and featured3. The default is <option value="0" selected>Select an element</option> I need to validate the $_POST to ensure that the user hasn't selected the same product for more than one of the panels. I have worked out that each $_POST needs to be $_POST['featuredN'] > 0 but I can't seem to find a logical way of processing the 7 potential outcomes. Using a logic table, where 1 is a set value. 1 2 3 ------- 0 0 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 If an item is 0, then I will not update it, but I want the user to be able to update a single item if needs be. I cannot find a logical way to see if the item is not 0, and then compare it to another item if that also is not 0. So far my colleague suggested, adding up the values. Which works to see if condition 1 0 0 0 is not met. I have a vague feeling that some form of recursive function might be in order, but I can't quite get my brain to help me on this one! So to the collective brain! :)

    Read the article

  • DopeWarz 2010

    - by Theo Moore
    A few (6?) weeks ago, I started a project that I've always wanted to do. I am doing a re-write of the old VB6 game DopeWars with a partner in crime. I loved that game and spent many, many hours wasting time playing it years ago. I liked it so much, I even registered it (it was $5...even then, that wasn't much to spend). The VB6 version itself was a port of the old DOS game DrugWars (never go to play that). I needed a game project to work on as it's been far too long since I've done any game work. There is surprising amount of logic built into the game (there is the way I'm writing it, anyway) with what is really a minimal interface. My design goal was to have an object model that could be easily adapted to any interface and so far, I've managed to do that. I am even considering a web-based version that could run via Facebook (no clue how to do that...yet). I've enlisted the help of one of my DBA buddies to work on the interface while I am working on the object model. So far, this arrangement has gone well. The logical separation of concerns allows for us to collaborate easily. Once we get to the Facebook step, it will be great to have a DBA "on staff" to help that part off of the ground. The object model is probably about 60% complete with quite a bit of testing to go. More on this as we go....

    Read the article

  • Game-a-Week One

    - by Matt Christian
    Anyone who chats with me on a semi-regular basis knows I am absolutely horrible at completing something from beginnning to end.  Often times I'll begin something, lose interest at some point, and end up moving onto the next thing.  For example, I have 1/2 a full game created, 1/3 of a novel written, and half of a model set created.  Needless to say, unless I have some sort of pressure to finish something I don't stick to it. Recently however one of my online buddies challenged me to create a simple game.  The start date was last Thursday and the final game needed to be delivered by this next Sunday (giving me just over a week).  However, I am going out of town this Friday so will need to deliver it by Thursday, giving me exactly 1 week to develop a game.  Here is what the game needed to include: The player should be able to shoot Shooting things should score points Sounds very simple, but given a single week to produce all art assets plus the game isn't an easy task.  So far I've developed: An animated Main Menu that loads via script files, allows the user to start a new game or exit the game The game is 3D and the player can move around the play area with an 'over-the-shoulder' camera HUD elements are drawn to display the player's current score When the player presses Esc they are shown a pause menu where they can resume the game by pressing Esc again, or quit the game by pressing Space There are also 2 items implemented that don't work perfectly: JigLibX physics library implementation On the main menu there is an arrow symbol that rotates to always point at your mouse I've got 2 days of development left so hopefully I can get collision working, some of the art cleaned up, and some more of the camera functionality working.  Also, I'll need to take some time to package the game up which hopefully shouldn't take too long.

    Read the article

  • Challenge Accepted

    - by Chris Gardner
    Originally posted on: http://geekswithblogs.net/freestylecoding/archive/2014/05/20/challenge-accepted.aspxIt appears my good buddies in The Krewe have created The Krewe Summer Blogging Challenge. The challenge is to write at least two blog posts a week for 12 weeks over the summer. Consider this challenge accepted. So, what can we expect coming up? I still have the Kinect v2 Alpha kit. Some of you may have seen me use it in talks. I need to make some major API changes in The Krewe WP8 App. Plus, I may have Xamarin on board to help with getting the app to the other platforms. I am determined to learn F#, and I'm taking all of you with me. I am teaching a college course this summer. I want to post some commentary on that side of training. I am sure some biometric stuff will come up. Anything else you guys may want. I have created tasks on my schedule to get a new blog post up no later than every Tuesday and Friday. We'll see how that goes. Wish me luck.

    Read the article

  • The Mac Tax

    - by Robert May
    One of our users was having difficulties with their mac and using some web software.  I decided to go peruse the landscape and see how much of a premium people were paying for their macs.  I priced out a Dell and a Mac from their websites.  I tried to get them as close to the same configuration, from a hardware standpoint, as I could.  I found the following: Apple Macbook Pro   Dell XPS 17 There are several important differences in the hardware: The mac doesn’t have a blueray player, but the dell does. The mac has a slightly slower processor. The mac claims to have a better battery, but doesn’t list the specifics, so there’s no way to tell. The mac doesn’t list the video card stats, so there’s no way to tell how comparable they are, but they’re probably close. The mac doesn’t come with any additional software.  No iWorks, iPhoto, etc.  They were left to their default of None, so arguably, the Dell is more functional out of the box. Other than changing the hardware specs to be close, all other configuration options were left at their default. So riddle me this, Batman:  Why do people buy Macs?  I have several dev buddies that own them, but I can’t justify the cost.  First, most of them load bootcamp and/or parallels at extra cost to run windows 7 and windows apps.  The hardware isn’t as good.  The price is almost twice as expensive. How do you justify the premium price? Technorati Tags: General

    Read the article

  • Qmail Toaster and Squirrelmail SSL config location.

    - by BlaineM
    I've been racking my brain and Google to try and find where the location of the SSL config is located for my Qmail / Squirrelmail install. I've installed SSL certs for Apache before, where I specify inside of the proper virtualhost section where the SSL cert is located, but am unable to find it for the services above. Inside of the httpd.conf, there are two include file additions which are for Qmail Toaster and Squirrelmail, but when I edit the files, they don't specify locations for the SSL cert they're using. thanks for the help!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >