Posts

Showing posts from January, 2010

objective c - ios how to hide one uiview and push another uiview at the same position -

i want set myview hidden , view visible, how can this. code got far makes hidden. cgrect frame = cgrectmake(185, 960, 768, 1004); hiuiview *view = [[uiview alloc] initwithframe:frame]; view.backgroundcolor = [uicolor redcolor]; [self.myview addsubview:view]; [self.myview sethidden:yes]; you adding view inside , hide second. first child of second, hidden too. you can try adding "view" in parent of "myview".

html - Why is my third div bolting out of the bottom of the page when the height of the second div changes, and how do I fix it? -

here jsfiddle . note, how third div goes awry once use damper type dropdown menu. is there way hold in place without using absolute positioning? or best bet in case? in addition, feel understanding of relative positioning on shaky grounds, because did not understand make div defined #elastic_period that. note looking @ jsfiddle: important css should around lines 330. code written describe page upto line ~330. rest of css bootstrap css documents.

salesforce - How to find if an apex:inputField is disabled -

from visualforce controller, how can find if dependent pick-list inputfield disabled? there not seem accessible 'disabled' property field. creating validation make sure fields on visualforce page filled out. not want validation on dependent pick-list when there no values select, , in disabled state. if dependent picklist required , no values available based on controlling field value, users can save record without entering value. record saved no value field. dependent picklist considerations if required jest on page: public boolean statedisabled {get;set;} <apex:inputcheckbox styleclass="statedisabled" style="display:none" value="{!statedisabled}" /> <div> <apex:inputfield value="{!con.mailing_country__c}" onblur="statedisabled();" /> </div> <div class="state"> <apex:inputfield value="{!con.mailing_state_province__c}" onchange="stat...

Convert string to array in ajax call in javascript -

i making ajax call , getting result array looks result = [one, two, three]; i need convert array , iterate it. since string has no quotes around values array isn't read correctly. here code, if can please show me correct way it. thanks. xmlhttp.open("post","searchservlet", true); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readystate == 4 && xmlhttp.status == 200) { resultdata = xmlhttp.responsetext; // resultdata = [one, two, three]; // need make valid array iterate (var = 0; < resultdata.length; i++) { console.log(resultdata[i]); } } }; hi "user" , welcome so. code sample , well-formatted question :) since http requests use strings (they don't send arrays), best way send response in json format. can parse json string array. http://www.copterlabs.com/blog/json-what-it-is-how-it-works-how-...

webdriver - verify text presentation on a loaded page -

i trying verify line of text present on loaded page using webdriver. created function - istextpresent , invoked function within same method. eclipse prompted me error: the method istrue(boolean) undefined type assert . please tell me why doesn't work , how should fix it. whatis best approach verify text presentation on web page? 2a. possible verify text presentation within first @test code fragment? 2b. type## heading ## of method shall use in case (public, private or protected)? my code fragment: import java.util.list; import java.util.concurrent.timeunit; import org.junit.*; import org.junit.before; import org.junit.after; import org.openqa.selenium.*; import org.openqa.selenium.firefox.firefoxdriver; import org.openqa.selenium.support.ui.select; public class selftechytestng { private webdriver driver; private string baseurl; @before public void setup() throws exception { driver = new firefoxdriver(); baseurl = ...

Mink - Goutte Driver cURL SSL error -

i using mink 1.4 , using goutte driver. i trying set form field values in page , click on button submits form. but error fatal error: uncaught exception 'guzzle\http\exception\curlexception' message ' in phar://c:/documents , settings/user/my documents/dropbox/kar_rental/inc/mink.phar/vendor/guzzle/guzzle/src/guzzle/http/curl/curlmulti.php on line 579 guzzle\http\exception\curlexception: [curl] 60: ssl certificate problem, verify ca cert ok... i assumed since set curlopt_ssl_verifypeer false, should not check ssl. here code: foreach ($this->_sites_data $site_name => $site_data) { // instantiate mink's goutte driver $clientoptions = array( 'curl.options' => array( 'curlopt_ssl_verifypeer' => false, 'curlopt_certinfo' => false, 'curlopt_timeout' => 120 ), 'ssl.certificate_authority' => 'system' ); $client = new \be...

java - What is an advisable design pattern for switching between GUI pages? -

don't code below is: getters needed every jbutton on each page the actionperformed method can become bloated if-else statements so, there better way control gui actions single class? if define actionperformed method within each respective page ( jpanel ), each page need access instances of page(s) switched to, , trying avoid using singleton pattern each page... here code: import java.awt.event.actionevent; import java.awt.event.actionlistener; /** * * @author ian a. campbell * */ public class controller implements actionlistener { /** * instance variables: */ private frame frame; private optionpage firstpage; private firstoptionpage firstoption; private secondoptionpage secondoption; /** * */ public controller() { // instantiating frame here: this.frame = new frame(); /* * instantiating pages here: * * note: passing "this" because class ...

