Posts

Showing posts from June, 2013

css - absolutely positioned div is below another div -

when click image table, popup appears. when click on 1 of images in last row, cut off div below it. i can't post relevant css there can post page. link click on last image below "wallpaper - click thumbnail view details" (before printed fabrics section starts). actually, same thing happens if click on last image under "printed fabrics" well. how can make appear on top ? it's overflow: hidden on container causing problem. can change (global.css 1423): .wallpaper_collection { overflow: hidden; } to this: .wallpaper_collection:after { content: ""; display: table; clear: both; } you have same other container(s). e.g. (line 1428) .printed_fabrics_collection { overflow: hidden; } you combine them 1 rule, so: .wallpaper_collection:after, .printed_fabrics_collection:after { content: ""; display: table; clear: both; }

oauth 2.0 - Instagram API: how can I have multiple redirect_uris for a single app? -

Image
i'm quite familiar oauth 2 other providers, haven't used instagram before. like many developers, have multiple domains app may run, eg: http://www.foo.com/oauth2callback https://www.foo.com/oauth2callback http://localhost:3000/oauth2callback https://localhost:3000/oauth2callback other oauth 2 providers have used, eg, google, allow multiple entries in redirect_uris parameter . however instagram seems allow single redirect uri parameter per registered app . can have multiple redirect uris single instagram app or have register multiple apps, each different redirect uri? it looks can set multiple redirect url(s) when register/edit client in instagram:

php - How to show image always in a square -

i want show image inside square of fixed dimension of 400 * 400. hence maintain aspect ratio, possible if width more, width reduced , remaining space per aspect ratio filled background color (i can give color on div). if height more, height adjusted show per aspect ratio , remaining space filled background. could me how achieve this? can done imagemagick? http://php.net/manual/en/book.imagick.php any appreciated. use phpthumb. require_once '/path/to/thumblib.inc.php'; $thumb = phpthumbfactory::create('path/to/image.jpg'); //$thumb->resize(400, 400); // resize image , make thumbnail cropping image automatically $thumb->adaptiveresize(400, 400)->save('/path/to/thumb.jpg'); ; for more reading goto phpthumb

objective c - Checking textfield value for date in iOS -

i used 3 textfield(string) , 1 button display entered textfield in soap result. when clicked button textfield1=stationid --> 12345 textfield2 =firstdate --> 07.05.2013 textfield3=lastdate ---> 08.05.2013 searching , display somethings etc etc i want check date processes.for example must lastdate > firstdate.if entered firstdate > lastdate give error if user entered 30.02.2014 dates firstdate , lastdate must have give error.february has not 30 days.`` how can ?? try this, nsdateformatter *dateformat = [[nsdateformatter alloc] init]; [dateformat setdateformat:@"dd.mm.yyyy"]; nsdate *today = [dateformat datefromstring:@"12.12.2013"]; nsdate *newdate = [dateformat datefromstring:@"13.12.2013"]; nscomparisonresult result; result = [today compare:newdate]; // comparing 2 dates if(result==nsorderedascending) // checks lastdate > firstdate nslog(@"correct"

actionscript 3 - Adobe Air - Starling/Feathers - Text Input without OS level hooks (aka StageText)? -

long story short, seem running unpredictable stagetext functionality in adobe air applications. want avoid triggering os native input fields , emulate functionality in feathers/actionscript component directly. i've incorporated on-screen keyboard purely in feathers , implemented button subclass acts basic text input. when user clicks button, on-screen keyboard displayed , hardware keyboard keyup's intercepted , used dynamically update button label attribute. that works enough, of course have no flashing cursor or text selectability in current rudimentary widget. can continue along current path , manually implement rest of need, wanted ask if has seen or implemented 'native acting' non-native text input widget in feathers/starling/actionscript tech stack? (google seems no, i'm hoping that's wrong. surely i'm not 1 thinks air's stagetext is... troublesome... @ best) i changed rudimentary widget button subclass textinput editor fact

How to create a ODBC connection to SQL Server? -

