Daily Archives

Articles indexed Tuesday May 18 2010

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

  • Microsoft Web Camps in Moscow, Beijing, Shanghai this Week

    Microsoft Web Camps are free, two-day events where you can learn about the latest components of the Microsoft Web Platform, work with hands-on labs, build solutions in teams, and have direct interaction with Microsoft experts. Technologies covered include ASP.NET, Visual Studio, IIS and more. Register today....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Cables for building a computer

    - by Faken
    I'm looking at building a computer and I have already done a whole bunch of research the topic and I think I know what I'm doing. My question is where do all the cables required for connecting everything come from? I'm pretty sure that the cables required come from their respective components (power connectors from the power supply, assorted cables from the motherboard, ect). However nowhere have I seen it explicitly stated that the cables come with the component I am buying. Just to confirm, if I buy all the components needed for a basic computer (CPU, motherboard, power supply, case, ram, video card, hard drive) from a website, say newegg, will I have all the screws, cables,connectors, and components to put together a working computer or will I need to buy some cables somewhere?

    Read the article

  • EJB3 lookup on websphere

    - by dcp
    I'm just starting to try to learn Websphere, and I have my ejb deployed, but I cannot look it up. Here's is what I have: public class RemoteEJBCount { public static Context ctx; private static String jndiNameStateless = "EJB3CounterSample/EJB3Beans.jar/StatelessCounterBean/com/ibm/websphere/ejb3sample/counter/RemoteCounter"; public static void main(String[] args) throws NamingException { RemoteCounter statelessCounter; Hashtable<String, Object> env = new Hashtable<String, Object>(); env.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:2809"); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); ctx = new InitialContext(env); statelessCounter = (RemoteCounter)ctx.lookup(jndiNameStateless); } } Is there something I need to be doing differently to look up the EJB?

    Read the article

  • Clojure: Equivalent to Common Lisp READ function?

    - by jkndrkn
    Hi there. When I want to read in an S-expression stored in a file into a running Common Lisp program, I do the following: (defun load-file (filename) "Loads data corresponding to a s-expression in file with name FILENAME." (with-open-file (stream filename) (read stream))) If, for example, I have a file named foo.txt that contains the S-expression (1 2 3), the above function will return that S-expression if called as follows: (load-file "foo.txt"). I've been searching and searching and have not found an equally elegant solution in Clojure. Any ideas? Thanks!

    Read the article

  • How do you drop in substitute JRE classes?

    - by evilfred
    Hi, java.util.zip has well-known problems with native memory usage, so i'm trying to use a drop-in replacement called "jazzlib". unfortunately as is typical for sourceforge projects there is no documentation. If I add the jar to my classpath then Java freaks out and gives me "prohibited package name" errors because it replaced java.util.zip. How do I tell Java that this is what I want it to do?

    Read the article

  • Form Loop Error

    - by JM4
    I have a form which loops if the value indicated is less than or equal the number of 'enrollee's needed. The while loop works perfectly with one exception, I use DOB fields which ALSO use FOR loops to display their values. If I remove the DOB fields, the form loop works fine, when left in, it errors out. Any ideas? <form id="Enroll_Form" action="<?php $_SERVER['PHP_SELF']; ?>" method="post" name="Enroll_Form" > <?php $i=1; while ($i <= ($_SESSION['Num_Members'])): {?> <table class="demoTable"> <tr> <td>First Name: </td> <td><input type="text" name="F1FirstName" value="<?php echo $fields['F1FirstName']; ?>" /></td> </tr> <tr> <td>Middle Initial: </td> <td><input type="text" name="F1MI" size="2" maxlength="1" value="<?php echo $fields['F1MI']; ?>" /></td> </tr> <tr> <td>Last Name: </td> <td><input type="text" name="F1LastName" value="<?php echo $fields['F1LastName']; ?>" /></td> </tr> <tr> <td>Federation No: </td> <td><input type="text" name="F1FedNum" maxlength="10" value="<?php echo $fields['F1FedNum']; ?>" /></td> </tr> <tr> <td>SSN: </td> <td><input type="text" name="F1SSN1" size="3" maxlength="3" value="<?php echo $fields['F1SSN1']; ?>" /> - <input type="text" name="F1SSN2" size="2" maxlength="2" value="<?php echo $fields['F1SSN2']; ?>" /> - <input type="text" name="F1SSN3" size="4" maxlength="4" value="<?php echo $fields['F1SSN3']; ?>" /> </td> </tr> <tr> <td>Date of Birth</td> <td> <select name="F1DOB1"> <option value="">Month</option> <?php for ($i=1; $i<=12; $i++) { echo "<option value='$i'"; if ($fields["F1DOB1"] == $i) echo " selected"; echo ">$i</option>"; } ?> </select> / <select name="F1DOB2"> <option value="">Day</option> <?php for ($i=1; $i<=31; $i++) { echo "<option value='$i'"; if ($fields["F1DOB2"] == $i) echo " selected"; echo ">$i</option>"; } ?> </select> / <select name="F1DOB3"> <option value="">Year</option> <?php for ($i=date('Y'); $i>=1900; $i--) { echo "<option value='$i'"; if ($fields["F1DOB3"] == $i) echo " selected"; echo ">$i</option>"; } ?> </select> </td> </tr> <tr> <td>Address: </td> <td><input type="text" name="F1Address" value="<?php echo $fields['F1Address']; ?>" /></td> </tr> <tr> <td>City: </td> <td><input type="text" name="F1City" value="<?php echo $fields['F1City']; ?>" /></td> </tr> <tr> <td>State: </td> <td><select name="F1State"><option value="">Choose a State</option><?php showOptionsDrop($states_arr, null, true); ?></select></td> </tr> <tr> <td>Zip Code: </td> <td><input type="text" name="F1Zip" size="6" maxlength="5" value="<?php echo $fields['F1Zip']; ?>" /></td> </tr> <tr> <td>Contact Telephone No: </td> <td>( <input type="text" name="F1Phone1" size="3" maxlength="3" value="<?php echo $fields['F1Phone1']; ?>" /> ) <input type="text" name="F1Phone2" size="3" maxlength="3" value="<?php echo $fields['F1Phone2']; ?>" /> - <input type="text" name="F1Phone3" size="4" maxlength="4" value="<?php echo $fields['F1Phone3']; ?>" /> </td> </tr> <tr> <td>Email:</td> <td><input type="text" name="F1Email" value="<?php echo $fields['F1Email']; ?>" /></td> </tr> </table> <br /> <?php } $i++; endwhile; ?> <div align="right"><input class="enrbutton" type="submit" name="submit" value="Continue" /></div> </form>

    Read the article

  • Publish failed in Web Application Project (MVC)

    - by Stuck
    I usually use the "Publish" feature in VS 2008 to get the correct files and so on that I can publish to my website. But from time to time publish fails without any good error message at all. I know that it can be a couple of different reasons but I am starting to grow really tired with this now. Can anyone teach me how to build the website from the command line? As I said it is a MVC project. Can I use the aspnet_compiler for this? What parameters should I use to simulate the same behavior as a "Publish"?

    Read the article

  • Why does my JSF + Spring web application output JSF source code instead of interpreted HTML page?

    - by Corvus
    I'm new to both JSF and Spring Framework and I'm trying to figure out how to make them work together. My current problem is that application outputs my JSF files without interpreting them. Here are some snippets of my code which I believe might be relevant: dispatcher-servlet.xml <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="login.htm">loginController</prop> </props> </property> </bean> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/pages/" p:suffix=".xhtml" /> <bean name="loginController" class="controller.LoginController" /> loginController public class LoginController extends MultiActionController { public ModelAndView login(HttpServletRequest request, HttpServletResponse response) throws Exception { System.out.println("LOGIN"); return new ModelAndView("login"); } WEB-INF/pages/login.xhtml <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>#{message.log}</title> </h:head> <h:body> <h:form> <h:outputLabel value="#{message.username}" for="userName"> <h:inputText id="userName" value="#{User.name}" /> </h:outputLabel> <h:commandButton value="#{message.loggin}" action="#{User.login}" /> </h:form> </h:body> </html> Any ideas where the problem might be? Does this code make any sense at all? I'm well aware of fact, that probably completely sucks and I'll be glad to here WHY it sucks and how to make it better. Thanks :)

    Read the article

  • Reversing Django URLs With Extra Options

    - by Justin Voss
    Suppose I have a URLconf like below, and 'foo' and 'bar' are valid values for page_slug. urlpatterns = patterns('', (r'^page/(?P<page_slug>.*)/', 'myapp.views.someview'), ) Then, I could reconstruct the URLs using the below, right? >>> from django.core.urlresolvers import reverse >>> reverse('myapp.views.someview', kwargs={'page_slug': 'foo'}) '/page/foo/' >>> reverse('myapp.views.someview', kwargs={'page_slug': 'bar'}) '/page/bar/' But what if I change my URLconf to this? urlpatterns = patterns('', (r'^foo-direct/', 'myapp.views.someview', {'page_slug': 'foo'}), (r'^my-bar-page/', 'myapp.views.someview', {'page_slug': 'bar'}), ) I expected this result: >>> from django.core.urlresolvers import reverse >>> reverse('myapp.views.someview', kwargs={'page_slug': 'foo'}) '/foo-direct/' >>> reverse('myapp.views.someview', kwargs={'page_slug': 'bar'}) '/my-bar-page/' However, this throws a NoReverseMatch exception. I suspect I'm trying to do something impossible. Any suggestions on a saner way to accomplish what I want? Named URLs aren't an option, since I don't want other apps that link to these to need to know about the specifics of the URL structure (encapsulation and all that).

    Read the article

  • MQ window to Unix special chars

    - by user171523
    I am using .net client to post mesages to MQ server which is hosted on Unix. It is added some control character before the messages. Like below ^CD The Queue connection is through SSL Table channel connection. The code i am using is MQQueueManager queueManager = new MQQueueManager ; int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_BIND_NOT_FIXED + MQC.MQOO_FAIL_IF_QUIESCING; MQQueue Queue = queueManager.AccessQueue("TestQueue", openOptions); MQMessage queueMessage = new MQMessage(); queueMessage.WriteUTF(""); MQPutMessageOptions MessageOptions = new MQPutMessageOptions(); Queue.Put(queueMessage, MessageOptions); please let me know what cause this special chars

    Read the article

  • Using sigprocmask to implement locks

    - by EpsilonVector
    I'm implementing user threads in Linux kernel 2.4, and I'm using ualarm to invoke context switches between the threads. We have a requirement that our thread library's functions should be uninterruptable, so I looked into blocking signals and learned that using sigprocmask is the standard way to do this. However, it looks like I need to do quite a lot to implement this: sigset_t new_set, old_set; sigemptyset(&new_set); sigaddset(&new_set, SIGALRM); sigprocmask(SIG_BLOCK, &new_set, &old_set); This blocks SIGALARM but it does this with 3 function invocations! A lot can happen in the time it takes for these functions to run, including the signal being sent. The best idea I had to mitigate this was temporarily disabling ualarm, like this: sigset_t new_set, old_set; time=ualarm(0,0); sigemptyset(&new_set); sigaddset(&new_set, SIGALRM); sigprocmask(SIG_BLOCK, &new_set, &old_set); ualarm(time, 0); Which is fine except that this feels verbose. Isn't there a better way to do this?

    Read the article

  • Picking up a lot of failed authentications for various accounts

    - by Josh K
    My server is getting a lot of various failed authentication attempts for various accounts. The most common one (that I've seen ) or the root account. I have since enabled Fail2Ban and ran several rootkit / malware checks to ensure I wasn't compromised. Is there anything else I should do? I only have three accounts enabled, and SSH access for only two. I have a full 48hr ban on anyone making more then six failed SSH login attempts. I do not have FTP enabled.

    Read the article

  • MySQL command-line tool: How to find out number of rows affected by a DELETE?

    - by ambivalence
    I'm trying to run a script that deletes a bunch of rows in a MySQL (innodb) table in batches, by executing the following in a loop: mysql --user=MyUser --password=MyPassword MyDatabase < SQL_FILE where SQL_FILE contains a DELETE FROM ... LIMIT X command. I need to keep running this loop until there's no more matching rows. But unlike running in the mysql shell, the above command does not return the number of rows affected. I've tried -v and -t but neither works. How can I find out how many rows the batch script affected? Thanks!

    Read the article

  • directx 9 hlsl vs. directx 10 hlsl : syntex the same.

    - by numerical25
    For the past month or so I been busting my behind trying to learn directx. So I been mixing back back and fourth from directx 9 to directx 10. One of the major changes I've seen in the two is how to process vectors in the graphics card. one of the drastic changes I notice is how you get the gpu to recognize your structs. In directx 9 you define the Flexible Vertex Formats your typical set up would be like this... #define CUSTOMFVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE) in directx 10 I believe the equivalent is the input vertex description D3D10_INPUT_ELEMENT_DESC layout[] = { {"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT, 0 , 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"COLOR",0,DXGI_FORMAT_R32G32B32A32_FLOAT, 0 , 12, D3D10_INPUT_PER_VERTEX_DATA, 0} }; I notice in directx 10. it is more descriptive. besides this, what are some of the drastic changes made. and is the hlsl syntax the same for both.

    Read the article

  • Tutorial/resource for implementing VM

    - by zaharpopov
    Hello, I want self-education purpose implement a simple virtual machine for a dynamic language, prefer in C language. Something like the Lua VM, or Parrot, or Python VM, but simpler. Are there any good resources/tutorials on achieving this, apart from looking at code and design documentations of the existing VMs? Thanks in advance for your answers and ideas Edit: why close vote? I don't understand - is this not programming. Please comment if there is specific problem with my question.

    Read the article

  • XPath: Nodes that have a child node that have an attribute

    - by Jonathan Allen
    XML Fragment <component name='Stipulations'> <group name='NoStipulations' required='N'> <field name='StipulationType' required='N' /> <field name='StipulationValue' required='N' /> </group> </component> <component name='NestedParties3'> <group name='NoNested3PartyIDs' required='N'> <field name='Nested3PartyID' required='N' /> <field name='Nested3PartyIDSource' required='N' /> <field name='Nested3PartyRole' required='N' /> <group name='NoNested3PartySubIDs' required='N'> <field name='Nested3PartySubID' required='N' /> <field name='Nested3PartySubIDType' required='N' /> </group> </group> </component> <component name='UnderlyingStipulations'> <group name='NoUnderlyingStips' required='N'> <field name='UnderlyingStipType' required='N' /> <field name='UnderlyingStipValue' required='N' /> </group> </component> What I want is all "group" nodes which have a child node of type "field" and a name "StipulationType". This is what I've tried so far: dictionary.XPathSelectElements("group[field[@name='StipulationType']]") dictionary.XPathSelectElements("group[./field[@name='StipulationType']]")

    Read the article

  • OpenFileDialog - only display filenames that have no extensions

    - by fraXis
    Hello, I have the following code in my C# program: OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Open a file"; fDialog.Filter = "NCF files (*.ncf)|*.ncf|All files (*.*)|*.*|No Extensions (*.)|*."; I want to be able to have the user pick from the following: .NCF (files with .NCF extension only) *.* (all files) and files that have no extensions such as: readme (with no .txt) I know *.* will do this, but it also displays the .NCF, .TXT, and all other files in the same directory. I just want to be able to display filenames that have no extensions. Filtering with *. does not do the trick. Is there a way I can do this with C#? Thanks.

    Read the article

  • Validating class and superclass on RoR

    - by Luís Guilherme
    In ruby, you have an attribute called "type" which is the class of the object. Rails stores this at the database in a column called type. So, if I have several blog "types", I can do something like this def create @blog = Blog.new(params[:blog]) @blog[:type] = params[:blog][:type] # ... end If I add someone like this, and then load it, and ask its class (for instance, at the console), I have the right class name answered back. However, when I save it afterwards, rails will run only the superclass validators, not the ones I defined in the subclass. How should I make rails run the subclass validators?

    Read the article

  • Flash AS3 load file xml

    - by Elias
    Hello, I'm just trying to load an xml file witch can be anywere in the hdd, this is what I have done to browse it, but later when I'm trying to load the file it would only look in the same path of the swf file here is the code package { import flash.display.Sprite; import flash.events.; import flash.net.; public class cargadorXML extends Sprite { public var cuadro:Sprite = new Sprite(); public var file:FileReference; public var req:URLRequest; public var xml:XML; public var xmlLoader:URLLoader = new URLLoader(); public function cargadorXML() { cuadro.graphics.beginFill(0xFF0000); cuadro.graphics.drawRoundRect(0,0,100,100,10); cuadro.graphics.endFill(); cuadro.addEventListener(MouseEvent.CLICK,browser); addChild(cuadro); } public function browser(e:Event) { file = new FileReference(); file.addEventListener(Event.SELECT,bien); file.browse(); } public function bien(e:Event) { xmlLoader.addEventListener(Event.COMPLETE, loadXML); req=new URLRequest(file.name); xmlLoader.load(req); } public function loadXML(e:Event) { xml=new XML(e.target.data); //xml.name=file.name; trace(xml); } } } when I open a xml file that isnt it the same directory as the swf, it gives me an unfound file error. is there anything I can do? cause for example for mp3 there is an especial class for loading the file, see http://www.flexiblefactory.co.uk/flexible/?p=46 thanks

    Read the article

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