Posts

Showing posts from March, 2015

css - Why the developers use negative margin when they float items? -

why use negative margin if float items? ul { {negative margin} } ul li { float:left; margin-right:10px; } i saw somewhere don't remember. can explain why use negative margin properties? see same strange thing in wordpress's twentyeleven theme. negative values in margin got same goal positive. it's presentation. as @better_use_mkstemp links you, negative values allowed w3c; can't consider "strange". cf: http://coding.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/

c++ - Creating custom keyboard shortcuts in eclipse -

i'm using eclipse c++ ide , want create key board shortcut 2 steps: 1. saves files 2. builds project is there way ? to save files shortcut ctrl+shift+s . can modify window->preference->general->editors->keys you can select build automaticaly in file menu project . now when save files project build automatically.

opengl - Shader link error after installing latest NVidia Quadro driver (311.35) -

i installed latest nvidia driver quadro 4000 cards.from moment of shaders linking fails shader link error. worth noting using opengl 4.2 separate shader objects.my os windows7 64bit . before update had 309.x version of driver , worked fine. rolled version 295.x , works again. knows it?can driver bug? if yes, can done it? here simple pass through vertex shader fails: #version 420 core layout(location = 0) in vec4 position; layout(location = 1) in vec2 uvs; layout(location = 2) in vec3 normal; smooth out vec2 uvsout; void main() { uvsout=uvs; gl_position = position; } another question ,is possible nvidia tightened shader version semantics rules? mean ,i using opengl compatibility profile in glsl mark #version 420 core.can problem? update: some more info program info log: error c7592: arb_separate_shader_objects requrires built-in block gl_pervertex redeclared before accesing members. yeah , driver writer has typos "accesing " ;) now , solved link

android - Unable to start activity ComponentInfo{..} : java.lang.NullPointerException -

i'm trying start new activity when button playlistbtn clicked, , i'm getting nullpointerexception, can't see did go wrong references. complete error log: 04-08 17:02:07.847: e/androidruntime(5869): fatal exception: main 04-08 17:02:07.847: e/androidruntime(5869): java.lang.runtimeexception: unable start activity componentinfo{app.and.androidmusic/app.and.androidmusic.playlistactivity}: java.lang.nullpointerexception 04-08 17:02:07.847: e/androidruntime(5869): @ android.app.activitythread.performlaunchactivity(activitythread.java:2180) 04-08 17:02:07.847: e/androidruntime(5869): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 04-08 17:02:07.847: e/androidruntime(5869): @ android.app.activitythread.access$600(activitythread.java:141) 04-08 17:02:07.847: e/androidruntime(5869): @ android.app.activitythread$h.handlemessage(activitythread.java:1234) 04-08 17:02:07.847: e/androidruntime(5869): @ android.os.handler.dispatchme

dynamic - HTML Text Box output webpage value -