Image
i try use access call stored procedure in sql server. have trouble build odbc connection, not know missing something? or need set in sql site? i have screen this: and code behind ok button this: dim dbpubs dao.database dim tdfpubs dao.tabledef dim qdfpubs dao.querydef dim strmsg string dim strsql string ' check existence of server, database , user name. ' if missing, inform user , exit. if isnull(me!txtserver) strmsg = "enter name of company's server." & _ & "(see database administrator)" msgbox strmsg, vbinformation, "missing data" me!txtserver.setfocus elseif isnull(me!txtdatabase) strmsg = "enter name of database. (example: xxxx)" msgbox strmsg, vbinformation, "missing data" me!txtdatabase.setfocus elseif isnull(me!txtuid) strmsg = "enter user login. (example: x

database - Multiple users simultaneously updating XML file -

let's got following scenario: an application runs locally on 2 computers, xml file shared. user 1: load file. user 2: load file, update row 5. user 1: update row 6, click "save". user 2: click "save". can prevent last "save" click override updated values of user 1? will ms access db instead of xml file solve problem? access might partially solve them, it's weaker in area full dbms. if want stay file based, have 3 basic options. you write "server" deals concurrent access file. you use pessimistic lock, first person ask edit file gets it, others read only you use optimistic lock. if file has changed since loaded, don't allow saved. can beef doing diff , conflict resolution. think merging code changes, complicated quick though. nb dbms might need conflict resolution layer.

Install winston on julia -

i' ve got julia installed on mac 10.7, unable install winston package. that's happens: pkg.add("winston") error: unknown dependency nifti: strpack .... please help. the julia-users@googlegroups.com list better place this. see https://github.com/julialang/julia/issues/3027 . in short, pkg.update() , try again.

url rewriting - Url rewrite base on query IIS asp.net -

i'm doing first time need help. how make code url rewrite 2.0 url rewrite base on query. i need to: www.example/ekonomija/ekonomija.aspx?ekonomija=something to be www.example/ekonomija/something and www.example/test2/test2.aspx?test2=something to be www.example/test2/something and www.example/test3/test3.aspx?test3=something to be www.example/test3/something and on .... need solution url rewrite: 2.0 edited try.... have problem first role working second no, query string not not accurately done, don't know. <rule name="redirectuserfriendlyurl1" stopprocessing="true"> <match url="^ekonomija/ekonomija\.aspx$" /> <conditions> <add input="{request_method}" pattern="^post$" negate="true" /> <add input="{query_string}" pattern="^([^=&amp;]+)=([^=&amp;]+)$" />

wordpress - WP e-commerce remove button -

for adding product cart id i've got code: <form class="product_form" enctype="multipart/form-data" action="<?php bloginfo('url');?>" method="post" name="1" id="product_143"> <input type="hidden" value="add_to_cart" name="wpsc_ajax_action"> <input type="hidden" value="143" name="product_id"> <button>+</button> is there code remove item id? i've tried this: <form action="<?php bloginfo('url');?>" method="post" class="adjustform remove"> <input type="hidden" name="quantity" value="0"> <input type="hidden" name="key" value="0"> <input type="hidden" name="wpsc_update_quantity" value="true"> <input type="submit" value="-"> </

php - menu populated from database -

i trying create side navigation populated database. want categories show on left hand side , when click on 1 others slide down make room sub categories. having trouble getting them work properly. i got main categories , running , got slide down , display subcategory hard coded saying "hello world" trying populate sub categories database having trouble getting work. here code: this database connection <?php $base = ($_server['https'] ? 'https' : 'http') . '://' . $_server['http_host'] . '/'; $mysql_connection = db_connect_enhanced('*********','dbaccess','*******','website'); //connect database $categories = "select * *********** active = 1"; $result = db_query_into_array_enhanced($mysql_connection, $categories); $count = count($result); ?> here code display navigation <div id="left-prod-nav"> <ul&

jQuery Ajax POST request not hitting Spring controller -

