Posts

Showing posts from August, 2014

css - Getting lists to sit beside each other -

Image
i'm trying 4 lists sit beside each other right of #intro . i've tried making them display:inline-block; http://jsfiddle.net/7aq8cx4o/ #profile { width:75%; float:right; position:relative;} agreed paul roub , disnifor comments. i've noticed width exceeds 100% , easy fixed #intro { width:25%; ... } check code here: http://codepen.io/anon/pen/dogprw?editors=110 cheers, (and credit again paul , disnifor answered before me in comments)

android - Convert AsyncTask With Multiple Parameters to RxJava -

i have multiple calls asynctask convert rxjava. asynctask code works, explore how in rxjava? (by way, know title sucks) what does: loop through myimagebutton (which pojo, not extending imagebutton) list on each myimagebutton, current bitmap (through getdrawable()) get icon url. on combine 2 images bitmaputils.combine(...); assign newly combined bitmap imagebutton how convert rxjava: (myimagebutton myimagebutton: myimagebuttons) { final imagebutton imagebutton = (imagebutton) findviewbyid(myimagebutton.getimagebuttonresid()); //getimagebuttonresid holds reference imagebutton final bitmap bitmap = ((bitmapdrawable) imagebutton.getdrawable()).getbitmap(); new bindimagetask(imagebutton, bitmap, myimagebutton.geticonurl()).execute(); } here's bindimagetask: private class bindimagetask extends asynctask<void, void, bitmap> { private weakreference<bitmap> srcbitmapweakreference; private weakreference<imagebutton>

Python 3.4 cx_freeze [WinError 5] using Selenium - Only on other machines -

i've started devling cx_freeze , creating .exe files other people use. the script simple: uses selenium scrape javascript-sensitive content on website, , gives user notification when finds matching href + copies link clipboard: the main code in main.py: from bs4 import beautifulsoup selenium import webdriver import time import pyperclip def check(): browser.get(browser.current_url) page_html = browser.page_source.encode('utf8') soup = beautifulsoup(page_html, "lxml") complete_list = soup.find_all('a', href=true) in complete_list: if link_to_find in a['href']: pyperclip.copy(a['href']) while true: beep() browser = webdriver.chrome(executable_path=path_to_chromedriver) browser.get(url_to_check) while true: check() time.sleep(5) the cx_freeze code in setup.py: import sys cx_freeze import setup, executable build_exe_options = {"packages": [

django - Accessing AWS Website to change one .html file -

Image
for time ago (years) deployed website made django in aws, i'm trying make changes in 1 .html file don't remember how connect instance anymore, tried @ documentation aws there many changes , added lot of new components, don't know start , don't remember correctly how worked. unfortunately private keys, password , kind of stuff in old computer don't have anymore. thing have username, password aws console , mac. i appreciate if can point me out start! thank you! you have few options. personally, find ec2 instance site hosted on , create image of it. can done selecting instance in ec2 console. create amazon machine imagine (ami). can launch new ec2 instance ami , specify new pem key. once instance launched, can connect instance , edit .html file.

NumPy: Importing a Sparse Matrix from R into Python -

i have matrix in r large , sparse, created 'matrix' package, , want handle in python + numpy. r object in csc format, , if export using function writemm in matrix package, output looks this: %%matrixmarket matrix coordinate real general 4589 17366 160441 22 1 5.954510725783322 36 1 29.77255362891661 41 1 23.81804290313329 74 1 5.954510725783322 116 1 59.54510725783322 127 1 11.909021451566645 159 1 17.863532177349967 where first column row, second 1 column, , third 1 value. i wondering how import python. see scipy has module operate column-compressed sparse matrices, has no function create 1 file. you can use scipy.io.mmread want. in [11]: mmread("sparse_from_file") out[11]: <4589x17366 sparse matrix of type '<class 'numpy.float64'>' 7 stored elements in coordinate format> note result coo sparse matrix. if want csc_matrix can use sparse.coo_matrix.tocsc . now mention want handle very large , sparse matrix nu

Php regex espression for alphanumeric with dot and slash -

this question has answer here: how convert eregi preg_match? 4 answers i'm trying validate string , want contains alphanumeric chars like: a-za-z , 0-9 want string can contain dot , slash ('.', '/') . i tryed in way, don't right result. if (!preg_replace('/[^a-za-z0-9./]/', '', (string)$value)){ return false; } thanks help just escape required values inside case. if (!preg_replace('/[^a-za-z0-9\.\/]/', '', (string)$value)){ return false; }

php - Pulling Google Analytics Multi Channel Funnel data via API -

i trying pull multi-channel funnel reports google analytics api , getting following error: invalid value 'mcf:source'. values must match following regular expression: '(ga:.+)?' here code using, works fine when dimensions & metrics ga:... family, reason won't let me pull mcf: reports. $analytics = new google_service_analytics($client); $analytics_id = 'ga:xxxxxxxx'; $lastweek = date('y-m-d', strtotime('-26 day', time())); $today = date('y-m-d', strtotime('-26 day', time())); try { $optparams = array(); $optparams['dimensions'] = "mcf:source"; #$optparams['sort'] = ""; $optparams['max-results'] = "10000"; $metrics = 'mcf:totalconversions'; $results = $analytics->data_ga->get($analytics_id, $lastweek, $today,$metrics,$optparams); $rows = $results->getrow

oracle11g - Error in installing Oracle database on Windows -

i have windows 7 professional , trying install oracle database 11g release 2 getting error every timer : the length of environment variable "path" not exceed recommended length . how can solve problem? need help.

How to have IntelliJ build a jar to a directory and then run a separate jar as a run config? -

i developing plugins spigot , want able build , run them same place, server's output going terminal. how make intellij place jar in plugins folder , run server jar outside of it? make artifact build jar directory , make run config executes other jar, , down @ bottom there list can have intellij build jar.

avr - LUFA USB Connection Timeout -

someone pro in lufa framework , avr microcontrollers? i have function builds table (stored on heap memory) 256 elementes received on usb connection , program takes long generates table usb connection brokes (i hear windows sound when unplug device). call function after hid_device_usbtask() , usb_usbtask() functions inside while loop can imagine, didn´t work well. this situation gets worse when call function compute 256 elements of data. that's do: receive block of 8 bytes of data , append each block big ass table! code works short tables 16 bytes or so, big 1 256 bytes goes hell! it seems usb conection ran time-out or something. there pseudo-code: uint8_t *p_data_to_save = null; uint8_t *p_data_to_host = null; int main(void) { p_data_from_host = (uint8_t*)calloc(8, sizeof(uint8_t)); p_data_to_save = (uint8_t*)calloc(256, sizeof(uint8_t)); setuphardware(); leds_setallleds(ledmask_usb_notready); globalinterruptenable(); (;;) { hi

packages - Something strange with Project Paths in IntelliJ 14.1.4 -

Image
so, has started act weird in intellij project. tried removing iml , .idea data, no avail. i go project structure. there, have content root. withing, have 3 folders - 1 jar (and jni lib), 1 samples , 1 tools (just tools written use jar). jar, samples , tools marked blue (sources). in jar folder, have source tree (com\company\projectname\xxx), lib folder, folder jni lib , folder created call 'junit', focus of question. marked in project structure in green (tests). within, have folder structure eerily similar code: com\company\projectname\junit. when open file in junit\com\company\xxx\junit, have big red underline under package com.company.xxx.junit; line tells me: "package name 'com.company.xxx.junit' not correspond file path 'junit.com.company.xxx.junit'. i under impression marking folder 'tests' instruct ide use "parent" folder, if will, eliminating need prepend folder name. how can separate code unit tests , in fact

playframework - Play logger configuration parameters -

i pass parameter application.conf logger.xml logging configured. application.conf ... logstash.host = "127.0.0.1" logstash.port = 1234 ... logger.xml <appender name="logstash" class=".."> <port>${logstash.port}</port> <remotehost>${logstash.host}</remotehost> </appender> but value aren't getting set. |-error in net.logstash.logback.appender.logstashtcpsocketappender[logstash] - unknown host: logstash.host_is_undefined what options? i not have separate logger.xml every environment, have separate application.conf each. thanks in advance.

css - div style cursor pointer is not working in chrome -

i have added custom controller google map api. 1 div in custom controller should clickable. have added cursor:pointer style. works in firefox not in chrome. in chrome browser, displays hand icon click action not working. this code added html file add html custom controller. controltext.innerhtml = '<div id="newid" class="myclass" style="width:380px; margin-left:40px; margin-bottom:20px;">click here proceed</div></div>'; i have added click event listner following. map.controls[google.maps.controlposition.bottom_left].clear(); map.controls[google.maps.controlposition.bottom_right].clear(); var inputfieldcontroldiv = document.createelement('div'); var inputfieldcontrol = new textfieldcontrol(inputfieldcontroldiv, map); map.controls[google.maps.controlposition.bottom_left].push(inputfieldcontroldiv); css file .myclass{ cursor:pointer; } tested in mozzila, opera, ie11, chrome , work

c# - How can I get this iTextSharp Image to "float right"? -

Image
i'm adding image pdf file so: string imagepath = @"c:\users\default\"; if (system.io.file.exists(imagepath + "officeuseonlyimgsmaller.png")) { itextsharp.text.image png = itextsharp.text.image.getinstance(imagepath + "officeuseonlyimg.png"); png.scaletofitlinewhenoverflow = true; doc.add(png); } it working, after fashion - image indeed added pdf file: [ however, need image (the "office use only" rectangle) magnetize right, on same "row" varicolored text shown left, so: [ how can that? setting "scaletofitlinewhenoverflow" true didn't help. reduced size of image itself, made no difference - took smaller file , ballooned out same (screen) size previously. update once remembered load smaller image, (rather checking existence), image has been punified: ...but still tucks under, instead of right of, blocks of text. update 2 i tried implement nelek's idea: string imagepath = @&qu

How to get todays day in dd format in Python 2.7 -

how keep format of day , month having dd/mm? currently if under 10 print single number 5 rather 05 or 08. today = date.today() print(today) print(today.day) print(today.month) output: 2015-08-05 5 8 what want: 05 08 you can use strftime : print(today.strftime("%d")) print(today.strftime("%m")) 05 08 a leading 0 means octal using python2 , invalid syntax in python3 need use string if want have leading 0. use str.format , pad not point when can date object.

c# - How to return IEnumerable<Class> from Grid Kendo to Controller? -

i load information grid kendo, , user can changes values of multiple employees, click on button save changes. want return information (list) controller update. model: public class authorizationmodel { [editable(false)] [display(name = "no. nómina")] public int idroster { get; set; } [editable(false)] [display(name="empleado")] public string employee { get; set; } [display(name = "estatus")] public string status { get; set; } [display(name = "comentarios")] [datatype(datatype.multilinetext)] public string comment { get; set; } ..............//property ..............//property } controller: [httpget()] [route("autorizacion")] [authorize()] public actionresult authorization() { _orderbll = new orderbll(); var models = new list<authorizationmodel>(); var orders = _orderbll.getpendingorders(); foreach (var order in

javascript - Counting Radio Button Not Working -

i'm writing app on 100 q/a flashcards , have added traffic light buttons allow user reflect on how understand each question/answer. <form> <fieldset data-role="controlgroup" data-theme="b" data-type="horizontal" data-mini="true"> <legend>rate understanding</legend> <input type="radio" name="traffic-lights" class="red" id="red" value="on" checked="checked"> <label for="red"><img src="http://new.chemistry-teaching-resources.com/images/red-light18.png" width="18px" height="18px" ></label> <input type="radio" name="traffic-lights" class= "orange" id="orange" value="off"> <label for="orange"><img src="http://new.chemistry-teaching-resources.com/images/orange-light18.png" width="18px&q

c++ - CUDA cudaMemcpy Struct of Arrays -

i'd clean parameters of cuda kernels in project. now, kernel needs 3 uint32_t arrays, leads pretty ugly code: (id means global thread id , valx arbitrary value) __global__ void some_kernel(uint32_t * arr1, uint32_t * arr2, uint32_t * arr3){arr1[id] = val1; arr2[id] = val2; arr3[id] = val3;} i'd sorround arrays struct: typedef struct s{uint_32_t arr1, uint_32_t arr2, uint_32_t arr3, uint32_t size} s; where size denotes length of every arrx inside struct. what have, like: __global__ void some_kernel(s * s){s->arr1[id] = val1; s->arr2[id] = val2; s->arr3[id] = val3;} what corresponding cudamalloc , cudamemcpy struct this? there performance drawbacks this, i'm not seeing yet? thanks in advance! you have @ least 2 options. 1 excellent choice already given talonmies, i'll introduce "learn hard way" approach. first, struct definition: typedef struct s { uint32_t *arr1; uint32_t *arr2; uint32_t *arr3;

unit testing - How to setup a controller's method using moq -

i have action method in controller below public actionresult index() { var supplier = getsupplierforuser(); var model = supplierservice.getoutstandingitems(supplier); return view(model); } i've setup supplier service method as var supplierservice = new mock<isupplierservice>(); var supplier = new supplier { name = "some name",id = 100}; supplierservice.setup(s => s.getoutstandingitems(supplier)) .returns(outstandingsupplieriteminfo.object); i don't know how can setup method supplier getsupplierforuser() present in base controller return supplier object. moq setup above null supplier passed supplierservice.getoutstandingitems(supplier) any ideas? thanks maybe need: supplierservice.setup(s => s.getoutstandingitems(it.isany<supplier>())) .returns(outstandingsupplieriteminfo.object); the it.isany<> stuff make setup match incoming object (argument). since use

plsql - Function does not return expected value, when max value returns NULL -

i have created function return max number data set, works fine, if data set exists ie., if max returns value. if there no matching data set need return value of 0, no matter try retrieval either equals no value or no data found. have tried when when no data found , when others , null values below cant function return 0 if max value not found ie., if max value returns null . create or replace function opc_op.sitezone_msm (in_site_id aw_active_alarms.site_id%type ,in_zone_id aw_active_alarms.zone_id%type ,in_mod aw_active_alarms.module%type) return number v_msm number; null_values exception; begin select max(aw_active_alarms.weight) v_msm aw_active_alarms aw_active_alarms.site_id = in_site_id , aw_active_alarms.zone_id = in_zone_id , aw_active_alarms.module in_mod||'%'; return (v_msm); exception when null_values return 0; end sitezone_msm; have spent age playing cant desired results , suggestions appreciated

python - Is the `id()` of a variable associated to the value assigned to it after the variable lifetime finishes? -

i tinkering objects' identity in python following code: def f(var1): print 'within f , before modification: var1= '+str(var1)+', id= '+str(id(var1)) var1 = 10 print 'within f , after modification: var1= '+str(var1)+', id= '+str(id(var1)) def f2(var1): print 'within f , before modification: var1= '+str(var1)+', id= '+str(id(var1)) var1 = 1 print 'within f , after modification: var1= '+str(var1)+', id= '+str(id(var1)) def f3(var1): print 'within f , before modification: var1= '+str(var1)+', id= '+str(id(var1)) var1 = 10 print 'within f , after modification: var1= '+str(var1)+', id= '+str(id(var1)) var = 5 print '\n f - var1=10:' print 'before function call: var= '+str(var)+', id= '+str(id(var)) f(var) print 'after function: var= '+str(var)+', id= '+str(id(var)) print '\n f2 - var1=1:' var = [4,3

Unable to build an Android Qt application -

i've installed qtsdk, android sdk & ndk on new computer. copied project , didn't load .pro.user. i downloaded api10 sdk, set in qt creator. app compiles apk creation fails. following log: -build-setup: [getbuildtools] using latest build tools: 22.0.1 [echo] resolving build target qtapp... [gettarget] project target: android 2.3.3 [gettarget] api level: 10 [echo] ---------- [echo] creating output directories if needed... [mkdir] created dir: /home/marcin/proj/touchcatch/build-touchcatch-android_for_armeabi_v7a_gcc_4_9_qt_5_5_0-debug/android-build/bin [mkdir] created dir: /home/marcin/proj/touchcatch/build-touchcatch-android_for_armeabi_v7a_gcc_4_9_qt_5_5_0-debug/android-build/bin/res [mkdir] created dir: /home/marcin/proj/touchcatch/build-touchcatch-android_for_armeabi_v7a_gcc_4_9_qt_5_5_0-debug/android-build/bin/rsobj [mkdir] created dir: /home/marcin/proj/touchcatch/build-touchcatch-android_for_armeabi_v7a_gcc_4_9_qt_5_5_0-de

MATLAB out of memory on linux despite regular "clear all" -

i batch processing bunch of files (~200) on matlab, in essence for = 1:n, process(i); end where process(i) opens file, reads , writes out output file. (i not posting details process here because hundreds of lines long , readily admit don't understand code, having obtained else). this runs out of memory after every dozen of files or so. of course, on linux, memory function not available have figure out "by hand". well, thought there memory leak, let's issue clear all after every run, i.e. for = 1:n, process(i); clear all; end no luck, still runs out of memory. @ point happens, who says there's 2 small arrays in memory (<100 elements). note quitting matlab , restarting solves problem, computer has enough memory process single item. any ideas me detect error comes welcome. this probable not solution hoping workaround have shell script loops on several calls matlab.

linux - Flushing stdout messages of c/c++ based executable -

my question general , doesn't relate specific debugging scenario. when program terminate unexpectedly (panic, memory corruption, access violation etc... ) , recent stdout messages doesn't appear on screen, though occurred prior termination. that's because stdout messages first being written buffer erased upon termination without being written stdout in advance. my question whether there's generic option flush debug messages in c/c++ code before program terminate unexpectedly ? (i prefer using generic compiler configuration rather ad-hoc solution specific implementation such std::cout - if there's such option, i'd happy know if it's common gcc , g++) note : assume when flushing buffer each new arriving message, damage performance. however, it's meant debug version. thanks try setvbuf set no buffer setvbuf(stream, null, _ionbf, 0)

java - extract file name from content disposition -

my payload has content-disposition field. trying upload bpmn file. @ backend need parse input stream , extract file name. not able find solution of this. using jesrey rest. i tried : @post @consumes(mediatype.multipart_form_data) @produces(mediatype.application_json) public response addworkflowschema(@formdataparam("bpmndata") inputstream uploadedinputstream, string filename, @context httpservletrequest request) to whole payload data. if remove formdataparam ma getting request body. reuqest payload : ------webkitformboundary8ccb878tyzkse9go content-disposition: form-data; name="bpmndata"; filename="process.bpmn" content-type: application/octet-stream ------webkitformboundary8ccb878tyzkse9go-- i need filename content-disposition. how can this. just inject formdatacontentdisposition also, , file name that . public response addworkflowschema( @formdataparam("bpmndata") inputstream

php - Managing oversold inventory conditions in Magento -

i have been using bluecherry managing stocks . there have been conditions during festive seasons products have been oversold . there way , can controlled it's understood bluecherry resets quantity part periodically every hour. suggestions in regard appreciated . with sync based integration between 2 systems (with multiple channels of stock movement) you'll never have real-time info , you'll have risk of overselling. 1 workaround use built-in magento feature lets specify quantity @ product goes out of stock (under inventory tab). can used create psuedo-stock-splitting system account inventory sold off via other channels between running of sync jobs between magento , bluecherry. value use here depend on business requirements , how stock selling off via non-magento channels.

validation - Rails custom validator not working in console only -

i have custom validator dimensions_validator in app/validators. works fine in app in development. when bring rails console , try load model, pngpic.count , argumenterror: unknown validator: 'dimensionsvalidator' . gives? how console different webrick server? i've restarted console few times, no luck. you can check out threads , compare own. rails 3, unknown validator: 'emailvalidator' where should rails 3 custom validators stored?

python - Apache-Spark load files from HDFS -

i've written simple python code sum.py load directory data hdfs, , add first-column numbers each csv file in directory data . code shows follow: import os, sys, inspect, csv ### current directory path. curr_dir = os.path.split(inspect.getfile(inspect.currentframe()))[0] ### setup environment variables spark_home_dir = os.path.realpath(os.path.abspath(os.path.join(curr_dir, "../spark-1.4.0"))) python_dir = os.path.realpath(os.path.abspath(os.path.join(spark_home_dir, "./python"))) os.environ["spark_home"] = spark_home_dir os.environ["pythonpath"] = python_dir ### setup pyspark directory path #pyspark_dir = os.path.realpath(os.path.abspath(os.path.join(curr_dir, "../python"))) pyspark_dir = os.path.realpath(os.path.abspath(os.path.join(spark_home_dir, "./python"))) sys.path.append(pyspark_dir) ### import pyspark pyspark import sparkconf, sparkcontext ### myfunc add numbers in first column. def myfunc(s): total

List all tables of ormlite db android -

i want list table names of ormlite db in android the code create table: public void oncreate(sqlitedatabase db, connectionsource connectionsource) { try { log.i(databasehelper.class.getname(), "oncreate"); tableutils.createtable(connectionsource, dummy.class); } catch (sqlexception e) { log.e(databasehelper.class.getname(), "can't create database", e); throw new runtimeexception(e); } } list tables of ormlite db android there not method in ormlite lists existing tables can use dao.queryraw(...) methods this. here docs on raw-queries . something following should work: genericrawresults<string[]> results = dao.queryraw("select name sqlite_master type = 'table'"); (string[] result : results) { system.out.println("one table is: " + result[0]); } this work on of dao objects since should connect same database.

c# - Session variables not propagating -

i have set standard asp.net webforms application on pc. login pages stores 3 session variables; username, password , redirect. from i've seen, can use session["user"] = username or session.add("user", username); set variables. once variables have been set, redirect page performs further authentication checks. in receiving page, have following protected void page_load(object s, eventargs e) { if (!ispostback) { var user = (string)(session["user"]); } } when come @ user though, null. everything on set out of box values. further info in caller, session set this if (user.username == "admin") { session.add("user", username.text); session.add("pass", password.text); session.add("redir", request.querystring["returnurl"]); response.redirect("secondpage.aspx", false); } in secondpage.aspx if (!ispostback) { returnurl = (

Websockets or AJAX or both? -

i bit confused how 1 uses websockets. have set websocket server , able receive server , send server. my question is. when using websockets, supposed drop ajax part completely? or supposed use websockets alongside ajax? example: i want use websockets on chat service on website users can log in. when logging in, use ajax. when on message page use websockets receive future messages, , send future messages. when navigating messages page, use ajax messages database. is correct way of using websockets? or should in websockets since 1 user 1 active connection more efficient? or should 1 user have 1 websocket connection, still keep sending ajax requests server when navigating pages without reloading site, using ajax? what best practice when creating large application users can log in, navigate pages load stuff async, still wanting bidirectional real time benefits of websockets on stuff messaging services , notification services on same website? there no reason cannot use

ember.js - Ember property doesn't update properly with multiple dependencies -

my property sum depends on 3 different properties (inside model). have other property depends on sum . iszero , sum have binding in template {{iszero}} {{sum}} . this simplified code: sum: function () { console.log('sum is', this.get('p1') + this.get('p2') + this.get('p3')); return this.get('p1') + this.get('p2') + this.get('p3'); }.property('p1', 'p2', 'p3'), p1: function () { console.log('update p1'); return _data.p1; }.property('data'), p2: function () { console.log('update p2'); return _data.p2; }.property('data'), p3: function () { console.log('update p3'); return _data.p3; }.property('data'), data: {}, _data: {p1: 1, p2: 2, p3: 3}, iszero: function () { console.log('sum in iszero is', this.get('sum')); return this.get('sum') === 0; }.property('sum'), updatedata: f

angularjs - Restangular and UI-Bootstrap first page appears blank -

i getting grips restangular , seem making headway. have opted use ui-bootstrap ease of use, use working bootstrap before. my current issue have pagination working controller, results not appear when first visit page. if visit second page , go first page results there expected. if choose reload page in anyway results on first page not appear. my code follows: app.controller('billslistctrl', function ($scope, billrepository) { $scope.filteredbills = [], $scope.currentpage = 1, $scope.itemsperpage = 10; $scope.bills = billrepository.getlist(); $scope.$watch('currentpage', function() { var begin = (($scope.currentpage - 1) * $scope.itemsperpage), end = begin + $scope.itemsperpage; $scope.filteredbills = $scope.bills.slice(begin, end); }); console.log($scope.filteredbills); }); the repository: app.factory('abstractrepository', [ function () { function abstractrepository(restangular, route) { this.restangula

regex - How to generate Regexp matcher for String with even Number? -

this question has answer here: regular expression match odd or number 3 answers there're regexp digit everywhere: example: 4 but regexp number: example : 568 regex designed find pattern in string, not find , recognize e.g. (extract prime number string). should better extract consecutive digits , check (num % 2 == 0). but still if want stick regex, pattern provided in comments above needs little bit adjustment case. you may try pattern: \b(\d+??[02468])\b demo edit: i didn't interacted grep before, from doc found grep doesn't support features supported regex engine other languages. so adjusted pattern based on allowed input, try pattern: ^([0-9]+[24680]|[02468])$ tested here on following inputs: (z + (758+1) + x) (z + (757+1) + x) (z + (123+1) + x) 757 758 123 144 13 14 2 and result is: 758 144 14 2 hope helps n

javascript - prevent line break after jeditable trigger -

i want edit field provided jeditable stays in same line text triggered it. created jsfiddle show mean https://jsfiddle.net/xu1ree7v/8/ as can see, edit fields on next line... tried "white-space: nowrap;" , "display: inline;" of seems ignored jeditable. javascript looks this $(document).ready(function () { $(".display-date").editable('www.example.com', { type: 'select', data: "{'belgrade':'belgrade','paris':'paris','london':'london', 'selected':'belgrade'}", cancel: 'cancel', submit: 'ok', }); }); $(".edit-trigger").click(function () { $(this).prev().trigger(".display-date"); }); and html <p style="font-size:10pt; white-space: nowrap;display: inline;">next meeting: <div class="display-date select_next_jc" style="font-size:10pt; white-spa

html - How to prevent img tag increases the height of it's parent -

Image
i have <form> containing several <input /> fields. on of these fields have added calendar widget selecting date - working without problems. html { margin: 0px; padding: 0px; } .img { width: 20px; height: 20px; position: relative; top: 5px; } <h1>example #1 (table)</h1> <table> <tr> <td> <input /> </td> </tr> <tr> <td> <input /> </td> </tr> <tr> <td> <input /> <img class="img" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabqaaaaucayaaacnir0naaadxeleqvr42rxuy4/bvbqg8nmwyvmknghvqibgaquklvh3wibagogoswebu4ovc1ggbaieffragihuvj0ytdxom5mkedhomomdtx/x79iju2esr+fa08bkruxq6voug+wnc33ovvtbj+krq3ffqzwe7ep+breyn9up8hz8f2opu8zt1ku3/5aqhffwimdso49kpkmclzcle0xncsjkoe0woqrraj/m4lhcsqkh4vot6kmucl26bnllhamslkwdjkyiuvlaro9hqt1gnmojhn5c0p8hfvcmxpugnm512j2/ybsohc8avxprdfjt8sow