Daily Archives

Articles indexed Friday March 12 2010

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

  • Drupal node_save and special characters.

    - by Pierre
    Hello, i'm trying to create nodes and taxonomy terms through a custom php script by using the node_save() function. I'm working on drupal 6. It's working well (thanks to previous questions on stackoverflow) except for accented letters. Indeed, when a title or a taxonomy term contain "é", "è" or "à", the sentence is cut before those special characters. For example, a title like that: "Bonjour les éléphants" will create a node with "Bonjour les " as title. I don't know if it's linked to my database or if i have to use a special encoding in php (iconv() blabla) The fact is, for drupal titles, i can not use html encoding (for example: é is é in html) because drupal will render &eacute and not é... When i create a taxonomy or a title manually, i have no problems and the accented letter is saved in the database as "é". Soo if you can help me to create terms and title with accented letters, that will be great : ) Thank you !

    Read the article

  • Verifying the purchaser of an App Store application

    - by Keldi
    Is there a way for the developer of an App Store application to tie a sale to an individual user/device ID/Apple account? In other words, a method for the developer to double-check that a specific user has legally purchased the software? I haven't been able to find a reliable answer to this yet. I'm not looking for specific code examples, just some sort of idea as to how possible (or difficult) this is. My intent isn't to penalize piracy; it's to be able to provide additional benefits to paid customers. As such, I'm not looking for a way to identify a cracked or pirated version, which I gather has already been solved. Thanks in advance for any help you can provide!

    Read the article

  • c++ specialized overload?

    - by acidzombie24
    -edit- i am trying to close the question. i solved the problem with boost::is_base_and_derived In my class i want to do two things. 1) Copy int, floats and other normal values 2) Copy structs that supply a special copy function (template T copyAs(); } the struct MUST NOT return int's unless i explicitly say ints. I do not want the programmer mistaking the mistake by doing int a = thatClass; -edit- someone mention classes dont return anything, i mean using the operator Type() overload. How do i create my copy operator in such a way i can copy both 1) ints, floats etc and the the struct restricted in the way i mention in 2). i tried doing template <class T2> T operator = (const T2& v); which would cover my ints, floats etc. But how would it differentiate from structs? so i wrote T operator = (const SomeGenericBase& v); The idea was the GenericBase would be unsed instead then i can do v.Whatever. But that backfires bc the functions i want wouldnt exist, unless i use virtual, but virtual templates dont exist. Also i would hate to use virtual I think the solution is to get rid of ints and have it convert to something that can do .as(). So i wrote something up but now i have the same problem, how does that differentiate ints and structs that have the .as() function template?

    Read the article

  • Making GWT application crawlable by a search engine.

    - by Philippe Beaudoin
    I want to use the #! token to make my GWT application crawlable, as described here: http://code.google.com/web/ajaxcrawling/ There is a GWT sample app available online that uses this, for example: http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton Will serve the following static webpage to the googlebot: http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragment_=CwRadioButton I want my GWT app to do something similar. In short, I'd like to serve a different flavor of the page whenever the _escaped_fragment_ parameter is found in the URL. What should I modify in order for the server to serve something else (a static page, or a page dynamically generated through a headless browser like HTML Unit)? I'm guessing it could be the web.xml file, but I'm not sure. (Note: I thought of checking the Showcase app provided with the GWT SDK, but unfortunately it doesn't seem to support serving static files on _escaped_fragment_ and it doesn't use the #! token..)

    Read the article

  • Design for a machine learning artificial intelligence framework

    - by Lirik
    This is a community wiki which aims to provide a good design for a machine learning/artificial intelligence framework (ML/AI framework). Please contribute to the design of a language-agnostic framework which would allow multiple ML/AI algorithms to be plugged into a single framework which: runs the algorithms with a user-specified data set. facilitates learning, qualification, and classification. allows users to easily plug in new algorithms. can aggregate or create an ensemble of the existing algorithms. can save/load the progress of the algorithm (i.e. save the network and weights of a neural network, save the tree of a decision tree, etc.). What is a good design for this sort of ML/AI framework?

    Read the article

  • XSD Schema for XML with multiple structures

    - by Xetius
    I am attempting to write an XML Schema to cover a number of XML conditions which I may encounter. I have the same root element (serviceRequest) with different child elements. I was trying to use the xs:extension element to define multiple versions, but it is complaining about unexpected element orderInclusionCriteria etc. Am I going about this the right way, or is there a better way to define this? The other way I thought about this was to have a single xs:choice with all the options inside it, but this seemed somewhat inelegant. These XSD files are for use within XMLBeans if that makes any difference. I have Given the following 2 examples of XML: 1) <?xml version="1.0" encoding="utf-8"?> <serviceRequest method="GOO" debug="NO"> <sessionId sID="ABC1234567" /> <orderInclusionCriteria accountId="1234567" accountNum="1234567890" /> </serviceRequest> 2) <?xml version="1.0" encoding="utf-8"?> <serviceRequest method="GOO" debug="NO"> <sessionId sID="ABC1234567" /> <action aType='MakePayment'> <makePayment accountID='CH91015165S' amount='5.00' /> </action> </serviceRequest> I thought I could use the following schema file: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="serviceRequest" type="ServiceRequestType" /> <xs:element name="session" type="SessionType" /> <xs:attribute name="method" type="xs:string" /> <xs:attribute name="debug" type="xs:string" /> <xs:complexType name="SessionType"> <xs:attribute name="sID" use="required"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:attribute> </xs:complexType> <xs:complexType name="ServiceRequestType"> <xs:sequence> <xs:element ref="session" /> </xs:sequence> <xs:attribute ref="method" /> <xs:attribute ref="debug" /> </xs:complexType> <xs:complexType name="OrderTrackingServiceRequest"> <xs:complexContent> <xs:extension base="ServiceRequestType"> <xs:complexType> <xs:sequence> <xs:element name="OrderInclusionCriteria" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="Action"> <xs:complexContent> <xs:extension base="ServiceRequestType"> <xs:complexType> <xs:sequence> <xs:element name="makePayment"> <xs:complexType> <xs:attribute name="accountID" type="xs:string" /> <xs:attribute name="amount" type="xs:string" /> <xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="aType" type="xs:string" /> </xs:complexType> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema>

    Read the article

  • loadmovie into a fla-cs3 (as2)

    - by Brian
    Hi, I've been trying to load a simple .swf (home.swf) and have it play automatically on my existing fla project (as2). These are the steps I have taken.. 1) create MC, named "holder" 2) within first frame of MC, entered in.. loadMovie("home.swf","holder"); Nothing is showing, I'm not sure what I'm doing wrong. If you can help, I can send you the files I'm working with. Am really stuck.. thanks.

    Read the article

  • SQL Server 2000 (8.0) SP 4 crash after load Linked Servers

    - by Angel Escobedo
    Hello I configured one Oracle 10g Linked Server on my SQL Server 2000, so two days ago I can view the tables and views, today when I try to check it again I get an connection error, something with latency and time out operation "readsni" in the process of login the sa user. Then I lost all connections and have to restart the SQL Server. What could be the problem? Thanks

    Read the article

  • Setup Entourage for Exchange via HTTP communication

    - by Johandk
    Our ISP set up a hosted exchange server for all our mail. I've setup all our Outlook users with no problems. We have two people using Mac OSX Leopard and Entourage. Entourage has the option of adding an Exchange account, but I have no idea how to tell it to connect to exchange via HTTP. Heres an excerpt from the client setup docs the hosting company sent me for Outlook: 1 .Go to control panel 2. Select ‘Mail’ 3. Select ‘Email accounts’ Under the E-mail tab select ‘New’ Select ‘Manually configure server settings......’ - click next Select ‘Microsoft Exchange’ – click next Complete details as below with Microsoft Exchange Server as: [server address] Do not select ‘Check Name’. Instead select ‘More Settings’. Go to the Connection tab, and select the bottom option ‘Connect to Microsoft Exchange using HTTP’. And then select the ‘Exchange Proxy Settings’ button. Enter Proxy server for Exchange Check Only connect to proxy servers that have this principal name in their certificate, Enter msstd:[servername] Proxy Authentication - select Basic Authentication Select OK, and again, so that you return to the main screen. Now select ‘Check Name’. Enter Username and Password: The username should now be the full name and underlined. If so select next, and then finish. Next time you open Outlook, enter username and password Any help GREATLY appreciated.

    Read the article

  • new linux windows open behind existing windows

    - by Poul
    I'm running ubuntu and I have a strange issue where any new window I open (open office doc, pidgeon window, etc) open behind current windows. this is frustrating, especially for IM windows as I often don't see the window. Has anyone ever had this issue, and know how to resolve it? Thanks!

    Read the article

  • Fixing striped printing from inkjet printer

    - by JW
    My Canon IP3000 printer recently started having problems with the black ink. Anything printed in black comes out striped, alternating between dark and light. An example is below. I've tried the following: Running the printer utility's head cleaning and "deep cleaning" a few times Running the utility's head alignment Replacing the ink cartridge with a new one Removing the print head and cleaning the bottom with denatured alcohol Anything else I can try before throwing this thing away? I'm considering buying a replacement print head, but is this likely to be solved by replacing the head?

    Read the article

  • Modal windows plugin to rails

    - by VP
    Hi, I'm starting to digg some rails plugins to create modal forms in rails. Almost all documents that you find are too old (2006,2007) or more focused in php. I would like to create a "feedback" tab that when you click on that, it opens a form. For example, you can check the railscast website, http://railscasts.com/. Ryan Bates made it in his website, but didnt make any screencast about it. any idea/tip about a rails plugin to work with jquery and to do those forms?

    Read the article

  • ExecutorSerrvice memory leak on exception

    - by TofuBeer
    I am having a hard time tracking this down since the profiler keeps crashing (hotspot error). Before I go too deep into figuring it out I'd like to know if I really have a problem or not :-) I have a few thread pools created via: Executors.newFixedThreadPool(10); The threads connect to different web sites and, on occasion, I get connection refused and wind up throwing an exception. When I later on call Future.get() to get the result it will then catch the ExecutionException that wraps the exception that was thrown when the connection could not be made. The program uses a fairly constant amount of memory up until the point in time that the exceptions get thrown (they tend to happen in batches when a particular site is overloaded). After that point the memory again remains constant but at a higher level. So my question is along the lines of is the memory behaviour (reported by "top" on Unix) expected because the exceptions just triggered something or do I probably have an actual leak that I'll need to track down? Additionally when Future.get() throws an exception is there anything else I need to do besides catch the exception (such as call Future.cancel() on it)?

    Read the article

  • Strange error coming from ActiveRecord (probably)

    - by artemave
    My development environment: Ubuntu 9 Ruby 1.9.1/1.8.7 (rvm) Rails 2.3.5 Mysql 5.0 Apache Passenger Below is the part of the program flow to represent the issue. Request comes: #action def create begin @report = Report.new(params[:report]) ... rescue LocationNotFound => e ... end end Report constructor: class Report attr_accessor :locations def initialize(params = {}) @locations = params[:locations] ? fetch_locations(params[:locations]) : [] end ... end fetch_locations: def fetch_locations(loc_names) Rails.logger.debug "LOC_NAMES: " + loc_names.inspect ls = Location.find(:all, :conditions => [ # line 57 "locations.name in (#{loc_names.map{'?'}.join(',')})", *loc_names ], :include => [:sample_summaries, :samples]) # loc_names will never be empty ... end Location model: class Location < ActiveRecord::Base has_many :sample_summaries has_many :samples, :through => :sample_summaries ... end Now, the first time (after passenger restart) this runs fine and does the job. Most of the consequent times I get the error: Mar-11 11:01:00 #15098 DEBUG: LOC_NAMES: ["Moscow, RF", "London, UK"] Mar-11 11:01:00 #15098 DEBUG: Location Load (0.0ms) SELECT * FROM `locations` WHERE (locations.name in ('Moscow, RF','London, UK')) Mar-11 11:01:00 #15098 DEBUG: SampleSummary Load (0.0ms) SELECT `sample_summaries`.* FROM `sample_summaries` WHERE (`sample_summaries`.location_id IN (1,3)) Mar-11 11:01:00 #15098 DEBUG: SampleSummary Columns (0.0ms) SHOW FIELDS FROM `sample_summaries` Mar-11 11:01:00 #15098 FATAL: NoMethodError (You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.include?): app/models/report.rb:57:in `fetch_locations' app/models/report.rb:9:in `initialize' app/controllers/report_controller.rb:11:in `new' app/controllers/report_controller.rb:11:in `create' Looks quite random to me. Any ideas? P.S. I also tried to wrap the query in uncached block, but that didn't change anything. EDIT Here is what SampleSummary model looks like: class SampleSummary < ActiveRecord::Base has_many :samples belongs_to :location ... #validations default_scope :include => :samples, :order => 'rss_ts desc' ... end

    Read the article

  • SVN Import Force for importing existing file

    - by Daniel A. White
    I am creating a text file and a zip file for a tag automatically with MSBuild. My msbuild project is called by cruisecontrol.net. The text file is always going to be latest.txt and the zip file will be (version).zip (so it will be different every time). I do not want to commit these files back to my trunk, so I discovered svn import. On the first time, it works for both. On successive runs, it fails since latest.txt already exists in the repository. Do I need to use svn import --force or something else to get these two files pushed up to my repository?

    Read the article

  • How to find Junit tests that are using a given Java method directly or indirectly

    - by IT-Worx
    Assume there are Java project and Junit project in an Eclipse workspace. And All the unit tests are located in the Junit project and dependent on the application Java project. When making changes to a Java method, I need to find the unit tests that are using the method directly or indirectly, so that I can run the corresponding tests locally in my PC before checking into source control. I don't want to run the entire junit project since it takes time. I could use Eclipse call hierarchy to expand caller methods one by one until I find a test method. But for a project including more than 1 million lines of source code, digging down the call hierarchy takes time too. The search scope within call hierarchy view doesn't seem help much. Appreciate any help.

    Read the article

  • Help Forming An SQL Query That Selects The Max Difference Of Two Fields

    - by Frank
    I'm trying to select a record with the most effective votes. Each record has an id, the number of upvotes (int) and the number of downvotes (int) in a MySQL database. I know basic update, select, insert queries but I'm unsure of how to form a query that looks something like: SELECT * FROM topics WHERE MAX(topic.upvotes - topic.downvotes). Please excuse my made up SQL. The tutorials on SQL I find on the internet cover very basic stuff. Does anyone recommend a good book on this subject?

    Read the article

  • How to get real Integer Overflows in Matlab/Octave

    - by marvin2k
    Hi there. I'm working on a verification-tool for some VHDL-Code in Matlab/Octave. Therefore I need datatypes which generate "real" overflows: intmax('int32') + 1 ans = -2147483648 Lateron, it would be helpfull if i can define the bitwidth of a variable... But that is not so important... When I build a C-like example, where a variable gets increased until it's smaller than zero, it spins forever and ever... test = int32(2^30); while (test > 0) test = test + int32(1); end Another approach i tried was a custom "overflow"-routine which was called everytime after a number is changed. This approach was painfully slow, not practicable and not working in all cases at all...

    Read the article

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