i unable hit spring controller using jquery ajax post. trying fetch list of string using json response. my javascript function called when dropdown selected: function doajaxpost() { var name = $('#selected_report').val(); alert("post ajax request initiating.... name : " + name); $.ajax({ type: "post", url: "/newilr/interfacereportssearch/findentitytypes", contenttype: "application/json", data: json.stringify({selectedreport:name}), datatype: "text", success: function(response){ if(response.status == "success"){ alert("success"); }else{ alert("failure"); } }, error: function(e){ alert('error: ' + e); } }); } note 2 of above alerts displayed (post ajax request initiating... , 'error: ' + e)) spring controller handle ajax request: @requestmapping (value=

php - Moving wordpress from local to local -

i have wordpress installed , running in local machine windows , xampp server. want access site machines within network. have copied files database dump, it's not working. posts, pages, plugins nothing displaying. i new wordpress, appreciated. thanks. if local wordpress installation (running on 127.0.0.1) work, not necessary modifications. access computers on lan ip machine 192.168.0.1/wordpress <- ip of xampp pc.

go - bytewise compare varint encoded int64's -

i'm using levigo , leveldb bindings go. keys int64 's , need kept sorted. default, leveldb uses bytewise comparator i'm trying use varint encoding. func i2b(x int64) []byte { b := make([]byte, binary.maxvarintlen64) n := binary.putvarint(b, x) return key[:n] } my keys not being sorted correctly. wrote following test. var prev int64 = 0 := int64(1); < 1e5; i++ { if bytes.compare(i2b(i), i2b(prev)) <= 0 { log.fatalf("bytewise: %d > %d", b2i(prev), i) } prev = } output: bytewise: 127 > 128 playground i'm not sure problem is. doing encoding wrong? varint not right encoding use? edit: bigendian fixed width encoding bytewise comparable func i2b(x int64) []byte { b := make([]byte, 8) binary.bigendian.putuint64(b, uint64(x)) return b } the varint encoding not bytewise comparable* wrt order of values caries. 1 option how write ordering/collating function ( cmp bellow) example: package

java - Will serialization save the superclass fields? -

this question has answer here: java object serialization , inheritance 3 answers my subclass implements serializable, superclass not. both subclass , superclass contain variables need saved part of state of subclass. will serialization save superclass fields? a superclass fields cannot serialized if not serializable.here summary of rules of java serialization: an object serializable if class or superclass implements serializable (or externalizable ) interface. an object serializable (itself implements serializable interface) if superclass not. however, firstsuperclass in hierarchy of serializable class, not implements serializable interface, must have no-arg constructor. if violated, readobject() produce java.io.invalidclassexception in runtime. the no-arg contructor of every non-serializable superclass run when object deserialized. however, de

c# - TweetSharp upload image with PhotoChooserTask and SendTweetWithMedia -

i'm trying upload picture on twitter of photochoosertask catching him. problem have not know how pass bitmapimage , format when choose image , pass stream . below sample of code: namespace twitter { public partial class twitteruploadimage : phoneapplicationpage { // constructor twitterservice service; private const string consumerkey = ""; private const string consumersecret = ""; private oauthrequesttoken requesttoken; private oauthaccesstoken accestoken; private bool userauthenticated = false; //uri uri = new uri("/background.png", urikind.relative); //stream imagestream = application.getresourcestream(uri); stream imagestream; string namephoto; public twitteruploadimage() { initializecomponent(); service = new twitterservice(consumerkey,consumersecret); //chek if have autehntification data

add an input in a div with javascript -

i have in html page div shown lightbox: <div id="container"> <input type="text" id="user_1" name="user_1" value="user_1"/><br> <input type="text" id="user_2" name="user_2" value="user_2"/><br> <input type="text" id="user_3" name="user_3" value="user_3"/><br> <label onclick="add_input();"><img alt="add_other" src="add.png"></label> </div> and want when click on image input added , appeared, tried following js function : function add_input(){ var div = document.getelementbyid('container'); var input = '<input style="width:300px;" type="text" id="user" name="user" value=""/>' div.innerhtml+= input; } the div id="container" has in

How to disable version control features in Qt Creator? -

i using independent version control management program (smartgit) alongside qt creator, , prefer not use qt creator version control management. it becoming nuisance qt prompts me regarding whether i'd add new files git (when add new files qt creator project), , whether i'd remove files git (when remove files project). earlier today, mistakenly added file git through qt creator when adding new file qt creator project. few minutes later, wished temporarily remove file project (likely re-added later). when removed file, qt creator dutifully asked me if i'd remove file version control - giving me warning file might removed permanently file system. understanding risk, nonetheless decided test behavior , said "yes, remove file git removing project". warning forewarned, file removed file system , had reconstruct it. i live , use qt creator's version control features in addition smartgit's, and/or use smartgit directly deal mistaken occasional uses o

composite - GWT: Exception: This widget's parent does not implement HasWidgets, but it does -

i trying create structure have larger ui small parts can swap in , out , more detailed areas. in essence making top level panels hold smaller panels other composites. right getting exception: 13:50:51.479 [error] [managementconsole] uncaught exception escaped com.google.gwt.event.shared.umbrellaexception: exception caught: widget's parent not implement haswidgets @ com.google.gwt.event.shared.handlermanager.fireevent(handlermanager.java:129) @ com.google.gwt.user.client.ui.widget.fireevent(widget.java:129) @ com.google.gwt.event.dom.client.domevent.firenativeevent(domevent.java:116) @ com.google.gwt.user.client.ui.widget.onbrowserevent(widget.java:177) @ com.google.gwt.user.client.dom.dispatcheventimpl(dom.java:1351) @ com.google.gwt.user.client.dom.dispatchevent(dom.java:1307) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodacce

javascript - How do I fix this JSON object to html table code? -

i've been modifying little bit piece of code found, can't make work want. current javascript: function jsonutil() { /** * given provided object, * return string representation of object type. */ this.istype = function (obj_) { if (obj_ === null) { return "null"; } if (obj_ === nan) { return "nan"; } var _type = typeof obj_; switch (_type) { case "undefined": return "undefined"; case "number": return "number"; case "boolean": return "boolean"; case "string": return "string"; case "function": return "function"; case "object": if (this.isarray(obj_)) { return "array"; } return "asso

jpa - JPQL - multiple joins with OR -

i'm using jpa , wondering best way construct query. here data model (this totally contrived , non-sensical): table "thing" has many-to-many relationship tables "height" "width" , "length" height, width, length each have many-to-one relationship table "creator" for given thing, creators associated @ least 1 of height, width, or length (note single thing can have many heights - said it's contrived). for example, if concerned height, this: select c creator c inner join c.heights height height.thing = :thing is there way specify multiple inner joins or? i'm assuming multiple inner joins function boolean and. here's current best guess: select c creator c exists (select h height h h.creator = c , h.thing = :thing) or exists (select w width w w.creator = c , w.thing = :thing) or exists (select l length l l.creator = c , l.thing = :thing) is there better way construct query? real-world case has 10 el

google app engine - Python jinja2 redirect with passing a parameter -

i using google app engine , want redirect page parameter when form submited. here first form: <form method="post" class="form-inline pull-left"> <div class="input-append"> <input type="text" required name="askquestion" class="span5"/> <button type="submit" name="askbutton" class="btn-u" value="askbutton">ask</button> </div> </form> and here backend: askbutton = self.request.get("askbutton") if askbutton: title = self.request.get("askquestion") self.render("makeaquestion.html",title=title) i have tried one: self.redirect("/makeaquestion?title='%s'"%title) the first 1 render new html , pass parameter url stay same before. second 1 redirect new url without passing parameter. set action attribute of form: <form action="/makequestion" method=

c++ - How do i fix NTL PowerMod issue -

zz powermod(const zz& a, const zz& e, const zz& n) i did following zz a,b,c; a=13; b=1; c=11; zz result; result = powermod(a,b,c); i tried compile , run, powermod error , bad args. it accept long,long,long , return long type.. issue did use powermod zz on previous other cpp file , fine. void powermod(zz& x, const zz& a, const zz& e, const zz& n); zz powermod(const zz& a, const zz& e, const zz& n); i know question bit old, i'll leave answer stumbling along looking answer find one. according this: http://forums.codeguru.com/showthread.php?506099-ntl-problem a must smaller n. don't know if problem, try: powermod(a % n, e, n)

Unable to read excel file using ssis Script Source -

i have case need read excel file filtered rows using ssis. i've started testing process when in table "system.__comobject" i'm sure doing stupid. thanks public overrides sub createnewoutputrows() dim xlapp = new excel.application dim wb microsoft.office.interop.excel.workbook dim rw excel.range xlapp.displayalerts = false wb = xlapp.workbooks.open("c:\posdata\test.xlsx") dim visible excel.range = wb.sheets("data").usedrange.specialcells(excel.xlcelltype.xlcelltypevisible, type.missing) each rw in visible.rows output0buffer.addrow() output0buffer.column = rw.cells(1, 1).tostring next output0buffer.setendofrowset() end sub that happens when using interop. objects excel, in case, indeed com objects. use cells(1,1).value or cells(1,1).value2 or cells(1,1).text . wich fits best you. (maybe need cast or convert cells range first)

internationalization - How to escape colon : in rails i18n? -

here line in view: <%= f.input :comm_date, :label => "hello:", :as => :string %> the regular i18n file has format as: hello : 'aloha' in i18n yml file, want translate "hello:" as, example, "aloha:". can escape colon : doing below? 'hello:' : 'aloha:' or what's right way escape colon? the gem using, simple_form, other similar ones such formtastic, allow using translation files (e.g. en.yml ) defining label text. you can see translation file expectations simple_form documentation. using example, you'd need 2 translations, this, assuming model called communication : en.yml en: simple_form: labels: communication: comm_date: "hello:" olelo.yml olelo: simple_form: labels: communication: comm_date: "aloha:" and view be <%= f.input :comm_date, :as => :string %> no need provide value :label option.

javascript - Multiple buttons in Twitter Bootstrap show the same dropdown - why? -

i trying put little dropdown menu bootstrap. put sample on jsfiddle here . the idea have each button trigger different dropdown list, clicking on file gives dropdown containing new , close, clicking on edit gives dropdown containing copy, paste , undo , on. however, same dropdown buttons. surely must have done wrong. i had @ this jsfiddle , linked this stackoverflow question , doesn't seem work - no dropdown shows @ when clicking. any suggestion? here copy of html: <div id="mainmenubar" class="btn-group"> <button class="btn" href="#" onclick="alert('hello!');">menu</button> <button href="#" class="btn dropdown-toggle" role="button" data-toggle="dropdown">file</button> <ul id="filemenuselector" class="dropdown-menu"> <li><a href="#">new</a></li> <li>

java - What is wrong with my MINA message? Going over a NioSocketConnector and failing, causing MINA to stop -

i have niosocketconnector , , have gotten iosession . can write test messages ( "abcdef" , "|" , "(asdfb)" , "1234567890" , etc.) "real" messages error , cause connection shut down (literally, session closes). my "real" message: 05082013113112272|123.123.123.0|0.0.0.0|abc|21|agg=1=29=299|3e8c288afe77ae0f2ae8d2549f90156 i can following through: 2013111211781|123.123.123.0|0.0.0.0|abc|21|agg=1=29=299|3e8c288afe77ae0f2ae8d2549f90156 2013|05082013111211781|123.123.123.0|0.0.0.0|abc|21|agg=1=29=299|3e8c288afe77ae0f2ae8d2549f90156 //05082013121502688|123.123.123.0|0.0.0.0|agg=1=2=23|5ca5905b75c6643bddb64be055c3f236 20130501202445 (but not 2013050**8**1202445 ) i'm using utf-8. appears i'm hitting kind of length issue--or kind of magical string scan. since i'm starting numbers, there trigger data binary , fails checksum? please me out? don't understand i'm hitting. this caused issu

tag a cvs merge point later based on the merging date -

the scenario: i've merged recent version of development branch head couple of weeks ago. know have tag merge-points forgot. head contains couple of features(4-5) haven't been released yet because not tested. plans have changed, must work on brand new feature. feature must released subset of features head since have not enough time test , release them all. the question: i've comitted bunch of things head since merging. possible tag merge-point of head afterwards? if yes, how? know date , time of merge since i've commented first commit after merging. my plan: merge desired features head recent branch(the same i've merged head). implement brand new feature, test, release, merge head :) you can create tags on files given date -d on cvs rtag . $ cvs rtag -d date {module} from version management cvs : -d date tag recent revision no later date . given situation: tag_0 tag_1 tag_2 tag_3 ------------|--------

ios - Passing Textfield Value to Label in another view Programmatically -

i newbie in iphone development , xcode. , having hard time running simple demo app passing textfield text 1 view label in view programmatically.... , dont know going wrong [even did nslog check string coming...it says null :( ] see if guys can me find lacking code?? in advance! here thing did: #import <uikit/uikit.h> @interface viewcontroller : uiviewcontroller<uitextfielddelegate>{ nsstring *str; } @property(nonatomic,retain)nsstring *str; @end viewcontroller.m * #import "viewcontroller.h" #import "nextviewcontroller.h" @interface viewcontroller () @end @implementation viewcontroller @synthesize str; - (void)viewdidload { uitextfield *txt =[[uitextfield alloc]initwithframe:cgrectmake(40, 40, 200, 30)]; txt.borderstyle = uitextborderstyleroundedrect ; txt.delegate=self; [self.view addsubview:txt]; uibutton *btn=[uibutton buttonwithtype:uibuttontyperoundedrect]; btn.frame = cgrectmake(80, 80, 200,

soap - Android asynctask with no input or output -

i have set async task list of countries wsdl , result create bunch of country objects , add objects arraylist in country class file. i want able run async task populate array list view able call specific indexes array list based on user has selected. i have tried creating class extends asynctask , have inserted same code gingerbread version of app created worked fine because network actions ran main thread the type getwsdl2 must implement inherited abstract method asynctask.doinbackground(object...) i dont have objects pass variables , stuff wsdl data within async task , data need assigned arraylist within async task. public class getwsdl2 extends asynctask { protected void doinbackground() { ........ } pass void... parameter doinbackground protected void doinbackground(void... params) { ........ }

javascript - jquery reset load file back to default -

i have 3 layer select use jquery load option sub-select country->state->city so if user select usa, 2nd select load usa's state. user can select city after select state. ex. usa->ca->la however if user select usa->ca->la first user want change country aus it become aus->select state->la, 3rd select still stay same. is way reset 2nd, 3rd select default if user change top select . $("#country").change(function(){ switch($("#country").val()){ case "aus":$("#state").load("aus_state.php");break case "uk":$("#state").load("uk_countie.php");break case "usa":$("#state").load("us_state.php");break } }); how remove load files default?

network protocols - TCP DF packets get block though in IPTABLES the required port is allowed by rule -

the rule added accept on port 10000 as: iptables -i input 5 -i eth0 -p tcp --dport 10000 -j accept but packet 10000 port blocked ipatables log: packet-droppedin=eth0 out= mac=<00:00:00:00:aa:59:00:90:30:00:00:00:00:00> src=10.78.34.175 dst=10.78.34.171 len=60 tos=0x00 prec=0x00 ttl=64 id=58229 df proto=tcp spt=50694 dpt=10000 window=5840 res=0x00 syn urgp=0 any idea? please dont close question irrelevant programming. check port 10000 listening on server: netstat -an |grep "10000" then check src ip in server firewall as: iptables -nl |grep yourip if have installed other firewall check in too.

How can I get hardware ids/serial numbers through command prompt? -

eventually i'm going using in java applet security user. know it's possible because remember doing before, can't remember line gets correct information. i'm searching line return processor id, serial number. these 2 fine. i have used google , tried few commands "wmic bios serialnumber" , doesn't return anything. the processor id , serial number should 2 unique numbers or strings. the bios serial number not set. this should give unique hardware information similar command: wmic csproduct uuid you combine info more information sure unique. examples: wmic csproduct uuid,name wmic bios name,version

javascript - Jquery dynamically change data value for ajax request -

i need function calculate every time last id of message inserted, way doesn't work, post initial number $("#conversazione").smartupdater({ url : "localhost/social/public/async/check-conversazione", mintimeout: 2000, type: 'post', data: { 'id': id, 'last': $(".messaggioaltri:first").attr("data-number-message") }, datatype: 'json' }, function (data) { if(data.aggiornamenti==1){ $.each(data.messaggi, function(indice, message){ mess="<div class='singolomessaggio'> data-number-message="+message.number+">" .... "</div>"; $(mess).hide(); $(mess).css({'background-color': '#ff7519'}); $('#messaggiconversazione').prepend(mess); $(

jquery - Overlaying divs including div selector -

inside container div have 4 divs wish overlay 1 visible @ time. each of these 4 divs same dimension - lets 200x200px. right of overlayed divs have 4 vertically aligned smaller divs not overlayed lets each 50 px high. these 4 vertically aligned divs act simple menu when clicked associated div of 4 overlaid divs left 1 displayed. i trying find simplest solution ideally using jquery. have played around stuff knowledge of jquery isnt job. any hints solution or method explore further appreciated. deployed part of wordpress theme if knows of plugin awesome suspect unlikely. many thanks. looking tabs form jquery ui? http://jqueryui.com/tabs/#vertical working example @ jsfiddle $(function() { $( "#tabs" ).tabs().addclass( "ui-tabs-vertical ui-helper-clearfix" ); $( "#tabs li" ).removeclass( "ui-corner-top" ).addclass( "ui-corner-left" ); }); css .ui-tabs-vertical { width: 55em; } .ui-tabs-vertical .ui-tabs

user interface - Scala - gui application does not exit -

i trying run simple gui app in scala/intellij: def main(args: array[string]) { val frame = new jframe() frame.setsize(900, 700) frame.setvisible(true) //this not necessary frame.addwindowlistener(new windowadapter { override def windowclosed(e: windowevent) { system.exit(0) } }) } firstly, windowadapter code not invoked when close window... secondly, when close window , app still running , have stop intellij console. ideas might causing this? the default behavior of jframe when closing hide_on_close says. that's why event isn't getting fired : because window isn't closed. can deal changing default closing behavior of frame : frame.setdefaultcloseoperation(dispose_on_close) you can change event windowclosing. see java doc : invoked when user attempts close window window's system menu. or can rid of listener , add : frame.setdefaultcloseoperation(exit_on_close)

android - Eclipse/ADT giving hundreds of errors "resource entry is already defined" -

i using latest eclipse comes android developer tools (adt) on linux (adt v21.1.0-569685). inherited large android project, , eclipse not build it. there hundreds of errors this: "error: resource entry defined". in res/values/string.xml: <string name="about">about</string> in res/values-de/string.xml: <string name="about">Ãœber</string> as far know, common , correct way i18n on android, eclipse treating errors. this not "already defined" error "main" resource , xml execution asked , answered elsewhere. i'm not running xml transform, , have no "extra" xml files anywhere. it doesn't seem eclipse configuration error, because if make small sample project exact same entries, duplication not cause "already defined" error. this error can happen when combination of resource qualifiers invalid. for example, drawable-xhpdi-v1 doesn't make sense because xhdp

Hiding "personal preferences tab" in plone user preferencias -

plone user preferences has 3 tabs: "personal information", "personal preferences" , "password". want hide "personal preferences" tab because don't want user changes/sees fields contained within. i tried this: hiding fields in "personal preferences" tab, explained in " hide custom fields on @@personal-information view ". tab still appears empty. any other ways accomplish this? another option go zmi -> portal_actions -> preferences , uncheck "visible" , click save.

Get an object value in jquery or javascript and makes a post request -

well problem this, lets take example. there 30 links in page, , under each link there button. , when clicks button link liked via ajax post request php file. but possible using jquery or javascript write single set of code find link liked (by getting id or of link) , send php via ajax request, rather writing 30 lines of ajax post request each link being liked. thanks you can associate each link button using data-* attribute. on button, use data-mylink="linkid" , give link's id. then, on onclick can this: $('.buttonclass').on('click', function(){ var mylinkid = $(this).attr('data-mylink'); //as david barker suggested, can grab $(this).data('mylink') //whatever else have do. }); alternatively, wrap them both in div , do: $('.buttonclass').on('click', function(){ $(this).parent().find('a').text() or .val() or .attr('href'); }); edit as war10ck pointed out, if items c

scala - How Do I Call Snippets From Different Packages In Lift? -

i trying call 1 of 2 snippet methods same name , same class, these snippets located in different packages. here's example code: snippet 1: package v1.site.snippet class testsnippet { def test = { println("printed v1") } } snippet 2: package v2.site.snippet class testsnippet { def test = { println("printed v2") } } index.html: <div class="lift:testsnippet.test"></div> so how tell index.html testsnippet.test call? both packages have been added in boot.scala. one option: liftrules.snippetdispatch.append { case "v1testsnippet" => new v1.site.snippet.testsnippet case "v2testsnippet" => new v2.site.snippet.testsnippet } your snippets must inherit dispatchsnippet , define def dispatch = { case "test" => test _ } etc. invoke snippets template v1testsnippet or v2testsnippet . alternatively, like liftrules.snippets.append { case "v1testsnippet"::&qu

c# - database update performance seems terrible. Did I do something wrong? -

i have table in sqlserver 2008 r2 express, has little more 3 million records. need processing on each record: take value 1 field input, process , fill result field. since processing written in c#, decided use sqladatper , datatable update each record , update database, follow http://msdn.microsoft.com/en-us/library/33y2221y.aspx . tested on smaller table 700,000 records. not take time read data , finish processing takes forever update table, around 100 records per second, extremely slow. tried changing updatebatchsize not , throw out time out exception if updatebatchsize>=1000. next thought maybe problem sqladapter , datatable. use sqlreader read table , update sqlcommand inside loop update record, performance still terrible (i use parameters update statement , prepare sqlcommand). thought maybe should combine update statements , run them in batch not performance either. finally decide read data database, write result text file, load text file database , write simple updat

wcf - Enable XSD as Type Definition Language is Disabled -

Image
i came question : how install contract-first tool in visualstudio 2012 when tried perform steps mentioned answer of question, mentioned in topic contract-first tool , faced following problem: options enable xsd type definition language , validate wcf configuration when building project disabled . the xml schema generated valid , taken aforementioned tutorial. why happening? your assembly needs target .net 4.5 option enabled.

Javascript - How can I make this regex code global? -

i think missing 1 line somewhere, or need change 1 line. tried various /g methods think exec killing me here, maybe missing small easy addition, or maybe way have written flawed. saw lot of threads 1 mentioned while looping exec seemed infinite loop because including match in replacement. here code got far var system_url="http://somesite.com/"; $('.words').mouseover(function(){ var re=new regexp("[a-z][a-z][a-z]-[0-9]{5}"); var m=re.exec($(this).html()); if (m == null) { re=new regexp("[0-9]{5}"); m=re.exec($(this).html()); if (m == null) {}else{ if ($(this).html().match("</a>")) {}else{ tx=$(this).html().replace(m,"<a href='"+system_url+m+"' target='_blank' title='ticket: "+m+"'>"+m+"</a>"); $(this).html(tx); } } }else{ if ($(this).html().match("</a>")) {}else{ tx=$(this).

javascript - How to reference an element in a list from another list with with the same class (the class is a variable)? -

i have 2 lists on website. each element has corresponding class in other list. click element in dl, , ul element add new class. thought it, apparently not: $('dl dt').click(function () { var classname = $(this).attr('class'); $('dl dt[class~=classname]').click(function() { $("ul li").removeclass('active'); $('ul li[class~=classname]').addclass('active'); }); }) i feel pretty dumb because seems super easy accomplish, can't quite it. forgive me if missed obvious answer elsewhere on site; looked while , couldn't find anything. you need modify selector: $('dl dt[class~="'+classname+'"]').click(function() { $("ul li").removeclass('active'); $('ul li[class~="'+classname+'"]').addclass('active'); }); like adeneo said, if have more 1 class, return classes!

sql server - Issue with timeout within TransactionScope in C# -

i have insert method works fine smaller data sets, once data sets beyond size , method times out, regardless of set in initial transaction scope. the insert methods in code use simple stored sql procedures called "executenonquery" my code looks (fluff removed): public void method() { using (transactionscope testscope = new transactionscope(transactionscopeoption.required, new system.timespan(1, 25, 0))) { timedb.insert(var.time); codedb.insert(var.code); foreach (variable var in listofvariables) { namedb.insert(var.value); } testscope.complete(); } } i assume issue has command time out rather scope time out, since code works fine smaller datasets.... if that's case there way change command time out without modify machine.config (or