mysql - join table and filter and take aggregrate function sql access -

is possible join 2 tables,filter data , take aggregate function in ms access? have 2 tables inv_details:invnum,itmcde,qnt,price inv_summary:invnum,date,total i need join tables , filter them date range , have sum of qnt , price order itmcde. i tried this. select inv.itmcde,sum(inv.qnt),sum(inv.price) (select inv_s.invnum,inv_s.date,inv_d.itmcde,inv_d.total inv_summary inv_s inner join invoice_details inv_d on inv_d.invnum =inv_s.invnum inv_s.date between #3/4/2013# , #5/16/2013# ) inv order inv.itmcde but not working. try select d.itmcde, sum(d.qnt) qnt, sum(d.price) price inv_summary s inner join inv_details d on d.invnum = s.invnum s.date between #3/4/2013# , #5/16/2013# group d.itmcde order d.itmcde sqlfiddle although fiddle sql server same general rules should apply in ms access

wpf - Issues with Galasoft Messenger class in multi threaded environment -

i have 2 classes lets classa , classb. have communicate of galasoft messenger class. in classa, have following code :- class : messenger.default.register<notifyinterface>(this, performaction); private void performaction(notifyinterface objnotify) { switch(objnotify.someproperty) { case "a": // break; case "b": // else break; } } from classb want send parallel notifications of messenger i.e. want execute 'case a' , 'case b' parallely. doing this. classb: system.threading.threadpool.queueuserworkitem((object context) => { messenger.default.send<notifyinterface>(objnotifycasea); }, null); messenger.default.send<notifyinterface>(objnotifycaseb); but second notification not received until first 1 gets over. limitation of messenger class 2 notifications cannot sent in parallel? well, not sure whether bug or by-design, ye...

Android - how to invoke onNavigationItemSelected when spinner item is re-selected -

i using spinner in action bar navigation. problem is, onnavigationitemselected not called when selected item same selected one. have looked @ similar questions here , here , here none of them provide working solution, specific required drop down navigation within action bar. i using following code: public class testspinner extends activity implements actionbar.onnavigationlistener { private integer mposition; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); final actionbar actionbar = getactionbar(); final string[] eventtypes = getresources().getstringarray( r.array.spinner_items); mposition = -1; arrayadapter<string> adapter = new arrayadapter<string>( actionbar.getthemedcontext(), android.r.layout.simple_spinner_item, android.r.id.text1, eventtypes); adapter.setdropdownviewresource(an...

hadoop - Running jar file map reduce without Hdfs -

i have bundled jar eclipse project. pass arguments jar. input file jar. know how give input file not in hdfs. know that's not hadoop works testing purposes. eclipse has feature local files. there way via command line? you can run hadoop in 'local' mode overriding job tracker , file system properties command line: hadoop jar <jar-file> <main-class> -fs local -jt local <other-args..> you need using genricoptionsparser (which norm if you're using toolrunner launch jobs.

javascript - Error Uncaught TypeError: Cannot set property 'onclick' of null -

im having error on facebook javascript "uncaught typeerror: cannot set property 'onclick' of null " line 187 , line 187 is: " button.onclick = function() {" all code is: <script type="text/javascript"> window.fbasyncinit = function() { fb.init({ appid: <?php echo json_encode($this->getapikey()) ?>, status: true, cookie: true, xfbml: true, oauth: true}); fb.canvas.setsize({ width: 640, height:1500 }); //fb.canvas.setautoresize(); function updatebutton(response) { var button = document.getelementbyid('fb-auth'); if (response.authresponse == 'null') { //user logged in , connected var userinfo = document.getelementbyid('user-info'); fb.api('/me', function(response) { }); button.onclick = function() { fb.logout(function(response) { var userinfo = document.getelementbyid('user-info'); ...

sql - Calling SP with Output Parameter From another SP -

i trying call sp sp, stuck in when find output parameter in calling sp. using execute sp_executesql call store procedure. here part of sp declare @finalquery nvarchar(max) declare @parmdefinition nvarchar(500) declare @parmin varchar(10) declare @pin_coderet nvarchar(20) declare @ffi_idret int set @finalquery = 'exec [addfirefighter] ' + @singlequery set @parmin=' returned' set @parmdefinition=n'@last_name nvarchar(50), @first_name nvarchar(50), @rnk_code nchar(6), @ems_code nchar(6), @fst_code nchar(3), @sta_id int = null, @travel_distance int, @active bit, @dep_id i...

cocoa touch - viewcontroller with a uinvaigationcontroller when pop up does not show the navbar -

i'm using storyboards this. on storyboard have "mainpage" uiviewcontroller has button when tap call uiviewcontroller (choosewinner) pop up. choosewinner vc has uinavigation controller attached it, reason why can go , forth easily. can call uiview modal pop doesn't show it's uinavigation. this method called when button tapped. thoughts? - (void)updatewinner{ uistoryboard *storyboard = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil]; matchwinnerviewcontroller *vc = [storyboard instantiateviewcontrollerwithidentifier:@"winnerviewcontroller"]; vc.modalpresentationstyle = uimodalpresentationformsheet; vc.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentviewcontroller:vc animated:no completion:nil]; vc.view.superview.autoresizingmask = uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin; vc.view.superview.bounds = cgrectmake(0, 0, 800, 600); } ...

ruby on rails - How to display previous value on Min Miles text field -

Image
i want display previous value on min miles , should not editable. want default value of min miles 0. when click on add more range in new form - min value should max value of previous form. i using semantic form for. please me. how can this... regarding second question, , assuming new form appears through javascript, without page reloading, can grab field value javascript , use default value new field. "add new range" something function getvalue(){ var inputtypes_max = [],inputtypes_min = [],inputtypes_amount = []; $('input[id$="max_miles"]').each(function(){ inputtypes_max.push($(this).prop('value')); }); $('input[id$="amount"]').each(function(){ inputtypes_amount.push($(this).prop('value')); }); var max_value_of_last_partition = inputtypes_max[inputtypes_max.length - 2] var amount_of_last_partition = inputtypes_amount[inputtypes_amount.length - 2] if (max_value_of_last_...

Model and Controller's naming rule for irregular noun in Rails -

how should name controller if belonging model name irregular noun? for example, if model name "child" name should use? "children" or "childs"? for irregular language occurrences can have @ https://github.com/rails/rails/blob/4-0-0/activesupport/lib/active_support/inflections.rb as can see child become children .

flex - Opening sound recorder upon clicking on a button -

i'm developing flex air application(using windows 7 os). want open windows sound recorder software(in accessories section) upon clicking on button.i have tried lot.but not getting.is there way make possible? you need use nativeprocess . have @ http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/flash/desktop/nativeprocess.html , check out example code. modifying linked example code suit needs, complete code check if nativeprocess supported , run sound recorder like: package { import flash.display.sprite; import flash.desktop.nativeprocess; import flash.desktop.nativeprocessstartupinfo; import flash.events.event; import flash.events.progressevent; import flash.events.ioerrorevent; import flash.events.nativeprocessexitevent; import flash.filesystem.file; public class nativeprocessexample extends sprite { public var process:nativeprocess; public function nativeprocessexample() { ...

drag-drop, resize images and then drawing features in 1 canvas -

i working on application user comes , sees blank area(div or canvas or whatever, lets call mycanvas hereafter). drags images outside(a div) , drops them on mycanvas. can resize them. and, can draw in mycanvas pencils , colors erasing feature. now, per research till now, i've figured out drawing part pure html 5 canvas stuff. so, no problem that. i'm not sure whether can drop images outside div/canvas mycanvas. please tell me how achieve 3 features(drag-drop outside, draw pencil, resize images) in single area. you can achieve required features using kinetic js. to drag, drop , resize http://www.html5canvastutorials.com/labs/html5-canvas-drag-and-drop-resize-and-invert-images/ to paint using different shapes, line: http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-line-tutorial/ and dropping outside canvas simplest thing, probably: http://www.w3schools.com/html/html5_draganddrop.asp just check these , let me know if there problem in i...

javascript - PHP/JS wav compression -

i generating wave file (.wav) in php script on server, sending client through request. problem download speed of client limits file size transferred in reasonable time, looking way compress file (a wav, precise) in php , decompress again in javascript once sent there on http. is there known solution unaware of? clarify question if necessary. i quite sure can setup output compression in apache .wav files (or other file types actually). don't need handle on php because apache compress automatically , no worries in javascript since browser decompress automatically (apache sets appropriate headers let browser know needs decompress response). that being said, take @ mod_deflate apache: http://httpd.apache.org/docs/2.2/mod/mod_deflate.html

android - ADT bundle on Mac 10.7.5, problems with My First App -

since wanted start android development, went on developer.google.com , followed steps building first app. one of first things adt bundle installed described here . download , "install" (just moving folders) seemed go ok various problems arose: i tried following building first app new android application dialog boxes finishes of time. adt/eclipse crashed on it's own , had force quit it. says "an out of memory error has occurred". once said "an internal error occurred while trying display internal error" (or close). on few occasions able complete new android application wizard, unable run , given varied error message, of complained space , called permgen. after reading bit here , elsewhere, edited eclipse.ini looks (i've copied think relevant): --launcher.xxmaxpermsize 512m --launcher.defaultaction openfile -vmargs -dosgi.requiredjavaversion=1.6 -xstartonfirstthread -dorg.eclipse.swt.internal.carbon.smallfonts -xms40m -xmx768m at ...

arrays - No semicolon before [] is causing error in Javascript? -

var = [1,2,3,4]; var b = [10,20,30,40]; console.log([a,b].length) [a,b].some(function(x){ x.push(x.shift()) }); i extremely surprised today when code caused [a,b].some(function(x){ x.push(x.shift()) }); ^ typeerror: cannot call method 'some' of undefined obviously javascript 'auto semicolon insertion' not working expected here. why? i know might recommend use ; everywhere avoid that, question not whether better use ; or not. love know happens here? when i'm worried semicolon insertion, think lines in question without whitespace between them. in case, be: console.log([a,b].length)[a,b].some(function(x){ etc }); here you're telling javascript engine call console.log length of [a,b] , @ index [a,b] of result of call. console.log returns string, code attempt find property b of string, undefined, , call undefined.some() fails. it's interesting note str[a,b] resolve str[b] assuming str string. kamil points out, a,b vali...

redirect - Wordpress and pluigin CM Tooltip Glossary -

i've problem plugin : cm tooltip glossary. when click 'add new', on fev second it's form plugin, , when page loaded, it's refresh again , redirect me original form wordpress. in form cm glossary should 1 text title , textare description, it's 2 text english title, , polish title, , textare, i've question why wordpress redirect me ohter form ? i worked out redirect, responsible this, line: include ('. / admin-footer.php'); in file : wp-admin/post.php :)

php - Counterpart for <frame> that supports tranparency in chromium browser? -

Image
i have website , in 1 of pages photo album, appears in chromium: and in firefox, below: as can see, there white patch left , above gallery box in former picture while in latter there tranparency throughout outside of box. want rid of these white patches. learnt boils down how chromium handles iframes. figured out code fragment needs change transparency achieved in both browsers. echo "<frameset rows='424px' frameborder=0 >"; echo "<frame name='akc' style='background-color: transparent' noresize='noresize'"; echo "src='aneesh.php?album=" . start() . "'/></frameset>"; so question boils down getting replacement code produces same result in chromium in firefox. want complete replacement frame tag. (a tag can targeted frames, can contain webpages - frame use 'src' attribute - , support transparency) you use <div> use <?php include('aneesh.php?album...

ruby on rails - constant Logger::Format not defined (NameError) with activerecord -

when have require 'active_record' in env.rb getting errors constant logger::format not defined (nameerror) /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record/support/clean_logger.rb:5:in remove_const' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record/support/clean_logger.rb:5:in ' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record/support/clean_logger.rb:3:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record.rb:28:in require' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/activerecord-1.6.0/lib/active_record.rb:28:in <top (required)>' /home/vijay_demo_project/bank_cucumber/features/support/env.rb:62:in require' /home/vijay_demo_project/bank_cucumber/features/support/env.rb:62:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p125@test/gems/cucumber-1.2.2/lib/cucumber/rb_support/...

c# - LINQ - Not returning the same value as SQL Server -

Image
i have weird issue. i have query: var systemappentityviewmodelfieldcustom_securitybyuserlist = (from t in coreentitymodel.systemappentityviewmodelfieldcustom_securitybyuser (t.systemappuserid == currentsystemappuser.systemappuserid) && (t.systemcultureid == currentsystemappuser.systemcultureid) select t).tolist(); producing these values field "customfilterid": as can see, "customfilterid" = 1 4 items, when check sqlprofiler , run result query in sqlserver, this: a variation of "customfilterid" = 1 , 2. any idea why linq produce 4 items "customfilterid" = 1? found issue. view not selecting pk column of table , adding pk column of table select list of view , produced correct results.

css - Flot line chart getting hidden -

if try setting height of x-axis label, line chart( displayed using flot ) getting hidden. why happening , what's solution? #placeholder .flot-text .xaxis .ticklabel{ color: #74878b; display: inline-block; font-size: 14px; padding-right: 20px; padding-top: 5px; position: absolute !important; text-align: center !important; z-index: 0; top:55px !important }

html - How to align a subsubmenu to the right of a submenu? -

here jsfiddle explaining. as can see when :hover top1 > sub1 , subsub1 , subsub2 appear @ right of submenu underneath subsub1. i tried solving margin-top: -31px; @ .ulmenuthird shown here jsfiddle , thats wrong code , gives not best results. (sometimes subsubmenu items have higher height , smaller height). any solutions? hey have had , hope looking for. i have added div around subs have subsubs #container { position:relative; } and change margin-top top:0; .ulmenuthird { display: none; position: absolute; left: 100%; right: auto; min-width: 10em; top: 0; } http://jsfiddle.net/p9wst/4/

eclipse - Android Inflater crashes -

i'm new forums , believe i've made big mistake code (somewhere). i trying build android app fist time, no experience within java nor app-creation before, please bare me. my idea create glossary-app, , has been , running, when tried add spinner, crashed. have removed spinner, app still crashes. 05-21 10:51:29.970: e/androidruntime(22736): android.view.inflateexception: couldn't resolve menu item onclick handler onlanguagebuttonclick in class se.inceptive.irebglossary.mainactivity 05-21 10:51:29.970: e/androidruntime(22736): @ se.inceptive.irebglossary.mainactivity.oncreateoptionsmenu(mainactivity.java:58) and presented @ line 58: @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); return true; } any on appreciated mainactivity.java package se.inceptive.irebglossary; import android.app.activity; import android.os.bundle; import android.view.me...

android - How to Search items in alphabetically in Listview through Base Adapter -

i want search items list view alphabetically on click on edittext not getting how this serch_item.addtextchangedlistener(new textwatcher() { @override public void ontextchanged(charsequence s, int start, int before, int count) { // todo auto-generated method stub text = serch_item.gettext().tostring(); // approvedfriendlist.setfiltertext(text); } @override public void beforetextchanged(charsequence s, int start, int count, int after) { // todo auto-generated method stub } @override public void aftertextchanged(editable s) { // todo auto-generated method stub } }); search_item editext , items coming through base adapter if user types name on edittext item should visible or searched take 1 e...

Library for programmatically creating class diagram picture with java? -

Image
is there library in java allows me programmatically create class diagram fetched data (similar diagram below)? specifically, want create database reference diagram (image below). edit: prevent misunderstanding, did not want uml diagram of java code. rather, want generate diagrams data got database (via java) , output them in image form. in 2 steps , can create diagrams based on object/table relationships. step 1: use dot (graph description language) create graph representation of relationships. dot plain text graph description language. simple way of describing graphs both humans , computer programs can use. syntax easy learn. create file create text file using preferred programming language. step 2: use dot reader libraries render picture. there lot of libraries available render dot file . graphviz - collection of libraries , utilities manipulate , render graphs canviz - javascript library rendering dot files. viz.js - simple graphviz javascript client gr...

scala - Getting The entire node set is unreachable error when trying to connect to MongoDB with reactivemongo in my play2 application -

when working locally have no problem testing application calling: http://localhost:9000/r/123 method: def showsurvey(id: string) = action { implicit val reader = review.reviewreader async { val cursor = reviews.find(bsondocument("_id" -> bsonobjectid(id))).cursor[review] cursor.headoption.map(maybereview => maybereview.map(review => { // fill form ok(views.html.review.desktopsurvey(some(id), surveyform.fill(surveyform(review.grade, review.text, regular_auth, false, "", "")), grades)) } ).getorelse { //notfound temporary below: val review = review(some(new bsonobjectid(id)), 3, "bla", some(new datetime()), some(new datetime()), some("0.0.0.0"), reviewstatus.not_claimed, some(1), some(1l)) ok(views.html.review.desktopsurvey(some(id), surveyform.fill(surveyform(review.grade, review.text, regular_auth, false, "", "...

java - Restrict report parameter to a certain length -

in birt report created report parameter entering "year" value. want restrict 4 digits on input field. how can that? user should type 4 digit in field. configuration or script available achieve this? you can't restrict length of textbox-entered value in birt. you could set parameter display type list box , specify available values year, either static list of values entered in edit parameter dialog or dynamic set of values retrieved dataset.

Hyper-V manager on a DC (Windows 2012) -

i know it's not possible run hyper-v role on domain controller, possible run hyper-v manager on dc manage other hosts? it's absolutely possible run hyper-v role on domain controller, it's not recommended. yes, can run hyper-v management tools on dc manage remote machine, hesitate it's recommended. ideally, dc should dc, not management platform, suppose can't helped. if have windows 8 machines, can install , use hyper-v management tools there manage hyper-v on remove server 2012 or windows 8 machines, recommended way it.

Is there any equivalent of Services of Android in iOS? -

i want check database in app every 12 hrs rows date column having corresponding date. accomplished writing service in android. there equivalent of services in ios requirement can accomplished? no. there no such thing in sdk or in iphone/ipad in general. can write code affect eco system of app, not operating system. when app closed it's closed , no action taken until user opens it/opens push notification related app. if user approved location based services app, there few ways run short background process if app totally closed. 1 of them using monitoring shape-based regions means if user left region x/entered region y open app , run few commands before closing again. the clever way ( and way can think of ) accomplish you're after in ios run service on server , pull data server when app opened.

javascript - DataTable-FixedHeader on ASP.Net Repeater throws errors after async postback -

i use fixedheader-function ( http://datatables.net/extras/fixedcolumns/ ) datatables ( http://datatables.net/ ) on asp repeater. the repeater/table not visible when page loaded, user has select item in dropdownlist repeader databound. the scripts added scriptreferences in scriptmanager. <asp:scriptreference path="scripts/jquery-1.9.1.min.js" /> <asp:scriptreference path="scripts/jquery-ui-1.10.2.custom.min.js" /> <asp:scriptreference path="scripts/jquery.blockui.js" /> <asp:scriptreference path="scripts/fixedheader.min.js" /> the code initiating table done when page/post-back complete using: sys.webforms.pagerequestmanager.getinstance().add_endrequest(endrequesthandler); initialization: (only table exists) if ($('#myid').length > 0) fixedheaderlist = new fixedheader(document.getelementbyid('myid'), { "offsettop": 36 }); this works fine. i have added asp-button nothing,...

JSF Servlet Pattern / weird requests -

currently want refactor project , remove /faces/ urls. reason simple, want avoid, users can "remove" faces part , see source of underlaying xhtml file. i'm using shiro authentication. i'll first describe prior situation (that worked) , new one, that's causing troubles. prior situation: web.xml: <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> shiro.ini [urls] /faces/index.xhtml = authc /faces/pages/** = authc /faces/templates/** = authc /faces/resources/** = authc current situation: web.xml: <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> shiro.ini [urls] /index.xhtml = authc /pages/** = authc /templates/** = authc /resources/** = authc for people might have still "faces" bookmarks, added filter, , doing thi...

twisted.web - how do i stop reqest.finish() (twisted .web server)from closing the http connection -

i have written chat server writes message line on browser of 1 client other client. problem if use request.finish() output shown connection closed .if dont use request.finish () browser or program buffers output , displaying output after 20 or request have been send.however connection remains open. i think best approach reconnecting client after receiving message , closing connection.

symfony - Symfony2 Change class name in twig form theme -

i want override form_widget_simple function {% block form_widget_simple %} {% spaceless %} {% set type = type|default('text') %} {% if errors|length > 0 %} {{dump(form.vars.attr)}} {% endif %} <input type="{{ type }}" {{ block('widget_attributes') }} {% if value not empty %}value="{{ value }}" {% endif %}/> {% endspaceless %} {% endblock form_widget_simple %} but dont know how set form.vars.attr['class'] inside if statement whent set form.vars.attr['class'] = 'error'; error unexpected token "punctuation" of value "." ("end of statement block" expected) as see, adding additional attributes handled in widget_attributes block. if take in there, see simple foreach on attr array , attributes. think simple set merging existing one, done. form_widget_simple block like {% block form_widget_simple %} {% spaceless %} {% set type = type|default(...

swing - How to add and delete table in java -

i have code making table , sort data input there. if want add action using button add row fill data , can delete row too. here code: public class tablesortdemo extends jpanel { private boolean debug = false; class mytablemodel extends abstracttablemodel { private string[] columnnames = {"nama", "nim", "ipk"}; private object[][] data = { {"", new integer(0),new double(0)} }; public boolean iscelleditable(int row, int col) { if (col < 2) { return false; } else { return true; } } public void setvalueat(object value, int row, int col) { if (debug) { system.out.println("setting value @ " + row + "," + col + " " + value ...

C DLL In Code::Blocks -

Image
i can't find how make c dll in code::blocks. whenever try , shows links using c++ dlls in managed programming languages. , code::blocks doesn't give option c dll. do? file->new->project show dialog: then select dynamic link library , away go.

Highstock mysql json compare multiple series -

please create query! working example of query retrieve data json using php: <?php $con = mysql_connect("localhost","user","password"); if (!$con) { die('could not connect: ' . mysql_error()); } mysql_select_db("admin_accounting", $con); $result = mysql_query("select unix_timestamp(date), sum(ksi2k) accounting lhc_vo 'ops' group year(date), month(date)"); $rows = array(); $rows['type'] = 'area'; $rows['name'] = 'ops'; while($r = mysql_fetch_array($result)) { $rows['data'][] = $r[0]*1000; $rows['data'][] = $r[1]; array_push($rows); } print json_encode($rows, json_numeric_check); mysql_close($con); ?> the json results this: {"type":"area","name":"ops","data":[1167664515000,0,1170342915000,0,1172762115000,0,1175436915000,0,1178028915000,0]} but need json results should this: {"type...

r - How do I background correct an Illumina eset without using lumiB? -

i'm doing work publicly available microarray data sets i've downloaded geo. i'm having trouble using lumi package process illumina beadarray data. normally when using lumi package use lumir convert data lumibatch object, use lumib on background correct. lumir requires bead standard errors in order create lumibatch object, in absence creates expression set. of lumi's functions work on expression sets, not lumib. data sets i've downloaded have mean intensity values , in cases associated p-value. therefore can't turn data lumibatch object , can't background correct lumib. i appreciate suggestions on how background correct expression sets. apologies if i've phrased unhelpfully or left out important information, i'm new both r , asking questions on forum this. thanks, emma this how i've been using lumir , how use lumib if lumibatch object: #import data , convert lumibatch/eset object gsexxx.lumi <- lumir("gsexxx_raw_dat...

"git submodule" comes back empty -

i use following sequence initialize , update git submodules: git init git submodule init git submodule update then want see submodules, command: git submodule it prints out nothing unfortunately. my .gitmodules file in same directory , contains known working submodule definitions. please note called git init first command. if didn't that, git submodule init complain there no valid git repository. why git submodule not print anything? from comments: unless you've done git clone or git submodule add , you've not added submodules. presence of .gitmodules isn't enough - check in .git/config see if there lines [submodule foo] . if there's not, dont have submodules in repo, git submodule working should.

Use Ajax to call php function with paremeters -

first off - no jquery . hate thing passion , can't possibly imagine how native code implementation less efficient. what after way call php function javascript , pass parameters function using call_user_func_array. have written exact code before can't think of how did it. in end, want able (in js) able like: var responsestring = callphpfunction(func, param1, param2, etc); ` which ideal , involve few nested functions. @ moment have basic ajax request. needs post, , doesn't have handle multiple requests simultaneously. var lastresponse = ''; function phpfunction(funcname){ var ajaxrequest; try{ // opera 8.0+, firefox, safari ajaxrequest = new xmlhttprequest(); } catch (e){ // internet explorer browsers try{ ajaxrequest = new activexobject('msxml2.xmlhttp'); } catch (e) { try{ ajaxrequest = new activexobject('microsoft.xmlhttp'); } catch (e){ // went wrong ...

html - ScrollTo or ScrollLeft. Div inside of Iframe -

i trying have div on html page gets loaded iframe scroll horizontal position onload. can't working. simple body onload code in html page, div scroll point. when loaded iframe doesn't happen anymore. this code have in iframe, doesn't much.. <iframe id='idframe' style='width:23300px; height: 650px; border:none; overflow: hidden;' src='http://www.foundfootage.be/kijk3.html' onload="this.contentwindow.getelementbyid("images_hz").scrollleft=100" anyhelp appreciated i don't know sure...but guess javascript code need inside iframe...

Ruby hash.delete(:key) deleting copies and clones as well -

from understand, when set object = another, reference, have methods .dup , .clone create copy of object , not reference. however, duplicating or cloning array of hashes , when delete key original hash being deleted copies! not supposed happen, wonder i'm doing wrong. code: or_data = {title: 'some title', tracks: [ { name: 'track one', position: 0, artist: 'orignal artist', composer: 'original composer', duration: '1:30' }, { name: 'track two', position: 1, artist: 'some other guy', composer: 'beethoven', duration: '2:10' } ] } new_hash = or_data.dup # or new_hash = or_data.clone, either way produces same result or_data[:tracks].each { |e| e.delete(:position) } the :position key deleted new_hash ! this happens regardless of whether use .dup or .clone . i read post says 1 should use: new_hash = marshal.load( marshal.dump(or_data) ) this work. why? because .dup , .clone "...

Is it still possible to create an RSS feed from a Facebook group? -

how create rss feed of facebook group? see there's sites can pay, how go doing myself? scrape content, or facebook provide way information? facebook doesn't provide feeds groups, there services use facebook api create rss feeds. these 2 of them found: http://www.wallflux.com/ https://apps.facebook.com/groups_to_rss/

regex - How to select all occurrences of regular expression in a single field of SQL -

i need list of occurrences of specific regular expression in single record of sql for example have record this: => 'dear {0}, account expire in {1} days' i stored string in table , want select occurrences of '{something}' in example: => {0} {1} what should ??? thanks i've found answer of question declare @inputtext nvarchar(100) ; select @inputtext = 'dear {token 0}, account expire in {token 1} days' ; tokens ( select substring(@inputtext,patindex('%{%',@inputtext)+1,patindex('%}%',@inputtext)-patindex('%{%',@inputtext)-1) token , substring(@inputtext,patindex('%}%',@inputtext)+1,len(@inputtext)) new , patindex('%{%',substring(@inputtext,patindex('%}%',@inputtext)+1,len(@inputtext))) [nextstart] , patindex('%}%',substring(@inputtext,patindex('%}%',@inputtext)+1,len(@inputtext))) ...

java - JGit error when cloning repository -

bug won't fix. it's embedded how different operating systems allows characters in file names. solution cannot found within jgit or git @ moment. when try run git.clonerepository() error syntax file-, directory name or volume lable. have started appear of sudden without change of code concerning piece of software. jre: 1.7 code use: private void clonecommit() throws exception { try { file minedir = new file(m_target, this.m_name); if (!minedir.exists()) { minedir.mkdir(); minedir.setwritable(true); minedir.setexecutable(true); } git g = null; windowcacheconfig cfg = new windowcacheconfig(); cfg.setpackedgitmmap(false); windowcache.reconfigure(cfg); g = git.clonerepository() .seturi(m_localuri) .setdirectory(minedir) .call(); g.reset().setref(this.m_current.getname()).setmode(resettype.hard).call(); globalmessages.commitpulled(this.m_i, this.m_current.getname()); ...

How to produce this html table in asp.net? -

i need convert classic asp app asp.net . old asp uses hardcoded html table results. unsure how same in .net. i need produce grid look. section heading name:p smith address: 12 road age: 22 new section heading job num: 24 dept: sales new section heading insurance num: 93939 next of kin: j smith each section has seperate dataset using it's own stored procedure. 1 record returned each dataset each section. i tried repeater , details list control , unable required. any & code appreciated. you need 3 different controls 3 different bindings. have render single html table, if that's want do. repeater should work since can control html pretty repeater. roughly... <table> <asp:repeater ...> <headertemplate> <tr><th colspan="2">section heading</th></tr> </headertemplate> <itemtemplate> </tr><td>name</td> <td><%...

focus - ALT-TAB always activates main window in WPF app with multiple owned windows -

on windows 7, .net 4.0 have problem can reproduced copying following code blank wpf application generated visual studio: public mainwindow() { initializecomponent(); loaded += new routedeventhandler(mainwindow_loaded); } void mainwindow_loaded(object sender, routedeventargs e) { new window() { title = "test", showintaskbar = false, owner = }.show(); } run app activate secondary window alt-tab other running application use mouse activate our wpf app in taskbar now wpf app active again, secondary window activated , main window deactivated, expected (and desired) behavior. now instead (only step 4 differs): run app activate secondary window alt-tab other running application alt-tab our wpf app the wpf app active again, main window activated. adding code private void application_activated(object sender, eventargs e) { windows[1].activate(); } to app.xaml.cs not solve problem because in second case ...

jquery - Get entire html page as response with javascript -

i doing ajax post specific page either can id response if went expected or random html page , http 400 response if went wrong. in error case want open entire html page in new window. have tried following not working - sets variable data [object object] instead of intended html page. $.ajax({ type: "post", url: posturl,     data:'message=' + message + '&' + 'title=' + title, statuscode: { 400:function(data) { var newwin = open('','windowname','height=300,width=300'); newwin.document.write(data); }, }, success: function(json) { alert("post success"); },     error: function(jqxhr, textstatus, errorthrown) {         alert("error connecting page.");     } }); specify datatype : 'html' , change success function variable. example: $.ajax({ type: "post", datatype: 'html', url...

Hidden Characters in String ruining SQL statement (php, mysql) -

i have variable appending sql statement, there seem hidden characters causing errors. i have $addtoinventory variable number (e.g. 405,000). i'm trying following snippet of code rid myself of characters when echo still see \0\0\0\0 (null) after number. $addtoinventory= str_replace(",", "", $pieces[1]); $addtoinventory= str_replace("\r", "", $addtoinventory); $addtoinventory= str_replace("\n", "",$addtoinventory); $addtoinventory = preg_replace('/^[\pz\pc]+|[\pz\pc]+$/u', '', mysql_real_escape_string($addtoinventory)); $sql_query = "update products set products_quantity = " .$addtoinventory." products_model '$code'"; echoing $sql_query produces: update products set products_quantity = 405000\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 products_model '111'. use trim() . removes nul-bytecharacters. this function returns string whitespace stripped be...

javascript - Does the order of jQueryUI Dialogs make a difference (maybe just with TinyMCE)? -

in script below (live example located @ http://jsbin.com/aliket/1/ source code located @ http://jsbin.com/aliket/1/edit ), created 2 dialogs, 1 (#dialog2) child within other (#dialog1). if create #dialog2 before #dialog1, open #dialog1 , open #dialog2, tinymce plugin no longer works. not working, mean tinymce's text box shaded out , entered html gone. problem order of 2 dialogs, or tinymce? why happening? know how fix it,however: create #dialog1 before #dialog2. thanks <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>testing</title> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>...

c# - Default code generated by my EF model has errors -

this kind of noob question, , bit embarassed have not been able figure out myself , knew transition linqtosql ef fraught nuances this. basically did 1> create musicstore sql database using visual studio 2012 server explorer 1 table. 2> added new ado.net entity data model edmx , generated using wizard pointing database in step 1. this gave me diagram of musicstore table. if change code generation strategy in properties default instead of none , code generated in musicstoremodel.designer.cs . however, @ public musicstoreentities() : base("name=musicstoreentities", "musicstoreentities") i has invalid arguments . what missing here? reference? appreciated. public partial class musicstoreentities : objectcontext { #region constructors /// <summary> /// initializes new musicstoreentities object using connection string ///found in 'musicstoreentities' section of application ///configuration file. /...