Posts

Matlab: Collect/save data and shrink code -

Matlab: Collect/save data and shrink code - given next code: clc clear p = 45; mat =[ 64.7331 62.4019 60.2700 58.7798 58.4334 62.6596 59.4961 56.2320 53.6037 52.9330 60.9245 56.7753 51.7143 46.3398 44.5793 59.9245 55.0268 48.0563 36.3834 27.3842 59.9858 55.1389 48.3194 37.4449 30.2616 57.9874 54.0479 50.6911 50.0354 52.6935 55.4367 49.3499 41.7788 39.6147 46.7394 54.3272 46.7781 32.1549 20.1516 42.9207 55.3253 49.1113 41.1552 38.7894 46.4079 57.8245 53.7807 50.2828 49.5916 52.3766 63.0248 62.0303 61.8372 62.5024 63.8418 59.4631 57.8597 57.5336 58.6360 60.6997 55.2480 52.3275 51.6672 53.8008 57.2342 50.6163 44.3727 42.4670 47.8379 53.8624 47.3455 34.0518 22.7165 42.7145 51.8266 60.1421 55.2778 48.3022 35.9256 16.6506 60.8750 56.5697 51.0854 44.5373 41.5090 62.4192 59.0475 55.4089 52.2317 51.1936 64.3903 61...

java ee - how to create mysql database using servlet please give some basic ideas -

java ee - how to create mysql database using servlet please give some basic ideas - i working on lastly year project. want connect mysql database using jdbc , please 1 give me basic thought regarding how create mysql database using servlet create static variables likebelow in class // jdbc driver name , database url static final string jdbc_driver = "com.mysql.jdbc.driver"; static final string db_url = "jdbc:mysql://localhost/"; // database credentials static final string user = "username"; static final string pass = "password"; and phone call createdb method based on doget or dopost public static void createdb() { connection conn = null; statement stmt = null; try{ //step 2: register jdbc driver class.forname("com.mysql.jdbc.driver"); //step 3: open connection system.out.println("connecting database..."); conn = drivermanager....

amazon web services - Cannot Bootstrap chef (10.8) on new EC2 Instance - net-ssh conflict -

amazon web services - Cannot Bootstrap chef (10.8) on new EC2 Instance - net-ssh conflict - i have found can't install chef, gem version conflict net-ssh net-ssh-multi net-ssh-gateway in research, unfortunately none of workarounds work me in particular case. i'm trying bootstrap chef on ec2 instance. i cannot upgrade 11.x. this 1 not work: (added command run install chef includes --verbose , --version) gem install net-ssh -v 2.2.2 --no-ri --no-rdoc gem install net-ssh-gateway -v 1.1.0 --no-ri --no-rdoc --ignore-dependencies gem install net-ssh-multi -v 1.1.0 --no-ri --no-rdoc --ignore-dependencies gem install chef --no-ri --no-rdoc --verbose --version 0.10.8 is there way work around problem without upgrading chef? i've tried above with gem install chef --pre --no-ri --no-rdoc and fails too. these both workarounds outlined in linked post above. does this blog post joshua timberman help? amazon-web-services amazon-ec2 chef

python - Separate SQLAlchemy models by file in Flask -

python - Separate SQLAlchemy models by file in Flask - this question has reply here: flask-sqlalchemy import/context issue 2 answers many examples flask apps have seen have models stored straight in main app file (http://pythonhosted.org/flask-sqlalchemy/quickstart.html, http://maximebf.com/blog/2012/10/building-websites-in-python-with-flask/). other ones (http://flask.pocoo.org/docs/patterns/sqlalchemy/) have "models.py" file in models placed. how can have flask app import models separate files, e.x. "user.py"? when seek creating user.py file these contents: from app import db class user(db.model): [...] i next error: file "/users/stackoverflow/myapp/models/user.py", line 1, in <module> app import db importerror: no module named app when insert from models import user in module file. this reply extremel...

extjs - How to disable cache for a Storage in Sencha Touch? -

extjs - How to disable cache for a Storage in Sencha Touch? - how disable cache specific storage in sencha touch? do know way disable cache storages in app? which cache referring to? if it's browser cache (for example, when using ajax proxy) should on default (it uses separate query param in each request, _dc default). if mean model records beingness stored in memory, may want @ usecache config option of model . extjs sencha-touch sencha-touch-2

Why don't I have to commit after git merge -

Why don't I have to commit after git merge - i have repo master , file1.txt , file2.txt git checkout -b fix1 i alter file1.txt and git commit -a then a git checkout master then git checkout -b fix2 i alter file2.txt and git commit -a then git checkout master git merge fix1 git marge fix2 but if a commit -a i get # on branch master nil commit (working directory clean) git merge commits automatically. if don't want commit add together --no-commit argument: --commit, --no-commit perform merge , commit result. alternative can used override --no-commit. --no-commit perform merge pretend merge failed , not autocommit, give user chance inspect , farther tweak merge result before committing. git git-merge

sql - MySQL simple join using temporary table -

sql - MySQL simple join using temporary table - i've got (what thought) simple query on mysql database, using explain shows query using temporary table. i've tried changing order of select , bring together no avail. i've reduced tables simplest (to see if issue complexity of tables, still have problem). i've tried 2 basic tables, 1 "name" field, , other foreign key reference table: a: +-------+--------------+------+-----+---------+----------------+ | field | type | null | key | default | | +-------+--------------+------+-----+---------+----------------+ | id | int(11) | no | pri | null | auto_increment | | name | varchar(128) | no | mul | null | | +-------+--------------+------+-----+---------+----------------+ b: +-------+---------+------+-----+---------+----------------+ | field | type | null | key | default | | +-------+---------+------+-----+---------+----------------+ | id | int(...