Search Results

Search found 1003 results on 41 pages for 'utf8'.

Page 25/41 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • MySQL indexes: how do they work?

    - by bob-the-destroyer
    I'm a complete newbie with MySQL indexes. I have several MyISAM tables on MySQL 5.0x having utf8 charsets and collations with 100k+ records each. The primary keys are generally integer. Many columns on each table may have duplicate values. I need to quickly count, sum, average, or otherwise perform custom calculations on any number of fields in each table or joined on any number of others. I found this page giving an overview of MySQL index usage: http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html, but I'm still not sure I'm using indexes right. Just when I think I've made the perfect index out of a collection of fields I want to calculate against, I get the "index must be under 1000 bytes" error. Can anyone explain how to most efficiently create and use indexes to speed up queries? Caveat: upgrading Mysql is not possible in this case. Using Navicat Light for db administration, but this app isn't required.

    Read the article

  • Delete all but 5 newest entries in MySQL table

    - by manyxcxi
    I currently have PHP code that handles the logic for this because I do not know how to handle it in SQL. I want to create a stored procedure that will select all the elements in a table for a given run_id and delete all of them except for the 'newest' 5 entries (as noted by the stop_time column). CREATE TABLE `TAA`.`RunHistory` ( `id` int(11) NOT NULL auto_increment, `start_time` datetime default NULL, `stop_time` datetime default NULL, `success_lines` int(11) default NULL, `error_lines` int(11) default NULL, `config_id` int(11) NOT NULL, `file_id` int(11) NOT NULL, `notes` text NOT NULL, `log_file` longblob, `save` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=128 DEFAULT CHARSET=utf8;

    Read the article

  • Comparing utf-8 strings in java

    - by cppdev
    Hi, In my java program, I am retrieving some data from xml. This xml has few international characters and is encoded in utf8. Now I read this xml using xml parser. Once I retrieve a particular international string from xml parser, I need to compare it with set of predefined strings. Problem is when i use string.equals on internatinal string comparison fails. How to compare strings with internatinal strins in java ? Here's the line that compares strings string country; if(country.equals("Côte d'Ivoire")) { }

    Read the article

  • Large number of Google Map Markers and IE6?

    - by Sivakanesh
    I'm working on an application that generates a large number of Google Map markers (2000 - 7000) via JSON. I'm also using MarkerCluster. It works quick on Chrome and FF but IE6 takes few minutes and just crashes the first time I try to zoom in. I'm not doing any more than just adding the markers to a map using JQuery & GMap API. So I looked at the following URL of the regular Google Map. http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&q=hotel&sll=53.182996,-2.581787&sspn=1.494529,4.927368&ie=UTF8&split=1&rq=1&ev=p&hq=hotel&hnear=&ll=53.123702,-2.730103&spn=1.496594,4.927368&t=h&z=8 It shows a lot of tiny markers (~1000) and works fine on IE6. Do you have any ideas why this works and the markers added via the API struggles? Thanks

    Read the article

  • float change from python 3.0.1 to 3.1.2

    - by Jeremy
    Im trying to learn python. I am using 3.1.2 and the o'reilly book is using 3.0.1 here is my code import urllib.request price = (99.99) while price 4.74: page = urllib.request.urlopen ("http://www.beans-r-us.biz/prices-loyalty.html") text = page.read().decode("utf8") where = text.find('>$') start_of_price = where + 2 end_of_price = start_of_price + 6 price = float(text[start_of_price:end_of_price]) print ("Buy!") - here is my error Traceback (most recent call last): File "/Users/odin/Desktop/Coffe.py", line 14, in price = float(text[start_of_price:end_of_price]) ValueError: invalid literal for float(): 4.59 what is wrong? please help!!

    Read the article

  • Java interface and abstract class issue

    - by George2
    Hello everyone, I am reading the book -- Hadoop: The Definitive Guide, http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/0596521979/ref=sr_1_1?ie=UTF8&s=books&qid=1273932107&sr=8-1 In chapter 2 (Page 25), it is mentioned "The new API favors abstract class over interfaces, since these are easier to evolve. For example, you can add a method (with a default implementation) to an abstract class without breaking old implementations of the class". What does it mean (especially what means "breaking old implementations of the class")? Appreciate if anyone could show me a sample why from this perspective abstract class is better than interface? thanks in advance, George

    Read the article

  • Jquery show() not working in FF

    - by Andrea Zironda
    I have issues with FF & Jquery .show(). my website shows an embedded map from google in clicking a link.i have got a javascript function that handle this, in safari it works great.FF won't show the map. this is the js. function: function mostraPagina(nome){ if (nome='mappa'){ $('#mappa').load('contenuti/mappe/mappa_thiene.html'); $('#dark_background').show(600); $('#mappa').show(600); } } the embedded code from google maps is: <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Via+Murialdo,+4,+Thiene+italy&amp;sll=45.710686,11.475665&amp;sspn=0.002439,0.005676&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Murialdo,+4,+36016+Thiene+Vicenza,+Veneto,+Italy&amp;ll=45.710222,11.475618&amp;spn=0.001219,0.002838&amp;t=h&amp;z=14&amp;output=embed"></iframe> thank you very much.

    Read the article

  • Batch convert latin-1 files to utf-8 using iconv

    - by Jasmo
    I'm having this one PHP project on my OSX which is in latin1 -encoding. Now I need to convert files to UTF8. I'm not much a shell coder and I tried something I found from internet: mkdir new for a in ls -R *; do iconv -f iso-8859-1 -t utf-8 <"$a" new/"$a" ; done But that does not create the directory structure and it gives me heck load of errors when run. Can anyone come up with neat solution?

    Read the article

  • Getting Bad file descriptor when running Tornado AsyncHTTPTestCase

    - by Will
    When running a test using the Tornado AsyncHTTPTestCase I'm getting a stack trace that isn't related to the test. The test is passing so this is probably happening on the test clean up? I'm using Python 2.7.2, Tornado 2.2. The test code is: class AllServersHandlerTest(AsyncHTTPTestCase): endpoint = AllServersHandler.endpoint # '/rest/test/' def test_server_status_with_advertiser(self): on_new_host(None, '127.0.0.1') response = self.fetch(self.endpoint, method='GET') result = json.loads(response.body, 'utf8').get('data') self.assertEquals(['127.0.0.1'], result) The test passes ok, but I get the following stack trace from the Tornado server. OSError: [Errno 9] Bad file descriptor INFO:root:200 POST /rest/serverStatuses (127.0.0.1) 0.00ms DEBUG:root:error closing fd 688 Traceback (most recent call last): File "C:\Python27\Lib\site-packages\tornado-2.2-py2.7.egg\tornado\ioloop.py", line 173, in close os.close(fd) OSError: [Errno 9] Bad file descriptor Any ideas how to cleanly shutdown the test case?

    Read the article

  • Hibernate doesn't generate cascade

    - by Shervin
    Hi. I have a set hibernate.hbm2ddl.auto to create so that Hibernate creates the tables in mysql for me. However, it doesn't seem that hibernate correctly adds Cascade on the references in the table. It does however work when I for instance delete a row, and I have a delete cascade as hibernate annotation. So I guess that means that Hibernate reads the annoation on runtime, and perform cascading manually? Is that normal behavior? For instance: @Entity class Report { @OneToOne(cascade = CascadeType.ALL) public File getPdf() { return pdf; } } Here I have set cascade to ALL. However, when running show create table Report Report | CREATE TABLE `Report` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `pdf_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK91B14154FDE6543A` (`pdf_id`), CONSTRAINT `FK91B14154FDE6543A` FOREIGN KEY (`pdf_id`) REFERENCES `File` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | It doesn't say anything about cascading other then the foreign key. In my opinion, it should have added the ON DELETE CASCADE ON DELETE UPDATE

    Read the article

  • XmlDocument.WriteTo truncates resultant file

    - by Brad Heller
    Trying to serialize an XmlDocument to file. The XmlDocument is rather large; however, in the debugger I can see that the InnerXml property has all of the XML blob in it -- it's not truncated there. Here's the code that writes my XmlDocument object to file: // Write that string to a file. var fileStream = new FileStream("AdditionalData.xml", FileMode.OpenOrCreate, FileAccess.Write); xmlDocument.WriteTo(new XmlTextWriter(fileStream, Encoding.UTF8) {Formatting = Formatting.Indented}); fileStream.Close(); The file that's produced here only writes out to line like 5,760 -- it's actually truncated in the middle of a tag! Anyone have any ideas why this would truncate here?

    Read the article

  • MySQL Trigger with dynamic table name

    - by Thomas
    I've look around a bit and can't quite find an answer to my problem: I want a trigger to execute after an insert on a table and to take that data that is being inserted and do two things Create a new table from the client id and partner id Insert the 'data' that just was inserted into the new table I am fairly new to the Stored procedures and triggers so I came up with this but am having difficulty debugging it: delimiter $$ CREATE TRIGGER trg_creas_insert BEFORE INSERT ON tracking.creas for each row BEGIN DECLARE @tableName varchar(40); DECLARE @createStmnt mediumtext; SET @tableName = concat('crea_','_', NEW.idClient_crea,'_',NEW.idPartenaire_crea); SET @createStmnt = concat('CREATE TABLE IF NOT EXISTS', @tableName, '( `data_crea` mediumtext NOT NULL ) ENGINE=MyISAM AUTO_INCREMENT=29483330 DEFAULT CHARSET=utf8 PACK_KEYS=0'); PREPARE stmt FROM @createStmnt; EXECUTE stmt; INSERT INTO @tableName (data_crea) values (NEW.data_crea); END$$ delimiter ; Thoughts?

    Read the article

  • Should I convert overlong UTF-8 strings to their shortest normal form?

    - by Grant McLean
    I've just been reworking my Encoding::FixLatin Perl module to handle overlong UTF-8 byte sequences and convert them to the shortest normal form. My question is quite simply "is this a bad idea"? A number of sources (including this RFC) suggest that any over-long UTF-8 should be treated as an error and rejected. They caution against "naive implementations" and leave me with the impression that these things are inherently unsafe. Since the whole purpose of my module is to clean up messy data files with mixed encodings and convert them to nice clean utf8, this seems like just one more thing I can clean up so the application layer doesn't have to deal with it. My code does not concern itself with any semantic meaning the resulting characters might have, it simply converts them into a normalised form. Am I missing something. Is there a hidden danger I haven't considered?

    Read the article

  • how to run existing symfony 1.4.18 project in localhost

    - by nickleefly
    I have all the symfony 1.4.18 source file in a folder called symfony. And I have the database. under this symfony folder it has apps, cache, config, data, lib, log, plugins, test, web, .gitignore, symfony what all i need to do to make it work in another shared host server? how can i make it run in localhost ? the config file is the following Under the config folder, vhost.conf file DocumentRoot /var/www/vhosts/example.com/httpdocs/web <Directory /var/www/vhosts/example.com/httpdocs/web> Options +FollowSymlinks php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/tmp:/usr/local/php:/usr/share/pear" </Directory> properties.ini file [prod] host=youripaddress port=22 user=yourusername dir=/var/www/vhosts/example.com/httpdocs/ type=rsync password=yourpassword databases.yml all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=yourdbname' username: yourdbusername password: yourdbpassword attributes: default_table_type: InnoDB default_table_collate: utf8_unicode_ci default_table_charset: utf8 use_dql_callbacks: true

    Read the article

  • Google Maps custom marker - can the iframe accept one like the static maps?

    - by alex
    I was reading the static maps API, and it says you can include a custom marker in the GET params. You simply link to an image file. I now have a second Google Map within an iframe, and was wondering if you can attach custom markers via the GET params to it? Here is the src attribute of the iframe currently. http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=111+Fake+Street+Noosaville+Queensland+Australia&ie=UTF8&output=embed I can't seem to find the documentation on how to do this, if possible. Is this possible?

    Read the article

  • A reasonable way to add attributes to an xml root element in C#.

    - by DrLazer
    The function "WriteStartElement" does not return anything. I find this a little bizzare. So up until now I have been doing it like this. XmlDocument xmlDoc = new XmlDocument(); XmlTextWriter xmlWriter = new XmlTextWriter(m_targetFilePath, System.Text.Encoding.UTF8); xmlWriter.Formatting = Formatting.Indented; xmlWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); xmlWriter.WriteStartElement("client"); xmlWriter.Close(); xmlDoc.Load(m_targetFilePath); XmlElement root = xmlDoc.DocumentElement; Saving the doc, then reloading it to get hold of the start element so i can write attributes to it. Does anybody know the correct way of doing this because I'm pretty sure what I'm doing isn't right. I tried to use xmlWriter.AppendChild() but it doesnt seem to write out anything. :(

    Read the article

  • How do i serlialize the product using php?

    - by Ibrahim Azhar Armar
    hi, i am building a real estate application where in it will store the properties and search it. the property will have different categories like (residential, commercial, industrial or agricultural). based upon the category i want to serailize each and every property listing . for example the property with id 1 belongs to resedential will have the serial code rs_SOMERANDOMUNIQUENUMBER. and for commercial it can be cm_SOMERANDOMUNIQUENUMBER and so on. for this my database table looks like this. CREATE TABLE IF NOT EXISTS `propSerials` ( `id` bigint(20) NOT NULL auto_increment, `serial` varchar(50) NOT NULL, `property_id` int(10) UNIQUE NOT NULL, PRIMARY KEY  (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; what would be the best possible format to store the serial with the prefix according to category? thank you

    Read the article

  • urlopen error [errno 111] connection refused

    - by Ui-Gyun Jeong
    I am doing python exercise with a book 'headfirst python' and making android app by using python and sl4a my code is import android import json import time from urllib import urlencode from urllib2 import urlopen hello_msg = "Welcome to Coach Kelly's Timing App" list_title = 'Here is your list of athletes:' quit_msg = "Quitting Coach Kelly's App." web_server = 'http://127.0.0.1:8080' get_names_cgi = '/cgi-bin/generate_name.py' def send_to_server(url, post_data=None): if post_data: page = urlopen(url, urlencode(post_data)) else: page = urlopen(url) return(page.read().decode("utf8")) app = android.Android() def status_update(msg, how_long=2): app.makeToast(msg) time.sleep(how_long) status_update(hello_msg) athlete_names = sorted(json.loads(send_to_server(web_server + get_names_cgi))) app.dialogCreateAlert(list_title) app.dialogSetSingleChoiceItems(athlete_names) app.dialogSetPositiveButtonText('Select') app.dialogSetNegativeButtonText('Quit') app.dialogShow() resp = app.dialogGetResponse().result status_update(quit_msg) this is my code and the result is what is the problem??? I can not figure out what the problem is...

    Read the article

  • Environment variable (NLS_LANG) value altered in Java process?

    - by Ralkie
    This was noticed in some legacy Java application (jre1.4 on HP-UX). Parent process (shell script S1) is starting Java process, which on its own is starting child process (shell script S2). Schematically it's: S1 Java S2. NB! Java application connects to Oracle DB using OCI driver. What is strange here is that process running S1 has environment variable NLS_LANG set to american_america.BLT8MSWIN1257, Java spawns S2 using: Runtime.getRuntime().exec(cmd); and S2 shows that NLS_LANG is set to american_america.UTF8 (!) This happens on some limited-access environment (production), I was not able to reproduce same problem on linux with jre 1.5. AFAIK, Java process should inherit environment from its parrent (S1) and should pass all environment variables to its child S2 (since single argument exec call was used). However, it does not seem to be the case. Any ideas why NLS_LANG appears to be altered?

    Read the article

  • How can I detect if a file is binary (non-text) in python?

    - by grieve
    How can I tell if a file is binary (non-text) in python? I am searching through a large set of files in python, and keep getting matches in binary files. This makes the output look incredibly messy. I know I could use grep -I, but I am doing more with the data than what grep allows for. In the past I would have just searched for characters greater than 0x7f, but utf8 and the like make that impossible on modern systems. Ideally the solution would be fast, but any solution will do.

    Read the article

  • Java Micro Edition (J2ME) - Update Record using recordstore enumeration

    - by Garbit
    Hi there, I have a record store of items which have (name, quantity, owner, status) Now when the user triggers an event i want to set the status of all items in my recordstore with "purchased" re = shoppingListStore.enumerateRecords(null, null, false); while (re.hasNextElement()) { // read current values of item byte [] itemRecord = re.nextRecord(); // deserialise byte array newItemObject.fromByteArray(itemRecord); // set item status to purchased newItemObject.setItemStatus("Purchased"); // create new bytearray and call newitemobject . tobytearray method to return a byte array of the object (using UTF8 encoded strings~) byte[] itemData = newItemObject.toByteArray(); // add new byte array to shoppinglist store shoppingListStore.setRecord(re.nextRecordId(), itemData, 0, itemData.length); } However I am overwriting the next record (using the nextRecordId), i've tried using nextRecordId - 1 but obviously this is out of bounds on the first one Hope you can help, Many thanks, andy

    Read the article

  • Diamonds with question marks

    - by hokkaido
    Hi, I'm getting these little diamonds with question marks in them in my HTML attributes when I present data from my database. I'm using EPiServer and a few custom properties. This is the information I've gathered, I save my data as a XML document, since I use custom EPiServer properties which need more than one defined value. This is saved as UTF8. It's only attributes in element tags which have this problem, such as align=left becomes align=?left?. There is no " character there, but I get the diamonds anyway. If I use " outside an element, it works and shows correctly. Any clues?

    Read the article

  • Search function fails because it refers to the wrong controller action?

    - by Christoffer
    My Sunspot search function (sunspot_rails gem) works just fine in my index view, but when I duplicate it to my show view my search breaks... views/supplierproducts/show.html.erb <%= form_tag supplierproducts_path, :method => :get, :id => "supplierproducts_search" do %> <p> <%= text_field_tag :search, params[:search], placeholder: "Search by SKU, product name & EAN number..." %> </p> <div id="supplierproducts"><%= render 'supplierproducts' %></div> <% end %> assets/javascripts/application.js $(function () { $('#supplierproducts th a').live('click', function () { $.getScript(this.href); return false; } ); $('#supplierproducts_search input').keyup(function () { $.get($("#supplierproducts_search").attr("action"), $("#supplierproducts_search").serialize(), null, 'script'); return false; }); }); views/supplierproducts/show.js.erb $('#supplierproducts').html('<%= escape_javascript(render("supplierproducts")) %>'); views/supplierproducts/_supplierproducts.hmtl.erb <%= hidden_field_tag :direction, params[:direction] %> <%= hidden_field_tag :sort, params[:sort] %> <table class="table table-bordered"> <thead> <tr> <th><%= sortable "sku", "SKU" %></th> <th><%= sortable "name", "Product name" %></th> <th><%= sortable "stock", "Stock" %></th> <th><%= sortable "price", "Price" %></th> <th><%= sortable "ean", "EAN number" %></th> </tr> </thead> <% for supplierproduct in @supplier.supplierproducts %> <tbody> <tr> <td><%= supplierproduct.sku %></td> <td><%= supplierproduct.name %></td> <td><%= supplierproduct.stock %></td> <td><%= supplierproduct.price %></td> <td><%= supplierproduct.ean %></td> </tr> </tbody> <% end %> </table> controllers/supplierproducts_controller.rb class SupplierproductsController < ApplicationController helper_method :sort_column, :sort_direction def show @supplier = Supplier.find(params[:id]) @search = @supplier.supplierproducts.search do fulltext params[:search] end @supplierproducts = @search.results end end private def sort_column Supplierproduct.column_names.include?(params[:sort]) ? params[:sort] : "name" end def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" end models/supplierproduct.rb class Supplierproduct < ActiveRecord::Base attr_accessible :ean, :name, :price, :sku, :stock, :supplier_id belongs_to :supplier validates :supplier_id, presence: true searchable do text :ean, :name, :sku end end Visiting show.html.erb works just fine. Log shows: Started GET "/supplierproducts/2" for 127.0.0.1 at 2012-06-24 13:44:52 +0200 Processing by SupplierproductsController#show as HTML Parameters: {"id"=>"2"} Supplier Load (0.1ms) SELECT "suppliers".* FROM "suppliers" WHERE "suppliers"."id" = ? LIMIT 1 [["id", "2"]] SOLR Request (252.9ms) [ path=#<RSolr::Client:0x007fa5880b8e68> parameters={data: fq=type%3ASupplierproduct&start=0&rows=30&q=%2A%3A%2A, method: post, params: {:wt=>:ruby}, query: wt=ruby, headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}, path: select, uri: http://localhost:8982/solr/select?wt=ruby, open_timeout: , read_timeout: } ] Supplierproduct Load (0.2ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."id" IN (1) Supplierproduct Load (0.1ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."supplier_id" = 2 Rendered supplierproducts/_supplierproducts.html.erb (2.2ms) Rendered supplierproducts/show.html.erb within layouts/application (3.3ms) Rendered layouts/_shim.html.erb (0.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = 'zMrtTbDun2MjMHRApSthCQ' LIMIT 1 Rendered layouts/_header.html.erb (2.1ms) Rendered layouts/_footer.html.erb (0.2ms) Completed 200 OK in 278ms (Views: 20.6ms | ActiveRecord: 0.6ms | Solr: 252.9ms) But it breaks when I type in a search. Log shows: Started GET "/supplierproducts?utf8=%E2%9C%93&search=a&direction=&sort=&_=1340538830635" for 127.0.0.1 at 2012-06-24 13:53:50 +0200 Processing by SupplierproductsController#index as JS Parameters: {"utf8"=>"?", "search"=>"a", "direction"=>"", "sort"=>"", "_"=>"1340538830635"} Rendered supplierproducts/_supplierproducts.html.erb (2.4ms) Rendered supplierproducts/index.js.erb (2.9ms) Completed 500 Internal Server Error in 6ms ActionView::Template::Error (undefined method `supplierproducts' for nil:NilClass): 10: <th><%= sortable "ean", "EAN number" %></th> 11: </tr> 12: </thead> 13: <% for supplierproduct in @supplier.supplierproducts %> 14: <tbody> 15: <tr> 16: <td><%= supplierproduct.sku %></td> app/views/supplierproducts/_supplierproducts.html.erb:13:in `_app_views_supplierproducts__supplierproducts_html_erb___2251600857885474606_70174444831200' app/views/supplierproducts/index.js.erb:1:in `_app_views_supplierproducts_index_js_erb___1613906916161905600_70174464073480' Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (33.3ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (39.7ms)

    Read the article

  • C++'s char * by swig got problem in Python 3.0

    - by gpliu3
    Our C++ lib works fine with Python2.4 using Swig, returning a C++ char* back to a python str. But this solution hit problem in Python3.0, error is: Exception=(, UnicodeDecodeError('utf8', b"\xb6\x9d\xa.....",0, 1, 'unexpected code byte') Our definition is like(working fine in Python 2.4): void cGetPubModulus( void* pSslRsa, char* cMod, int* nLen ); %include "cstring.i" %cstring_output_withsize( char* cMod, int* nLen ); Suspect swig is doing a Bytes-Str conversion automatically. In python2.4 it can be implicit but in Python3.0 it's no long allowed.. Anyone got a good idea? thanks

    Read the article

  • SQL select all items of an owner from an item-to-owner table

    - by kdobrev
    I have a table bike_to_owner. I would like to select current items owned by a specific user. Table structure is CREATE TABLE IF NOT EXISTS `bike_to_owner` ( `bike_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `last_change_date` date NOT NULL, PRIMARY KEY (`bike_id`,`user_id`,`last_change_date`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; In the profile page of the user I would like to display all his/her current possessions. I wrote this statement: SELECT `bike_id`,`user_id`,max(last_change_date) FROM `bike_to_owner` WHERE `user_id` = 3 group by `last_change_date` but i'm not quite sure it works correctly in all cases. Can you please verify this is correct and if not suggest me something better. Using php/mysql. Thanks in advance!

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >