Posts

performance - A really slow UPDATE to a MySQL server -

i running cms, has nothing it. i have simple query is: update e107_online set `online_location` = 'http://page.com/something.php?', `online_pagecount` = 133 `online_ip` = '175.44.*.*' , `online_user_id` = '0' limit 1; but same query reported website support gives that: user@host: cosyclim_website[cosyclim_website] @ localhost [] thread_id: 7493739 schema: cosyclim_website query_time: 12.883518 lock_time: 0.000028 rows_sent: 0 rows_examined: 0 rows_affected: 1 rows_read: 1 it takes 12 (almost 13) seconds simple update query? there way optimize somehow? if run through phpmyadmin takes 0.0003s. the table: create table if not exists `e107_online` ( `online_timestamp` int(10) unsigned not null default '0', `online_flag` tinyint(3) unsigned not null default '0', `online_user_id` varchar(100) not null default '', `online_ip` varchar(15) not null default '', `online_location` varchar(255) not null default ...

php - error #1146 in phpMyAdmin in XAMPP -

i did dumb. i'd imported create tables sql file twice. that's not worst part however. proceeded trying drop duplicate tables phpmyadmin database. loads when click on phpmyadmin now: error sql query: edit select `tables` `phpmyadmin`.`pma_recent` `username` = '[myusername]' mysql said: #1146 - table 'phpmyadmin.pma_recent' doesn't exist as in, above on otherwise blank, white page. edit returns normal when comment out "advanced features" section in config.inc.php file (the red exclamation signs still beside everything, i'm starting wonder if that's default icon choice phpmyadmin 4.0.1). once uncomment them, above returns. i've noticed tables seems empty (maybe reason exclamation signs?). mean anything? check whether tables inside phpmyadmin database have 2 underscores __ after pma prefix. if case, update entries in config.inc.php additional underscore.

sqlite - database is not created in android -

in application activity running fine database not getting created there no error in logcat. main activity class: package com.example.testdb; import android.os.bundle; import android.app.activity; import android.view.menu; public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); database d=new database(this); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); return true; } } database class: package com.example.testdb; import android.content.contentvalues; import android.content.context; import android.database.cursor; import android.database.sqlite.sqlitedatabase; import android.database.sqlite.sqlitedatabase.cursorfactory; import android.database.sqlite.sqliteopenhelper;...

c++ - implement reverse_iterator for my string class (also rbegin() and rend() methods) -

below code string class. want implement reverse_iterator , rbegin() , rend() methods. have pasted code assign method. string::reverse_iterator rbegin = str2.rbegin(); string::reverse_iterator rend = str2.rend(); for(string::reverse_iterator b = rbegin; b!= rend; ++b) { cout<<*b; } class string {//my custom string class public: class iterator:public std::iterator<std::random_access_iterator_tag, char> { public: iterator():ch(null){} iterator(const iterator& it) : ch(it.ch) {} char& operator*() { return *ch; } iterator& operator++() { ch = ch+1; return *this; } bool operator==(const iterator& rhs) { return ch == rhs.ch; } bool operator!=(const iterator& rhs) { return ch != rhs.ch; } private: friend class string; iterator(char* c):ch(c) {} char* ch; }; explicit st...

c - Why aren't standard escape sequences like \a ,\v working?Why ' works without \,and is \? standard? -

why aren't \a (beep), \v (vertical tab) not working in program though standard according links below?and why single quotation mark working without using \' ? , finally,is \? escape character @ microsoft site says,because use ? symbol inside printf() format string without \ , works fine. to put clearly: why \a , \v not working? why single quote works without \ though \' escape sequence? is \? escape sequence?(the link says ? works without \ ) http://msdn.microsoft.com/en-us/library/h21280bw(v=vs.80).aspx http://en.wikipedia.org/wiki/escape_sequences_in_c why \a , \v not working? because console you’re using doesn’t support them. compiler does, , produces correct character code in output, terminal emulator ignores them. why single quote works without \ though \' escape sequence? because it’s unnecessary escape in strings, need escape in char literal. same \" string literal: "'" vs. ...

java - Freeze a gui jdbc ,when save a data,why? -

hy create 1 project (i maked using turtorial: http://www.homeandlearn.co.uk/java/save_a_new_record.html using database: http://www.homeandlearn.co.uk/java/java_and_databases.html ) when want save new record program freezing.(i want when save new data program able wrok next , prev buttons) the save_button changed these code: private void btnsaverecordactionperformed(java.awt.event.actionevent evt) { //................................................................................... string first = textfirstname.gettext(); string last = textlastname.gettext(); string job = textjobtitle.gettext(); string id = textid.gettext(); int newid = integer.parseint(id); try { string insertsql = "insert workers (id,first_name,last_name,job_title) values(" + newid + ",'" + first + "','" + last + "','" + job + "')"; stmt.executeupdate(insertsql); rs.next(); ...

css - How to place DT elements side by side? -

this: http://jsfiddle.net/zcdkt/1/ renders: dt-namea dd-definitiona 1 dt-nameb dd-definitionb 1 dd-definitionb 2 i wish have this: dt-namea dt-nameb dd-definitiona 1 dd-definitionb 1 dd-definitionb 2 i've tried display inline, float, clear... can't figure out. ? update: inside anchors, may have different size images this, hence, don't side side: http://jsfiddle.net/j6ute/3/ separate dls way achieve because need wrapper element: http://jsfiddle.net/david_knowles/j6ute/ <div id="links-logolinks"> <dl> <dt>support</dt> <dd><a href="">support 1</a></dd> </dl> <dl> <dt>partners</dt> <dd><a href="">partner 1</a></dd> <dd><a href="">partner 2</a></dd> </dl> </div>