effectivily have web page text box want load value outputed when going link. i have link called www.mydomin.com/number.html this page displays number (lets displays 1234). i have page called show.html. this page has basic html text box. i want basic html text box display output number @ www.mydomin.com/number.html so text box should in theory display 1234 i have tried value="www.mydomin.com/number.html" shows actual link. any ideas? appreciated. you can use jquery ajax requests if needed (although agree @madara's first comment): $.get("number.html",function(data){ $("#myinput").attr("value", data); }

clojure - Hiccup not working : FileNotFoundException: Could not locate ../as__init.class or ../as.clj on classpath -

i'm beginning clojure , i'm trying build small web app. wanted try out hiccup doesn't seem working. code below. project.clj (defproject webtest "0.1.0-snapshot" :description "fixme: write description" :url "http://example.com/fixme" :dependencies [[org.clojure/clojure "1.4.0"] [compojure "1.1.5"] [hiccup "1.0.3"] [org.clojure/java.jdbc "0.2.3"] [net.sourceforge.jtds/jtds "1.2.4"] ] :plugins [[lein-ring "0.8.2"] [lein-idea "1.0.1"]] :ring {:handler webtest.handler/app} :profiles {:dev {:dependencies [[ring-mock "0.1.3"]]}}) handler.clj (ns webtest.handler (:use compojure.core) (:require [compojure.handler :as handler] [compojure.route :as route] [webtest.content :as pages] [hiccup.core :as templ]))

jquery - PHP, Ajax, JSON, and Handlebars -

if redundant question please let me know , point me there, not finding exact question/answer combination nor mixture of two. i have ajax in jquery calls function php page. without handlebars json data comes nice , pretty. no issues there. can't seem ajax write out results handlebars template. here code have now: $.ajax({ type: "post", url: "../includes/db_functions.inc.php", data: ({ p : p, p2 : p2, f : f }), datatype: "json", success: function(results){ $.each(results, function(i, item){ var context = [ { id : item[i].id, clock_number : item[i].clock_number, } ], template = handlebars.compile( $('#template').html() ); $('table.entries').append( template(context) ); }); } }); anyone know might missing here? 99% sure in context area, not finding it. [edit] <table class="entries"> <script id="template" type="text/x-

android - SQLite MissingFormatArgumentException -

i'm following sqlite tutorial on android, , stumped. appreciated! :) my code create database representing kitchen inventory, adding/deleting items accordingly. class used: kitchenitem - representation of kitchen inventory item kitchendbhelper - extends sqliteopenhelper, create db kitchendatasource - actual adding/deleting items on db kitcheninventoryactivity - setting layout , intializing kitchendatasource but when try run kitcheninventoryactivity, exception: exception ljava/util/missingformatargumentexception; thrown while initializing lkitchendbhelper; thais part in oncreate() new kitchendatasource. want capture more logs, unfortunately can't add logs constructor. :( believe of code irrelevant, still post codes below. or suggestions appreciated! code of kitchendbhelper below: import android.content.context; import android.database.sqlite.sqlitedatabase; import android.database.sqlite.sqliteopenhelper; //creates db public class kitchendbhelper extends

mysql if exists giving error wrong syntax? -

i trying use if exists in mysql keep getting syntax errors , have researched correct syntax isnt working... what need is: if query exists update else insert new... $querystring = "if exists (select * $oncall_table uid='$contextuser' , submitid='$submitid' , submitstatus=3) update $oncall_table set uid='$contextuser', start_time='$onstr', end_time='$offstr', amount='$amount' else insert $oncall_table (uid, start_time, end_time, amount) values ('$contextuser','$onstr', '$offstr', '$amount') end if"; error message: can't perform query: have error in sql syntax; check manual corresponds mysql server version right syntax use near 'if exists (select * timesheet_oncall uid='admin' , submitid='136545' @ line 1 replace into need. http://dev.mysql.com/doc/refman/5.0/en/replace.html replace works insert, except if old row in table has same value new row prima

Composite, component and entities in C++ game engine -

i'm working on school project developing game. use engine made 1 of teams have. build-up of engine unclear me , seems anti-pattern. however, seems no 1 can make design choices clear me. engine supposed use "component-based" design don't see it. below code of both component, composite , entity class. question in short this: is code using valid design pattern or overcomplicated sake of 'implementing design pattern', thereby causing antipattern ? component.cpp: #include "engine\component.h" #include "engine\composite.h" component::component(composite* parent) { this->parent = parent; } component::~component() { } entity.cpp #include "engine\entity.h" #include "engine\game.h" entity::entity(composite* parent):composite(parent) { this->mass = 1; node = null; } void entity::update() { composite::update(); this->angularvelocity += this->angularaccelaration; this->orienta

BASH function: syntax error near unexpected token `'2'' -

i lost why error keeps happening, using correct syntax, however, every time execute bash script, following error: /home/clucky/mcserverbackup/mcserverbackup.sh: line 200: syntax error near unexpected token `'2'' /home/clucky/mcserverbackup/mcserverbackup.sh: line 200: ` loginfo() '2' "none" "minecraft: $minecraftsize.$minecraftsized $minecraftunit"' the line in particular appears refrencing line 200, code attempts execute function loginfo() follows: loginfo() '2' "none" "minecraft: $minecraftsize.$minecraftsized $minecraftunit" in above line of code, 2 indent level (2 x 5 spaces). none tells function ignore loglevel specified in configuration , log anyway. minecraft: $minecraftsize...$minecraftunit being added log file, words preceeded $ of course variables. entire code can viewed below. #! /usr/bin/env bash #declare functions loginfo() { if [ "$loginfile" == "true" ] || [

Node.js Error "Cannot switch to old mode now." with MySQL NPM -

node.js throws below error when issuing query via mysql npm . _stream_readable.js:664 throw new error('cannot switch old mode now.'); error: cannot switch old mode now. @ emitdataevents (_stream_readable.js:664:11) @ socket.readable.resume (_stream_readable.js:649:3) sample code throws error: query = mysqlcli.query( 'select * foo bar = 1' ); results = []; mysqlcli.resume(); query .on( 'error', function ( err ) { console.log( 'bad things: ', err ); }) .on( 'result', function ( row ) { results.push( row ); }) .on( 'end', function (){ mysqlcli.pause(); datahandler( results ); }); this took quite bit of troubleshooting, ultimate fix remove both mysqlcli.pause(); , mysqlcli.resume(); . odd thing problem code executed fine on windows server 2003 once cloned via git broke under centos 5.9 (rhel).

javascript - HighCharts - Y-Axis padding in a bar chart -

Image
i use style of y-axis labels in each number placed, left-aligned, on top of respective horizontal grid line, in image below. the complication in highcharts axis labels overlap first column in column chart. updated demo: example, see chart: http://jsfiddle.net/nwsgz/1/ i have tried achieve using xaxis.minpadding , property seems have no effect on column charts. there way in highcharts effect going for? theoretically effect making bars narrow, looking solution. it doesn't work categorized axis - in type,axis divided equal categories, min/max padding isn't allowed. possible solution use standard axis, use formatter axis, see: http://jsfiddle.net/nwsgz/4/

.htaccess - Virtual Folders -

i'm trying utilise mod_rewrite allowing me use domain.com/d4k1d give same effect domain.com/link.php?link=d4k1d at moment have in .htaccess although seems give me 404 errors. rewriteengine on rewriterule /(abcdefghijklmnopqrstuvwxyz[0-9]+)/ link.php?link=$1 i'm not familiar mod_rewrite etc. don't know go :s. you need include of letters inside of character class (which can simplified). current rule allows letter followed 1 or more numbers: rewriteengine on rewriterule /([a-z0-9]+)/ link.php?link=$1

python - Pandas force matrix multiplication -

i force matrix multiplication "orientation" using python pandas, both between dataframes against dataframes, dataframes against series , series against series. as example, tried following code: t = pandas.series([1, 2]) print(t.t.dot(t)) which outputs: 5 but expect this: [1 2 2 4] pandas great, inability matrix multiplications way want frustrating, appreciated. ps: know pandas tries implicitly use index find right way compute matrix product, seems behavior can't switched off! here: in [1]: import pandas in [2]: t = pandas.series([1, 2]) in [3]: np.outer(t, t) out[3]: array([[1, 2], [2, 4]])

javascript - MustacheJS: JS not working on mustache's products? -

i inject mustachejs template (button element) html. use js toggle css of buttons if clicked. js works on buttons not on created mustachejs: function clicktogglecss() { $(this).toggleclass('status0').toggleclass('status1'); } $('button').on("click", clicktogglecss); see this fiddle upper button true html, , bottom button injected using mustachejs. how make work ? (fiddle appreciate!) solution ( fiddle ): $('body').on('click', 'button', clicktogglecss); try: $('body').on('click', 'button', clicktogglecss); when add handler directly elements (as in code), applies elements found @ time that code ran. elements added after point not affected. using delegated handler (in case, on <body> element), "click" event on future button handled.

PayPal Advanced Payments Simple Donation Form -

i'm trying put paypal php form work advanced payments user can enter amount want donate. needs use paypal advanced payments processed on website. i've searched on refers using shopping cart , purchasing items. i don't need that. need user able enter amount want donate. appreciated. the guides you're seeing include shopping cart still follow same procedure need do. it's instead of calculating total amount shopping cart you'll use the amount entered user in form. again, though, follow same procedure guides you've found use, except you'll pass amount in instead of shopping cart amount.

Boost regex. Named group in two part -

i have problem boost::regex::regex_match . work turned on boost_regex_match_extra . what have: (this simple example of problem, not real task) string input1= "3 4 5"; string input2= "3 4 7"; what want get: list output1= [3 4 5]; list output2= []; //not matched regex: (this working ok) ((?<group>[0-6])[ ]?)* output1: what["group"]=5 , what["group"].captures()= [3, 4, 5] output2: not matched the problem is: i need collect data more one part of regex 1 group. i tried: ((?<group>[0-6])[ ])*(?<group>[0-6]) output1: what["group"]=4 , what["group"].captures()=[3, 4] output2: not matched ok, understand. doesn't see second declaration of group. i tried: ((?<group>[0-6])[ ])*(?&group) output1: what["group"]=4 , what["group"].captures()= [3, 4, 4] output2: not matched but this? second 4 from? checks "group" pattern, b

jquery - Strike out a word in javascript when item clicked -

strike out word in javascript/jquery when item clicked. so clicking , item ,the item fades out in same time want text strike out. ex. have apple(image) , apple(text). when click on apple want image fade out , text strike out. <div id="items"> <p>apple</p> </div> <div id="content"> <div class="box" id="pic1"> <img src = /images/apple.png /></div> <script> $("#pic1").click(function () { $("#pic1").fadeout("slow"); }); </script> this code until image fades out cannot figure out how can make text strike out??? jsfiddle demo you wrap text in <del> $("#pic1").click(function () { $("#items p").wrap("<del>"); $("#pic1").fadeout("slow"); });

c++ - class with a pointer member -

class block { block *on; char *name; bool white; bool clear; bool ontable; public: block(char *nm); block(const block &ob); void setname(char *nm); char *getname() const ; bool isclear(); void setcolor(int colour); bool iswhite()const; bool isontable(); block *geton(); void puton(block &block); void putontable(); void takefromtable(); void makeclear(); void flipcolor(); void print(); }; i have class this. why declaration of *on pointer block *on? don't have write int, float or first? purpose? block *geton() function out of class declaration this; block *block::geton() { return on; } i need return on pointer in code. there other way that? block * on declares on pointer object of type block . when write class definition (in case defining class block ), you're inventing a whole new datatype (in case block ), describing kind of data contains operations possible. yo

.htaccess code, is this example good coding practice? -

now feet officially wet .htaccess have new question. in 1 of many tutorials have bookmarked, author recommends placing bit of code @ beginning of .htaccess file: adddefaultcharset utf-8 rewriteengine on rewritebase / i can understand issues of avoiding parsing issues first line, want know is, aside rewriteengine on other 2 lines practice or adding bloat? many thanks! the rewritebase / line used resolve relative uris in target and/or patterns of rewriterule 's. example, if htaccess file in /foo directory, , have rules might this: rewriteengine on rewritebase /foo/ rewriterule ^bar$ index.php?bar [l] here, rule's target index.php?bar relative uri , base gets prepended it, resulting in uri: /foo/index.php?bar . when rule's target relative, apache make guess whether uri file-path or url-path, , doesn't guess correctly. rewritebase /foo/ , apache knows /foo/index.php url-path. there instances rewrite base doesn't match folder it's in, res

google maps javascript api long press behaviour is broken down by zoom pinch -

i know there no "long press" event in google maps. somehow simulated behaviour using combination of other events. after pressing time, context menu appears options. however, in devices support of pinch zoom such tablets, after zoom in or out using 2 fingers, when stop touching device, menu unexpectedly appears. 2 concurrent touch events disturbs other one. suggestions appreciated. here relevant code : var contextmenuoptions={}; contextmenuoptions.classnames={menu:'context_menu', menuseparator:'context_menu_separator'}; var menuitems=[]; menuitems.push({classname:'context_menu_item', eventname:'start_click', label:'from here'}); menuitems.push({classname:'context_menu_item', eventname:'end_click', label:'to here'}); menuitems.push({classname:'context_menu_item', eventname:'from_current_loc', label:'from location'});

oracle11g - SQL aggregate function to return single value if there is only one, otherwise null -

i'm looking best way achieve aggregate function this:- if group contains single repeated value, return value if group contains nulls, return null if group contains more 1 value, return null here's sample data: create table example ( id number(3), val varchar2(3)); insert example values (1,'a'); insert example values (2,'a'); insert example values (2,'b'); insert example values (3,null); insert example values (3,'a'); insert example values (4,'a'); insert example values (4,'a'); sqlfiddle link the sql should like:- select id, ????( val ) only_val example group id order id the result after should this:- id only_val 1 2 3 4 in real thing, want on multiple val columns (grouped same id ). there several hundred records per id . i thought interesting problem solution have mess of nvl, min , max , seems there should neater way. will work for original d

javascript - Display some html until final page is loaded -

i using rails make search request. the search form's action path "/results/foo" .. hits controller validation of input , redirects "results/foobar" if search-text clean. <h1 class="center"><progress style="font-size: 160%;">loading...</progress></h1> i'd show above html.. , above html (either in view or via jquery) until "results/foobar" has loaded. is there way show such progress bar animation (html) until final page has completed loading? more details (the search bar page has code this): <form class="form-search" action="/s_results/iscan" method="post"> <div class="input-append"> <input name="searchtext" type="text" class="span4 search-query" placeholder="type number here..."> <button type="submit" class="btn"> <i c

javascript - npm nested dependencies, why not imitate gem? -

i installing today sails.js , , see how install same package on , on again (dependencies of app dependency), why npm not use gem system? keep globally libraries , different versions, cool share same lib if have multiple projects on server , not installing on , on again same libs (i know workaround npm link seems not considered best practice). dependency management difficult. npm strong opinionated not sharing packages , insisting every package have own node_modules folder. avoids lot of potential pitfalls can avoided. packages pretty small , better use tiny bit more disk space try chase down issues related dependency versioning. also interesting, take note of when include node_modules in git. http://www.futurealoof.com/posts/nodemodules-in-git.html

eclipse - Strange java.lang.OutOfMemoryError: Java heap space error -

i keep getting java.lang.outofmemoryerror: java heap space error in eclipse using jdk 1.6 u43 , eclipse 4.2.2 under windows 7 64bit. don't know error means or how solve it... without going heap large pool of memory stores live variables etc during run time of program , error message suggests running out of it! you can first try running eclipse higher maximum heap size eclipse -vmargs -xmx1024m if fixes problem can change values in eclipse.ini file of other suggestions have mentioned. if doesn't fix it, have kind of memory leak in program , trying store many large objects in memory, in case need see code able out.

Why does this halt my perl application package 'not registered for warnings' -

i working in house web gateway frame work in perl. , trying use image::magick::thumbnail create thumbnail image. but if have line my ($thumb, $x, $y) = image::magick::thumbnail::create($image, 50); i following error. package 'image::magick::thumbnail' not registered warnings i have tracked down line 313 of warnings.pm croaker("package '$category' not registered warnings") but i'm not sure why halts program ideas? use warnings::register; creates warnings category same name current package. image::magick::thumbnail checks if warnings of category image::magick::thumbnail enabled, doesn't create such category using use warnings::register; . the line there in code, it's commented out?! edit module uncomment line solve problem. including following in script should trick: { package image::magick::thumbnail; use warnings::register; }

javascript - Can't get the id name using onClick? -

http://wthdesign.net/test/test.html what i'm trying append id name url, i'm getting "#undefined" instead? the script i'm using: function generateurl() { var currentid = $(this).attr('id'); document.location.hash = currentid; console.log($(this)); } inside html: <a id="abc" onclick="generateurl()" >this anchor btn</a> if debug, you'll find this in context window object. can pass this function so: function generateurl(el) { var currentid = $(el).attr('id'); document.location.hash = currentid; } <a id="abc" onclick="generateurl(this)" >this anchor btn</a> alternatively, can use jquery replace inline onclick so: $("#abc").click(function() { var currentid = $(this).attr('id'); document.location.hash = currentid; }

Oracle SQL Out put two table at a query -

create table products ( id int, name varchar(70), price number(8,2), primary key (id, name) ); drop table instock; /* delete tables if exist */ create table instock ( id int, quantity int ); i have 2 table in database. want have 2 table showing output table id name price quantity select a.id,a.name,a.price,b.quantity products a,instock b a.id=b.id

Android Bluetooth .connect() exception Nexus 7 OBDII adapter -

i'm using standard api procedures connecting device. obdii bluetooth adapters. i have 2 obdii bluetooth adapters, of different models. running exact same code, first pair , connect without issue every phone/tablet i've tested. second pair , connect fine except nexus 7 running android 4.2 it throws ioexception: read failed, socket might closed or timeout, read ret: -1 thought wrong device or newer release... piece of software "torque" able connect either adapter nexus 7. so i'm doing wrong/different issue in later os??? any figuring out appreciated. public void run() { log.i(tag, "begin mconnectthread"); setname("connectthread"); // cancel discovery because slow down connection madapter.canceldiscovery(); // make connection bluetoothsocket try { // blocking call , return on // successful connection or exception mmsocket.connect(); <=*

android - Logcat continously shows messages -

i don't know what's wrong. logcat has been troubling me 2 days. when device connected test, logcat continuously gives messages though don't run app. if run app, unable find app logs in such huge amount of data. can suggest me avoid , can view application's logs? below logcat's flow continously flows. testing htc. 04-09 09:27:10.007: d/dalvikvm(843): gc_explicit freed 128k, 43% free 3530k/6151k, external 0k/0k, paused 142ms 04-09 09:27:10.027: i/logfilter(843): couldn't find mandatory "host" http header. 04-09 09:27:10.027: i/logservice(843): 2013-04-09 09:27:10 127.0.0.1 - 127.0.0.1 8182 post /library/do/summary - 200 64 53 1304 http://null - - 04-09 09:27:10.037: d/nicolas(843): httpserverhelper commit 04-09 09:27:10.037: d/nicolas(843): sendresponse 1 04-09 09:27:10.057: d/nicolas(843): writeresponsebody 04-09 09:27:10.238: d/dalvikvm(843): gc_explicit freed 50k, 43% free 3522k/6151k, external 0k/0k, paused 158ms 04-09

java - Fibonacci calculation -

this program supposed fibonacci number user , program calculate while making sure user entered positive number , number no less fibonacci number 70. so, if user entered 7, should print 13. method fibcalc() supposed calculations. when try , compile program, errors "method fibcalc in class fibonacci cannot applied given types: system.out.printf("fibonacci #%d %f", num, fibcalc(num, x3)); , "cannot find symbol" return x3; here's code: import java.util.scanner; public class fibonacci { public static void main ( string args[] ) { scanner input = new scanner ( system.in ); int num; double x3 = 0; system.out.print("which fibonacci number like? "); num = input.nextint(); { system.out.print("which fibonacci number like? "); num = input.nextint(); }while(num >= 0 && num <= 70); system.out.printf("fibonacci #%d %f", num,

datatable - JSF table pagination -

i newbie jsf. have problem keeping state of data-table list pagination. the problem when user edits row of list not in first page of data-table, after completing action, page navigation returns first initial page of list while need return previous page user has been editing. a complete scenario: in list page there 100 rows of records, , each page shows 20 rows, user navigates 3th page, , selects 1 of rows in order edit record. backing listbean calls editbean navigate page edit page. user update record information , backing editbean calls listbean. listbean refresh datamodel , navigate list page, state of pagination user had edited lost. what best approach return page previous page user has been editing? myface 1.2.7 , tomahawk taglib 1.0 has been used in project. pages consist of t:datatable. thanks.

ios - How do I add a device to my provisioning profile? -

Image
it looks apple's provisioning page has changed on me. not see button "add device" under distribution profile anymore. blind? i have played around new interface , found slow in nature extremely organized. check below images requirement. hope helps.

components - How to create dynamic JSF form fields -

i have found similar questions this one, there many ways can done made me more confused. we getting xml file reading. xml contains information on form fields needs presented. so created custom dynamicfield.java has information need: public class dynamicfield { private string label; // label of field private string fieldkey; // key identify field private string fieldvalue; // value of field private string type; // can input,radio,selectbox etc // getters + setters. } so have list<dynamicfield> . i want iterate through list , populate form fields looks this: <h:datatable value="#{dynamicfields}" var="field"> <my:somecustomcomponent value="#{field}" /> </h:datatable> the <my:somecustomcomponent> return appropriate jsf form components (i.e. label, inputtext) another approach display <my:somecustomcomponent> , return htmldatatable form elements. (i think maybe easier do). which appr

encryption - Encrypted Oracle-Ds.xml and decryption in jdbc code -

server :jboss 5.x following function written in session bean(ejb3 architecture) @remote(oracledsinteractionremote.class) @local(oracledsinteractionlocal.class) @stateless @remotebinding(jndibinding="oracledsinteractionbean/remote") @localbinding(jndibinding="oracledsinteractionbean/local") public class oracledsinteractionbean implements oracledsinteractionremote,oracledsinteractionlocal { @ejb @resource(mappedname="java:/encryptedds") private datasource ds1; public int getallvalues() throws exception { system.out.println("************************* "); connection conn = ds1.getconnection(); statement st = conn.createstatement(); string query = "select count(*) details_data"; resultset rs = st.executequery(query); while (rs.next()) { return rs.getint(1); } return -1; } } this function retrieving number of rows details_data table using jdbc connection. datasource object ds1 mapp

html - Images not appearing on local host -

images not appearing on local host. here html code. i've tried several variations display te images. twitter bootstrap used. appreciated. <div class="media"> <a class="pull-left" href=""> <img class="media-object" src="/img/grads.jpg/64x64"> </a> <div class="media-body"> <h4 class="media-heading">collaborate students @ other universities</h4> <p>join classes , work other students on studying without having meet up.</p> </div> </div> <div class="media"> <a class="pull-left" href=""> <img class="media-object" src="grads.jpeg/64x64"> </a> <div class="media-body"> <h4 class="media-heading">meet new friends you're in class with</h4> <p>pick want stranger in own classes. school social , moreo. :