Daily Archives

Articles indexed Tuesday March 9 2010

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

  • MySQL table data question?

    - by mySQL
    How should my Mysql table data look like for a single checkbox that checks and see if the user has said yes if its clicked or no if its not? Here is the checkbox. <input type="checkbox" name="yes" id="yes" value="yes" /> I was wondering how would I add it to the following table. CREATE TABLE IF NOT EXISTS `vote` ( `counter` int(8) NOT NULL default '0', `value` int(8) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    Read the article

  • jQuery + Sortable + live

    - by user202411
    I'm adding list items to a page dynamically with $.get, then appending them to the OL element. Pretty usual to this point. But jQuery isn't aware of these new items when they get loaded into the page, and I'm not being able to make them sortable. I made some trials with jQuery Live, but didn't get anywhere whit that...

    Read the article

  • Redirect folder to different server

    - by yuval
    Just for clarity, I already posted this on StackOverflow and got advice that this better fits in ServerFault.com so here goes: I know you can redirect subdomains to a different server, but can you do the same with folders? Say I have example.com. I can redirect mysubdomain.example.com to a different server, but can I redirect example.com/mysubdomain to a different server? I'd like to host a rails app in that folder on a site that runs php while still maintaining good search engines ratings (by not creating a sub domain which in my experience in recognized as a different site). Any help? Thanks!

    Read the article

  • Learning Linux screencasts

    - by Dmitriy Nagirnyak
    Hi, I am trying to get started with Linux. There are number of books (many of which are just man pages), some of them provide good overview so I can dig deeper online then. What I would like is to find number of screencasts that would cover basics of Linux commands, server administration, commonly performed tasks etc (no GUI, only terminal). I want to watch the screencasts to "get it quicker" and then use a book or online resources to "dig it deeper". Any recommendations? Thanks, Dmitriy.

    Read the article

  • Use of infix operator hack in production code (Python)

    - by Casebash
    What is your opinion of using the infix operator hack in production code? Issues: The effect this will have on speed. The potential for a clashes with an object with these operators already defined. This seems particularly dangerous with generic code that is intended to handle objects of any type. It is a shame that this isn't built in - it really does improve readability

    Read the article

  • Can someone explain this java interface to me please?

    - by Karl Patrick
    I realize that the method run must be declared because its declared in the runnable interface. But my question comes when this class runs how is the Thread object allowed if there is no import call to a particular package? how does runnable know anything about Thread or its methods? does the runnable interface extend the thread class? Obviously i dont understand interfaces very well. thanks in advance. class PrimeFinder implements Runnable{ public long target; public long prime; public boolean finished = false; public Thread runner; PrimeFinder(long inTarget){ target = inTarget; if(runner == null){ runner = new Thread(this); runner.start() } } public void run(){ } }

    Read the article

  • SQL Overlapping and Multi-Column Indexes

    - by durilai
    I am attempting to tune some stored procedures and have a question on indexes. I have used the tuning advisor and they recommended two indexes, both for the same table. The issue is one index is for one column and the other is for multiple columns, of which it includes the same column from the first. My question is why and what is the difference? CREATE NONCLUSTERED INDEX [_dta_index_Table1_5_2079723603__K23_K17_K13_K12_K2_K10_K22_K14_K19_K20_K9_K11_5_6_7_15_18] ON [dbo].[Table1] ( [EfctvEndDate] ASC, [StuLangCodeKey] ASC, [StuBirCntryCodeKey] ASC, [StuBirStOrProvncCodeKey] ASC, [StuKey] ASC, [GndrCodeKey] ASC, [EfctvStartDate] ASC, [StuHspncEnctyIndctr] ASC, [StuEnctyMsngIndctr] ASC, [StuRaceMsngIndctr] ASC, [StuBirDate] ASC, [StuBirCityName] ASC ) INCLUDE ( [StuFstNameLgl], [StuLastOrSrnmLgl], [StuMdlNameLgl], [StuIneligSnorImgrntIndctr], [StuExpctdGrdtngClYear] ) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] go CREATE NONCLUSTERED INDEX [_dta_index_Table1_5_2079723603__K23] ON [dbo].[Table1] ( [EfctvEndDate] ASC )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

    Read the article

  • html hyperlinks show URL in brackets in Entourage

    - by Rafe
    I have an email script written in .Net that sends html emails. The email uses normal html hyperlinks to insert a link in the email, like this: <a href="http://www.stackoverflow.com/">StackOverflow</a> The problem is that in Entourage, a hyperlink like this always shows up for me like this: StackOverflow < http://www.stackoverflow.com/ > How can I format the hyperlink in my email so that in Entourage the text "StackOverflow" is the actual hyperlink, and the URL is not displayed after the text? Is there an html meta tag that needs to be set? Do I have to set the content-type somewhere? Or is there a different html syntax on the hyperlink itself that I should use?

    Read the article

  • Python Naming Conventions for Dictionaries/Maps/Hashes

    - by pokstad
    While other questions have tackled the broader category of sequences and modules, I ask this very specific question: "What naming convention do you use for dictionaries and why?" Some naming convention samples I have been considering: # 'value' is the data type stored in the map, while 'key' is the type of key value_for_key={key1:value1, key2,value2} value_key={key1:value1, key2,value2} v_value_k_key={key1:value1, key2,value2} Don't bother answering the 'why' with "because my work tells me to", not very helpful. The reason driving the choice is more important. Are there any other good considerations for a dictionary naming convention aside from readability?

    Read the article

  • iPhone team dev, do we all need the same OS?

    - by aruwanwan
    I´m just starting iPhone development with a small team of (really young and naive) colleagues, we all are fairly new to OS X, my question is: If we are planning to develop for every iPod Touch/iPhone out there (not the iPad, I read that thing requires Snow Leopard), what problems will we encounter when sharing code (and making commits) if we all have a combination of Leopard and Snow Leopard systems?

    Read the article

  • Python: Indexing list for element in nested list

    - by aquateenfan
    I know what I'm looking for. I want python to tell me which list it's in. Here's some pseudocode: item = "a" nested_list = [["a", "b"], ["c", "d"]] list.index(item) #obviously this doesn't work here I would want python to return 0 (because "a" is an element in the first sub-list in the bigger list). I don't care which sub-element it is. I don't care if there are duplicates, e.g., ["a", "b", "a"] should return the same thing as the above example. Sorry if this is a dumb question. I'm new to programming.

    Read the article

  • What is the right approach to checksumming UDP packets

    - by mr.b
    I'm building UDP server application in C#. I've come across a packet checksum problem. As you probably know, each packet should carry some simple way of telling receiver if packet data is intact. Now, UDP already has 2-byte checksum as part of header, which is optional, at least in IPv4 world. Alternative method is to have custom checksum as part of data section in each packet, and to verify it on receiver. My question boils down to: is it better to rely on (optional) checksum in UDP packet header, or to make a custom checksum implementation as part of packet data section? Perhaps the right answer depends on circumstances (as usual), so one circumstance here is that, even though code is written and developed in .NET on Windows, it might have to run under platform-independent Mono.NET, so eventual solution should be compatible with other platforms. I believe that custom checksum algorithm would be easily portable, but I'm not so sure about the first one. Any thoughts? Also, shouts about packet checksumming in general are welcome.

    Read the article

  • Error with Ajax.Beginform on ASP.NET MVC Page

    - by Rupa
    Hi I am using Ajaxy Call to load the partial view. It is working fine in Firefox and IE without in Debug Mode. But in Debug mode, I am getting the follwoing error: Error: 'Sys' is undefined Ajaxy call Code: <% using (Ajax.BeginForm("SearchResults", new AjaxOptions { UpdateTargetId = "divLoadSearchResults" } )) {%> HTML View Source corresponding to this: <form action="/Home/SearchResults" method="post" onclick="***Sys.***Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));" onsubmit="Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'divLoadSearchResults' });"> I am using MVC RC2 framework. Anyone have similar problems with RC2? If it is not in Debug mode, it is working fine. Again, if i run it using Debug mode or CTRL+F5, it shows up the error. Appreciate your responses.

    Read the article

  • C# StandardInput Sending Mofidiers

    - by Paul Oakham
    Hi All, We have some legacy software which depends on sending keystrokes to a DOS window and then scraping the screen. I am trying to re-create the software by redirecting the input and output streams of the process directly to my application. This part I have managed fine using: _Process = new Process(); { _Process.StartInfo.FileName = APPLICATION; _Process.StartInfo.RedirectStandardOutput = true; _Process.StartInfo.RedirectStandardInput = true; _Process.StartInfo.RedirectStandardError = true; _Process.StartInfo.UseShellExecute = false; _Process.StartInfo.CreateNoWindow = true; _Process.OutputDataReceived += new DataReceivedEventHandler(_Process_OutputDataReceived); _Process.ErrorDataReceived += new DataReceivedEventHandler(_Process_ErrorDataReceived); } My problem is I need to send some command modifiers such as Ctrl, ALT and Space as well as F1-12 to this process but am unsure how. I can send basic text and I receive response's fine. I just need to emulate these modifiers. Any help would be great, Cheers

    Read the article

  • AndroMDA maven code generation and JPA Annotations

    - by ArsenioM
    I am using the AndroMDA plugin for maven to generate code from an uml diagram made in MagicDraw. When the code is generated, AndroMDA desings the JPA annotation for the persitence layer. I think that at the compilation process AndroMDA uses Naming Strategies to determine the Table and Column names for the DataBase. I want to determine how AndroMDA desings this JPA annotations, because I need to display this DataBase names based on the UML entity and atributtes names. I was regarding if there is an API of AndroMDA that I could use to do this by giving it the uml diagram. Or at least, to know the Naming Strategies used by AndroMDA to achive that. AndroMDA at the compilation process design the JPA annotations for the Entities, Attributes, etc that are written in my java classes under a series of rules that exist within the EJB3 cartridge of AndroMDA. (The further Database is created using those JPA annotations). I want to create a program that returns me the same Table and Attributes names wrote on the JPA annotations, by giving it the .xml file of the uml diagram of a project. I was hoping that I could take advantage of the EJB3 cartridge to generate those Tables and Attribute names with my program. One way could be using an API of AndroMDA that do this(if it exits), or at least, by implementing the same rules used by the EJB3 cartridge for that matter. To be more illustrative, For example: If in my uml model I have an Entity called “CompanyGroup”, AndroMDA would generate the following code for the class definition: @javax.persistence.Entity @javax.persistence.Table(name = "COMPANY_GR") Public class CompanyGroup implements java.io.Serializable, Comparable< CompanyGroup This is just an example (not a real case), but nevertheless, the way how AndroMDA do the translation from “CompanyGroup” to “COMPANY_GR” has to be specified somewhere. Hope this explanation is useful enough. Thanks.

    Read the article

  • InvalidAuthenticityToken for JQuery despite setting authenticity token

    - by user117046
    I'm getting an InvalidAuthenticityToken despite adding in corresponding authenticity tokens in the jquery response. Is there an error in the code, or is there another, root problem? I appreciate any comments. Thanks! Using: Rails 2.3.3, Ruby 1.8.6, Webrick, JQuery 1.3.2 layout/networks.html.haml = token_tag = javascript_tag "window.AUTH_TOKEN = '#{form_authenticity_token}';" javascripts/application.js $(document).ready(function() { // All non-GET requests will add the authenticity token // if not already present in the data packet $(document).ajaxSend(function(event, request, settings) { if (typeof(window.AUTH_TOKEN) == "undefined") return; // <acronym title="Internet Explorer 6">IE6</acronym> fix for http://dev.jquery.com/ticket/3155 if (settings.type == 'GET' || settings.type == 'get') return; settings.data = settings.data || ""; settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(window.AUTH_TOKEN); }); ajaxLinks(); }); The rendered html has: <input name="authenticity_token" type="hidden" value="ZaXj3ACQl+8JKtaDAUoxtSsqzEagSPyHbS25ai9qWCw=" /> <script type="text/javascript"> //<![CDATA[ window.AUTH_TOKEN = 'ZaXj3ACQl+8JKtaDAUoxtSsqzEagSPyHbS25ai9qWCw='; //]]> </script> and breakpointing through, shows that window.AUTH_TOKEN has been set. Any help to resolve this would be great.

    Read the article

  • UIPickerView with NSDictionary

    - by Dave
    I am a .NET programmer and new to Objective C. I am trying to make a UIPickerView which acts like a .NET dropdownlist. User sees the list of text and selects one and the selected value (which is the ID) is used in code. I have been browsing for almost half a day trying to figure this out. I could add a regular PickerView with list of strings, picker view with mulitple components and picker view with dependent components none of which seems to answer my query. Please help.

    Read the article

  • Global find object references in NHibernate

    - by Miral
    Is it possible to perform a global reversed-find on NHibernate-managed objects? Specifically, I have a persistent class called "Io". There are a huge number of fields across multiple tables which can potentially contain an object of that type. Is there a way (given a specific instance of an Io object), to retrieve a list of objects (of any type) that actually do reference that specific object? (Bonus points if it can identify which specific fields actually contain the reference, but that's not critical.) Since the NHibernate mappings define all the links (and the underlying database has corresponding foreign key links), there ought to be some way to do it.

    Read the article

  • How would I strip an '&' symbol out of an ESRI dropdown before any of it's default control logic is

    - by Carter
    I have an ESRI dropdown control inside of an ESRI toolbar. One of the items in the dropdown needs to have an '&' symbol in it. As it turns out ESRI stuff builds it's callback strings as & delimited strings, so when an item is selected the parent toolbar immediately builds and handles the callback string. At one point it splits strings based on the '&' crashing the app. In effect, having an ampersand in an esri dropdown causes nasty stuff to happen when you select the item. What I need to do is find out how I can hop in before the callback stuff starts happening and strip that & out. I was thinking that perhaps I'd have to create a custom esri toolbar control, but I'm not sure and that'd be pretty undesirable. Any ideas?

    Read the article

  • Dockable panes created in CChildFrame not visible the second time the app. starts.

    - by Nijenhuis
    Hi, I have created some dockable panes in CChildFrame::OnCreate() The first time i start the application they are shown. The second time i start the application they are created but the splitterwindows are completly against the sides of the clients area (bottom and right), so not visible. So i have to use the mouse to pull the splitters into the clientarea so that the dockable windows become visible again. If i do File-New in my app a new client window is created and showing the dockable windows as they should be. I Think this has something to do with saving the windows layout in the registry, because if i change SetRegistryKey(_T("61sakjgsajkdg")); in the CWinApp derived class of my app. and rerun they are shown again the first time. (but not the second time i restart the app). How can i save the layout of those dockable windows as well, so if i restart my app. they are visible ? Or else how do i prevent my app. of overwritting the window layout with the one previously saved. Something to do with LoadCustomState() and SaveCustomState() ?, i could no find any info on howto implement those methods. I have here a link to the demo project to demonstrate what i mean: http://www.4shared.com/file/237193472/c384f0f6/GUI60.html Could someone tell me how to show those dockable windows in my CChildFrame class the second time the app starts?

    Read the article

  • Scaling an image in a scroller resizes the scroller when relative dimension are set to the scroller

    - by tit
    Hi, I would like to position relatively a scroller in my application like below. When I scale the image, I resize the scroller... <s:Scroller width="50%" height="50%" > <s:Group> <mx:Image id="img" source="media/paxRomana005_150dpi.jpg" /> </s:Group> </s:Scroller> If I set absolute dimension to the scroller like below, it does not resize (behaviour I want) <s:Scroller width="400" height="400" > <s:Group> <mx:Image id="img" source="media/paxRomana005_150dpi.jpg" /> </s:Group> </s:Scroller> .. but my intention is to position the scroller relatively to other components. Any explanations/solutions? Thanks

    Read the article

  • BizTalk WCF Service

    - by WtFudgE
    Hi, I am getting an error in my event viewer after deploying a wcf service on our server. The Messaging Engine received an error from transport adapter "WCF-BasicHttp" when notifying the adapter with the BatchComplete event. Reason "Value does not fall within the expected range.". The thing is, this service was running before and worked fine. I just modified a schema a bit, undeployed the service and redeployed. When I then talk to this service the event viewer shows me this message. If I deploy the same service locally it works fine. Also if I browse to my service with explorer it shows no errors. Normally when the receive location is wrong or the used user isn't in the isolated biztalk usergroup it gives an error here, but this isn't the case. Anyone have any idea what I should do? My problem is pretty urgent.. I googled my errormessage but without much success. Thanks yall

    Read the article

  • How to handle major framework/dependency upgrades?

    - by APSampson
    Looking for some best practices on handling a major dependency upgrades within a project, assuming the use of a dependency management tool(e.g., Maven 2). Specifically, I'm interested in: How get an inherited application up-to-date(e.g., Spring 1.2.x to 2.5.x) What practices can be put into place to after such an overhaul to keep applications somewhat up-to-date Your own experiences or any articles/papers you've come across/found to be useful are welcome.

    Read the article

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