Posts

Showing posts from August, 2013

why my joomla controllers method is not getting executed -

i have ajax method sends data 1 of controller method inside of controller not getting fired. everytime first method getting executed on call. controller looks follows class tieraerztecontrolleruploader extends jcontroller { /** * display task * * @return void */ function display($cachable = false) { require_once jpath_component_administrator.'/helpers/upload.php'; $upload_handler = new uploadhandler(); //this 1 going outputed die(); } public function locator(){ // wait here dump, not happening var_dump('test'); die(); echo '{"text":"john smith","id":"433"},{"text":"paul sparks","id":"434"}'; } } i call controller following url /administrator/index.php?option=com_tieraerzte&tas...

jquery - Why animated image takes a moment to display clearly? -

why image animated jquery takes moment display clearly? to understand problem here jsfiddle here when click button image gets large , takes while image clear. how correct problem? here code $(document).ready(function(){ $("#btn").click(function(){ $("#im").animate({width:200,height:200}); }); }); i think you're seeing browser optimization when asked scale images in animation. using fast scaling algorithm during animation make animation go quicker , using more accurate scaling algorithm once animation stops. you can read scaling algorithm changes here: https://bugs.webkit.org/show_bug.cgi?id=56627 also, here's info on how different browsers scale images differently: http://entropymine.com/resamplescope/notes/browsers/

css - Background image on iphone is not diplaying properly -

i have background image displays should on computer reason it's become small (like half size should when viewing on iphone. has caused happen i've been working on page because wasn't case earlier today. this css div containing bg img. ideas on whats going on? #wrapper{ position:relative; width:1000px; height:5854px; background-image:url(../images/unearthingbg.jpg); background-color:#000; margin-top: 75px; margin-right: auto; margin-bottom: 0px; margin-left: auto; background-repeat: no-repeat; } this working page http://www.unearthingfilm.com/test.html i managed fix last night using background-size: cover. thank answers. appreciated

iphone - How to launch a cocos2D game from single view app -

i created regular simple ios app (a single view application) 1 button , want launch cocos2d game ios app. in other words, want launch cocos2d game when press on button myapp.xib. don't want use url schemes launch game because require user download app download game. want user able launch game app internally. game want launch app: http://www.raywenderlich.com/14439/how-to-make-a-game-like-fruit-ninja-with-box2d-and-cocos2d-part-3 i able add game dependency in xcode project. however, i'm not sure how go launching game app. here's ideas had, didn't work me. there way can: call app delegate of game (not app delegate of app) ibaction in app launch game? call didfinishlaunchingwithoptions method of game (not didfinishlaunchingwithoptions of app) ibaction in app launch game? call main.m file of game (not main.m of app) ibaction in app launch game? from understand, these 3 different ways of launching ios app. keep in mind developing app (not game) allow user l...

javascript - hs.htmlExpand to the open popup on image click -

i like, when user click on image in open popup, content changed url in iframe (not close/open, crossfade) i have gallery hs.transitions = ['expand', 'crossfade']. next construction close old popup window , open new 1 (and break slideshow), want same effect (crossfade), user click next image. hs.allowmultipleinstances = false; hs.expander.prototype.onimageclick = function() { return hs.htmlexpand(null, { objecttype: 'iframe', src: 'url' }); }; how make it? sample - http://jsfiddle.net/xcnfe/4/ you can’t crossfade image html popup if html popup isn’t part of gallery. instead can create regular iframe covers image jquery , show iframe when clicking image ( onimageclick ). please see http://jsfiddle.net/roadrash/b7sdg/ hs.expander.prototype.onimageclick = function (sender) { $('<iframe src="'+this.custom.url+'" frameborder="0"></iframe>').css({ position: 'absolute...

Why does HttpWorkerRequest fail during HttpRuntime.ProcessRequest after a .NET 2.0 to .NET 4.0 upgrade? -

i upgrading our application, has internal webserver, .net 2.0 .net 4.0. i handling request object httplistenerworkerrequest , extends httpworkerrequest class, , creates request getrawurl() returns url in format of http://localhost:82/default.aspx . in .net 2.0, sending httpruntime.processrequest(httplistenerworkerrequest) works without issue, in .net 4.0, web page nothing text "bad request" on it. cracking open httpruntime , can see bad requests thrown processrequestinternal(httpworkerrequest wr) , private method tries build httpcontext. i tried myself: try { //what's going on? hcontext = new httpcontext(workerrequest); } catch(exception e) { //debugging break point here } pre-update (.net 2.0), builds fine, post-update (.net 4.0), system.argumentexception stating the relative virtual path 'http:/localhost:82/default.aspx' not allowed here , thrown @ at system.web.virtualpath.create(string virtualpath, virtualpathoptions options...

audio - Decibels in android -

i have created application getmaxampitude , converts decibels range of 30db. does android phone have range of 30db or problem in code? public class getmaxampitude extends asynctask<void, float, void>{ string db = ""; int ampitude; float db; @override public void doinbackground(void... params) { while(rec == true){ try{ thread.sleep(250); }catch(interruptedexception e){ e.printstacktrace(); } ampitude = recorder.getmaxamplitude(); db =(float) (20 * math.log10(ampitude/700.0)); publishprogress(db); } return null; } public void onprogressupdate(float... progress){ //database.addsounddata(db); db = (progress[0].tostring()); the decibel scale measure relative - , in case of digital audio, customarily largest value sample capable of holding. either 1.0 floating point representa...

ios - Keep keyboard always on top & visible -

i have view text field, image , few buttons. want make sure keyboard displayed , on top when view displayed , want make sure doesn't go away after type in text field , submit it. i called [txtfield becomefirstresponder] viewdidload , keyboard appearing default tiny delay after view displayed. also becomefirstresponder doesn't after have text field submitted. thanks in advance help! also becomefirstresponder doesn't after have text field submitted. that part makes no sense. default, text field not dismiss keyboard unless you dismiss endediting: or resignfirstresponder . if keyboard going away, must making go away. don't , won't. edit: , indeed, comment later reveals answer: you've hooked didendonexit control event text field. well, causes keyboard dismissed when user presses done button! hitting in face , complaining hitting in face. so solution, obviously, don't hook didendonexit control event (to anything). instead, give ...

How can I modify the folder name inside the zip downloaded from my github repo? -

the folder name of zip downloaded github %repository-name%-master , need folder %repository-name% can done? you cannot modify name of root directory contained in archive github. even when download master: wget https://github.com/user/repo/tarball/master you file named 'master', but: tar xpvf master the tar xpvf give repo-xxxx directory. follow with: mv repo-* repo

css - Place text to the bottom instead of right below the other text -

i'm using different div tags act tables , want div @ bottom of content div. <div class="table"> <div class="table-row"> <div class="table-information"> content </div> <div class="table-content"> more content <div class="extra"> here's content </div> </div> </div> </div> here's css: .table { display: table; } .table-row { display: table-row; } .table-information { background-color: #eaeaea; height: 150px; padding: 10px 15px; width: 150px; } .table-content { display: table-cell; height: 150px; padding: 10px 15px; } .extra { vertical-align: bottom } as can see have vertical-align: bottom; extra class. want have content within div @ bottom , not right below text more content . nothing happens when i'm t...

c++ - For loop adding to a variable -

i trying create loop adds 1 int variable every time if statement true but while testing code though if statement true variable not incremented, if loop not incremented @ all.... code sample: int left_jab_count; if(area >=100000 && area1 <100000) { cout<<"left jab has been thrown"" "<<area<<endl; for(int left_jab_count = 0; left_jab_count < 0 ;++left_jab_count) { cout<<"left jab :"<<left_jab_count<<endl; } } can see going wrong here ? for(int left_jab_count = 0; left_jab_count < 0 ;++left_jab_count) //^^^^left_jab_count never < 0 // change <0 value larger 0 you for loop never executed. therefore, left_jab_count never incremented, never enter body of for loop. meanwhile, declared left_jab_count twice.

Why can't TypeScript modules implement or adhere to an interface? Can I get around this? -

it seems useful in typescript require module implement interface. there particular reason why they've chosen not implement ability? i can't think of reason why undesirable allow module implement interface, if is, there other way require module provide set of properties / methods? you can force compile error if module doesn't adhere interface (technically non-zero runtime overhead, unlikely matter): interface foo { bar(): number; } module mod { export function bar(): number { return 0; } } var mod_is_foo: foo = mod; // errors if change 'number' 'string' above as why can't module mod implements foo ? all features start @ minus 100 . edit add -- here other (somewhat wacky) things write in lieu of var statement above if wanted avoid creating new top-level var: <foo>mod; // shortest, fastest? <foo>undefined === mod; // clearest non-var version?

ios - FMDB Infinite loop due to sqlite3_step and while (retry) -

i have fmdb executeupdate cause infinite loop : fmdatabase *db = [fmdatabase databasewithpath:[cddbmanager getdatabasepath]]; [db closeopenresultsets]; [db close]; nslog(@"successfully pass closes"); [db open]; nslog(@"successfully pass open"); [db settraceexecution:yes]; bool success = [db executeupdate:@"insert or replace player (id, ..., is_user) values (?, ..., ?)", [nsnumber numberwithint:self.player_id], ... [nsnumber numberwithint:1]]; nslog(@"end update"); [db close]; i call method in 2 different vcs , in 1 work ... in other have infinite loop (i print retry in "do{} while()" of fmdb), don't see "end update" ... see, try close result sets , and db ... anyone can see i've failed ? all suggestions welcome. i think had same problem. opening connection every method wanted call database. fixed opening connection on init.

Issue with Chrome calling cross domain jsonp resource via jQuery ajax -

solved - adblock plus i have cross-domain oauth scenario i'm calling oauth protected jsonp resources on 3rd party api directly javascript. the client relies on server (the site of origin) generate signed request urls oauth resources on provider. client gets these oauth resources directly in attempt limit oauth proxy duties of server generating signed resource urls , letting js rest. here's js: mynamespace = { callapi: function(signedrequest, callback) { $.ajax({ url: signedrequest, datatype: "jsonp", type: "get", crossdomain: true, jsonp: false, jsonpcallback: callback, cache: true, async: true }); }, userscallback: function(jsonp) { alert(jsonp); }, getoauthresource: function(resource, callback) { $.ajax({ url: "/getsignedrequest?resource=" + encodeuricomponent(resource + "...

android - how can I prevent activity label from changing when rotating -

i use settitle change activity label on runtime. every time when rotating phone, activity label changes initial state. how can prevent this? write following in activity declaration in manifest file android:configchanges="orientation" it prevent activity restarted when orientation changed. edit: from so answer suggested use following newer api android:configchanges="keyboardhidden|orientation|screensize"

formatting - Automatically Break/Merge Lines in Vim -

i'm creating document in latex , lines broken @ 80 characters. easy manually when writing new text, editing of old text leads lines longer or shorter. fixing leads other lines need changed , on. is there automatic way in vim break lines after 80 characters , merge them if possible? to make lines 80 characters long can use textwidth assuming latex file has extension .tex can add following line vimrc autocmd bufreadpost *.tex setlocal textwidth=80 to format current paragraph can use gqap

sql - Select Query Joining 3 Tables -

i've 3 tables personel : id, name department : id, name match_dept_per : dept_id, pers_id, workinfo foreign keys : dept_id --> department.id pers_id --> personel.id example data : personel : 1, emir civas 2, sercan tuncay department : 1, sales 2, planning match_dept_per : 1,1,manager what i'm trying is, listing peoples names, department names , workinfos like: id | pers. name | dept name | work info --------------------------------------- 1 | emir civas | sales | manager i can simple select query: select p.id, p.name, d.name, m.workinfo personel p, department d, match_dept_per m p.id = m.pers_id , d.id = m.dept_id; here sample fiddle of schema , query. however need display other persons id's not inserted match_dept_per table. , set "unknown" null values. like: id | pers. name | dept name | work info ------------------------------------------ 1 | emir civas | sales | manager 2 | sercan tuncay | unk...

api - How to perform an AJAX image search on my site using Google? -

i want implement on website allows users search image (via google) use profile image. instance, want able search "frog", display bunch of frog images (from google image search), , allow user select 1 use (grabbing url of image). so, assume i'm looking api callable via ajax search , receive json search results. possible google or non-google search engine? note: looking search entire web (not content on own site). google search api looking https://developers.google.com/custom-search/v1/overview it supports image search.

javascript - Load list of images in sequential order -

i'm working on website uses expressionengine create list of images img1, img2, img3 etc id , creates array sources imgaddresses[1], imgaddresses[2], imgaddresses[3] etc. i'm attempting create function loads first image, (when first loaded), load second, third etc. following have far: function loadimage(counter) { var = document.getelementbyid("img"+counter); if(counter==imgaddresses.length) { return; } i.onload = function(){ loadimage(counter+1) }; i.src = imgaddresses[counter]; } document.onload=loadimage(0); it works when refreshing page, not when accessing page via url. far can tell research, because onload event not fired when cached image loaded, , refreshing page clears cache, whereas accessing page via url not. research suggests assigning src of image after declaring onload event around this, not seem have solved in case. thinking may because onload event recursive in case. does have ideas on how make sure browser loa...

Vtune report Outside any known module -

i using intel(r) vtune(tm) amplifier xe 2013 update 5 (build 274450) linux application hotspot collect, report says "[outside known module]" consume of time, want more info unknow module. when read release notes of vtune amplifier, says "list of hotspots may contain "outside known module" on systems kernel older 2.6.20 (200233501)", linux kernel "2.6.32", idea this? check program not generating code on fly (i.e. not jit-ing). may want switch grouping "module / code location / call stack" , see virtual addresses cannot mapped vtune known module.

php - Page loads only half of the page -

i don't know happened here php code faulty. page has 5 webinars in it: http://veteducation.com.au/webinar/ the problem 1 webinar shown on first time load when refresh it, other 4 webinar shows up. why page loading 1 webinar on first time load , 4 webinar when refreshed? want see 5 webinar on first time load. please me this. <?php $args = array( 'post_type' => 'webinars', 'orderby' => 'modified', 'posts_per_page'=>-1 ); $loop = new wp_query( $args ); if ( $loop -> have_posts() ) : while ( $loop -> have_posts() ) : $loop -> the_post(); ?> <?php include( templatepath."/"."includes/class.common.php" ); $classobj = new common_class(); ?> i loaded in ie, chrome, , opera showed 5. sounds browser aggressively caching version 1 webinar loaded , loading page when press refresh. try clearing browser cache o...

Undefined variable error while performing numerical integration in MATLAB -

for matlab question, need integrate fun2 = @(x) 1/(sigma2*(2*pi)^(.5))*exp(-.5*((x-xbar2)/sigma2)^2) , sigma2=50 , xbar2=1500 . the area under curve should 0.05, set solve(integrate(fun2,-inf,u)==.05,u) error "undefined function or variable 'u'." what can make work? so here go: syms x u fun = int(1./(50.*(2.*pi).^(.5)).*exp(-.5.*((x-1500)./50).^2),-inf,u) - .05; double(solve(fun,u))

c - Bitwise Concatenation -

i have following: char *pointer = decimal_to_binary(192) // yields 11000000 char *pointer2 = decimal_to_binary(168) // yields 10101000 i trying concat them into: 1100000010101000 i referencing: concatenate binary numbers of different lengths , using: unsigned long pointer3 = (*pointer << 16) | *pointer2; which gives output: 1100010000000000110001 what doing wrong? you don't show how print anything, makes difficult interpret question. however, statement irretrievably broken in nothing concatenate strings pointed @ pointer , pointer2 : unsigned long pointer3 = (*pointer << 16) | *pointer2; this takes first character pointer points @ (a 1 ) , shifts value left 16 bits, , adds (ors) in first character pointer2 points @ (another 1 ), , assigns integer format misnamed pointer3 . thus, gets value: pointer3 = 0x00310031; the question takes interpretation, making plausible (but not accurate) assumptions, code might you're after: #...

java ee - How to add a ItemSorter to a table container in Vaadin? -

i have container class extends beanitemcontainer. want add itemsorter date_created attribute sort values in descending order. container class. public class notecontainer extends beanitemcontainer<casenote> implements serializable { private static final long serialversionuid = -5926608449530066014l; public static final string date_created = "datecreated"; public static final string created_by = "createdby"; public static final string text = "text"; public static final string action = "action"; public static final object[] natural_col_order = new object[] { action, date_created, created_by, text }; public static final string[] col_headers_english = new string[] { "action", "date created/updated", "created/updated by", "note" }; /** * default constructor. * */ public notecontainer() { super(casenote.class...

web applications - How to expand single user WebApp to multiple users -

there similar threads without concrete solution , thought better start new one. i facing situation have webapp hosted in resin (just tomcat guess). far have been developing app using db4o since i'm alone , needed complete app asap, have db users , db app data single user (me), app done i'm move postgresql , thinking db per user if db holds data multiple apps since handle kinda confidential data , thought having separate db best (security wise). there rudimentary session management stores user data id in browser. wondering how can expand multiple users/db. i thinking expand listener class keeps context data pass right db object app instance, or maybe set filter purpose. .update. i wanted give more insight of have. i have: context holds reference objects, 1 of objects connects db , checks user , password. presentation servlet (httpservlet) mapped "/" has login form post /login. login servlet (httpservlet) mapped "/login" checks httpsession ...

Static compile .groovy by default using maven -

i using maven compile .groovy in our project my pom.xml is <plugin> <artifactid>maven-compiler-plugin</artifactid> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>utf-8</encoding> <compilerid>groovy-eclipse-compiler</compilerid> <verbose>true</verbose> <compilerarguments> <configscript>/tmp/aa.groovy</configscript> </compilerarguments> <fork>true</fork> </configuration> <dependencies> <dependency> <groupid>org.codehaus.groovy</groupid> <artifactid>groovy-eclipse-compiler</artifactid> ...

actionscript 3 - Evaluating whether ComboBox.SelectedIndex is greater than -1 (no selection) in AS3 -

i want evaluate if user has selected in combobox can magic new combobox below that. read elsewhere selectedindex value -1 equivalent combobox being untouched user based assumptions on this. here code: function displaycarbs(event:mouseevent):void { _ingredientwizard.visible = false; _categorycarbs = new categorycarbs(); addchild(_categorycarbs); 'positioning' _categorycarbs.x = stage.stagewidth / 2 - _categorycarbs.width / 2; _categorycarbs.y = stage.stageheight / 2 - _categorycarbs.height / 2; _categorycarbs.btn_goback.addeventlistener(mouseevent.click, addnewingredient) addchild(mycombobox); mycombobox.prompt="choose carbs"; mycombobox.x= _comboboxxposition; mycombobox.y = _comboboxyposition; mycombobox.width = _comboboxwidth; mycombobox.height = _comboboxheight; mycombobox.dataprovider = new...

php - checking json array with my value to do operation otherwise other operation -

consider have json array this ["map14","map20","map21","map22","map23","map24","map25","map31","map32","map33","map34","map35","map36","map37","map40","map41","map42","map46","map49","map50"] with json array need check if passed value exists need operation or otherwise other operation.... javascript code: function pop(e,id) { $.getjson( 'layoutcheck.php', { some_get_var: 1 }, function(output){ var i=0, total = output.length; ( = 0; < total; ++i ) { if(isarray(output[i]==id)) { // soome stuff if value exists in database } else{ // if not exists other operation } } }); } </script> layoutcheck.php fetch information database , create json array.. but code fails display output.. please rectify me .. thanks isarray(...

java - Map reducing algorithm -

how can reduce map<integer, list<integer>> ? let reduce 'd map map each integer value of list<integer> unique , not duplicated. example: map a: 0 --> (0) 1 --> (1, 2) 2 --> (2, 1) would reduce to: 0 --> (0) 1 --> (1, 2) or 0 --> (0) 2 --> (2, 1) notice either deletion of key 1 or 2 acceptable since produces reduced map. edit : when element maps itself, should remain separate, such 0 --> 0 . however, when multiple values have integer's in common, should merged. try this class reducedmap extends hashmap<integer, list<integer>> { private set<set<integer>> set = new hashset<set<integer>>(); @override public list<integer> put(integer key, list<integer> value) { set<integer> set = new hashset<integer>(value); if (!this.set.add(set)) { return new arraylist<integer>(set); } ret...

javascript - Node.innerHTML giving tag names in lower case -

i iterating nodelist node data, while using node.innerhtml getting tag names in lowercase. actual tags <panel><label>test</label></panel> giving as <panel><label>test</label></panel> i need these tags is. possible regular expression? using dojo (is there way in dojo?). var xhrargs = { url: "./user/"+runtime.username+"/ws/workspace/"+workbench.getproject()+"/lib/custom/"+(first.type).replace(".","/")+".html", content: {}, sync:true, load: function(data){ var test = domconstruct.todom(data); dojo.foreach(dojo.query("[id]",test),function(node){ domattr.remove(node,"id"); }); var childele = ""; dojo.foreach(test.childnodes,function(node){ if(node.innerhtml){ ...

caching a query that changes infrequently in Coldfusion/cfWheels -

i'm looking @ cache function in findall function of cfwheels. i'm little apprehensive using it. queries not taking long absolutely need them, bit of speed boost welcome. i'm getting 10ms queried cache otherwise takes 100ms. thing i'm wondering when entry changes, i'd cache cleared on next run. doesn't seem there's mechanism or flag in framework allow that, i'd have set , clear flags myself, end having read database anyway. hoping set cache full day , update when needed, horribly misguided? i'm not going go down road of developing of functionality allow caching application, curious if worth while revisiting. more precisely whenever make new entry in database, use cfhttp tag reload application.

How to Get CMake to Use Default Compiler on System PATH? -

currently, invoke cmake build directory follows: cxx="/opt/gcc-4.8/bin/g++" cmake .. to cmake use particular compiler. otherwise uses operating system default compiler. my path has " /opt/gcc-4.8/bin " in front of else. so, instead of prepending environmental variable there way specify in "`cmakelists.txt" file use default g++ on path? cmake honors setting of path environment variable, gives preference generic compiler names cc , c++ . determine c compiler used default under unix cmake, run: $ cc to determine default c++ compiler, run: $ c++ if generate symbolic link c++ in /opt/gcc-4.8/bin points /opt/gcc-4.8/bin/g++ , cmake should use gcc 4.8 default.

jquery - jsp select option dynamically from a database -

i have table called students in mysql database in class, student name,...etc., exists. i want use select options in jsp such if , if class selected first, after selecting class, student names of particular class should displayed in select drop down automatically(dynamically) retrieving records database. here want use servlet database connection , access database records through jsp getattribute() <select>class <option>1</option> <option>2</option> ..... </select> <select>student <option>1</option> <option>2</option> ..... </select> use ajax call retrieve data when change "class" combobox (pass class name 1st combobox) , populate 2nd student combobox returned data.

asp.net - TinyMCE value not updating -

i have tinymce bound textbox inside updatepanel. have set value code behind after loading page in browser update tinymce textbox value , when submit form, not getting updated value in code behind, getting old value only. help added following javascript in submit buttons onclick: tinymce.triggersave();

sockets - File Management Server in JAVA -

i have application(swt) need manage file @ server end. managing mean 3 things, writing contents file, applying read/write lock mechanism , displying same in textarea . need create multithreaded server achieve application(which eclipse based plugin) accepts multiple users . i'm new client-server thing , socket programming , i've read few tutorials still havent found optimum solution it. not need code(there plenty on internet), rather need way or steps it. thanks. also, found server code works fine. not displaying desired results. what rellay want file maintain author's name. revision number , related destils svn on server side. server program: public void onserver() throws exception { string sentbyclient; string line1 = null; serversocket socket = new serversocket(6789); while(true) { system.out.println("listening..."); socket connectionsocket = socket.accept(); bufferedreader infromclient = ...

python - getting Type error when i call a function -

i new python , using wxpython gui. few lines of code is: def __init__(self): panel=wx.panel(self, -1) but1 = wx.button(panel, " name", pos, size) self.bind(wx.evt_button, self.click, but1) def click(self, event): subprocess.call(" **************", shell=true) and getting type error: traceback (most recent call last): file "create.py", line 122, in <module> build().show() file "create.py", line 59, in __init__ self.bind(wx.evt_button,self.click,but1) file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 3918, in bind event.bind(self, id, id2, handler) file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 3992, in bind target.click(id1, id2, et, function) typeerror: connect() takes...

iphone - Can I release an update to the app store with "Build Active Architecture Only" set to "Yes"? -

i accidentally submitted build app store "build active architecture only" (only_active_arch) set "yes". phone archiving 3gs. mean phones other architectures, iphone 5 armv7s, won't able run app? if choose "build active architecture only" yes, speed building time, build current architecture. when build release, please set no

mysql - error in trigger creation also how to optimise it -

please tell me whats wrong code. not able fine bug delimiter $$ create trigger update_status before update on listing_basic_new_updated each row if new.processing_status not null begin set new.rep_status = new.processing_status; end; elseif new.televeri_status not null begin set new.rep_status = new.televeri_status; end; elseif new.verification_status not null begin set new.rep_status = new.verification_status; end; end if; end$$ delimiter ; i think you're missing begin match end @ end: delimiter $$ create trigger update_status before update on listing_basic_new_updated each row begin if new.processing_status not null begin set new.rep_status = new.processing_status; end; elseif new.televeri_status not null begin set new.rep_status = new.televeri_status; end; elseif new.verification_status not null begin set new.rep_status = new.verification_status; end; end if; end$$ ...

Add link to top menu using xml magento -

i try add custom link top menu using xml didn't work.i used code before , work fine stuck it.my xml code : <default> <reference name="top.links"> <block type="articles/links" name="articles"/> <action method="addlinkblock" ><blockname>articles</blockname></action> </reference> <reference name="footer_links"> <block type="articles/links" name="articles"/> <action method="addlinkblock"><blockname>articles</blockname></action> </reference> </default> and block code : class my_articles_block_links extends mage_core_block_template { protected function _tohtml() { $html =''; if(mage::helper('articles')->getarticlesenable()){ ...

c# - Generics and types values in my method show error -

i'm trying write generic method, , code below gives errors. cannot convert type ' t2 ' ' t1 ' ' t1 ' not contain definition 'action' , no extension method 'action' accepting first argument of type ' t1 ' found (are missing using directive or assembly reference?) private list<t2> fillchildcontrolonsave<t1, t2>( ref t1 objentity, ref list<t1> _entityparent, ref list<t2> _entitydetail) { foreach (t2 c in _entitydetail) { if (c.action == xerp.entity.actionmode.add) objentity.plnbomdetails.add(c); var tmp = objentity.plnbomdetails .where(p => p.bomdetailrecordid == c.bomdetailrecordid && p.bomid == c.bomid && p.isdeleted == false) .firstordefault(); if (tmp != null) if (c.action == entity.ac...

asp.net - Display large amount text on mouseover -

i'm using pop-up tooltip: http://www.dynamicdrive.com/dynamicindex16/showhint.htm so whenever mouse-over [?] sign, message appears. in script provided: <a href="#" class="hintanchor" onmouseover="showhint('please choose username. should consist of alphanumeric characters only.', this, event, '150px')">[?]</a> i meant enter text display in pop-up within showhint function shown above. my problem have large amount of text display (i.e. half page of word document size) , need arranged breaks between paragraphs. when put chunk of texts within first parameter of showhint function, doesn't work. how tooltip display long message appropriate breaks etc? thanks! the "show hint" script using seems accepting html tags inside - can put text in paragraph <a href="#" class="hintanchor" onmouseover="showhint('<p>please choose username.</p><p>sho...

sql server - Convert Tsql query result from rows to column names with other rows as column data -

i use query result : declare @mag int = 237006 ;with res ( select mnf.filetypeid magtype, mnf.insertdate magdate, mnf.star, nl.logtype, nl.insertdate logdate magazinenumberfiles mnf left outer join nomags_log nl on nl.magazinenumberid = mnf.magazinenumberid mnf.magazinenumberid = @mag ) select * res result of query is: magtype magdate star logtype logdate 2 2013-04-13 * 7 2013-04-16 6 2013-04-14 * 3 2013-04-17 8 2013-04-15 null null null i want convert result : magtype2 magstar2 magtype6 magstar6 magtype8 magstar8 logtype7 logtype3 2013-04-13 * 2013-04-14 * 5 null 2013-04-16 2013-04-17 how can using tsql ? you can, ugly dynamic sql: declare @sql nvarchar(max) = ''; select @sql = 'select ' + stuff((select ',''' + convert(varchar,magdate) + ''' magtype' + conver...

Versioning support in Google Cloud Storage from Java? -

previously asked 1 question regarding building document management system on top of gae using google cloud storage document management system using google cloud storage . think got appropriate answers it. question extension of same. question is: can handle versioning through java code mention in link (developers.google.com/storage/docs/object-versioning) listing versions of object, retrieving specfic version of object etc. since found list api's listing, deleting objects , doing several operations on google cloud storage can handle version through api's provided same java? thanks in advance. as google cloud storage doc states ( https://developers.google.com/storage/docs/developer-guide ) stored objects immutable. i.e. can delete object after storing , store new one, same name. so have versioning can organize data in pseudo folders. like: bucket/file-name/version-1; data/file-name/version-2 etc. need add bl handle versions (access recent 1 when needed, dele...

uniqueidentifier - Android Unique Serial Number -

i developing android application targets android 4.0 (api 14) , above. i looking serial number unique per device , persists ever (dies device, not change after factory resets). i have found lots of results on web concerning unique identifiers android devices, little on android.os.build.serial number. so far, eliminated use of android_id because might change after factory resets. eliminated use of imei because android device might non-phone. cannot use wifi or bluetooth mac address because device might not have such hardware and/or such mac addresses might not readable if hardware not enabled (based on found on web). i believe might go android device serial number. it accessible using android.os.build.serial (since added in api level 9 , not need additional permission). my questions : taking consideration application targets android 4.0 (api 14) , above, android.os.build.serial number android devices unique each device ? currently, documentation of android.os.b...

Application behaviour changed with Android 4.1(Jelly Bean) -

i have application consist of listview , each row open activity inside activity there button when pressd open activity gallery , i used large sized high resolution images in res -> drawable , test in 2 devices : first one galaxy pocket duos running ginger bread 2.3.6 , working ok slow in scrolling list app function working . second one galaxy s 3 running jelly bean 4.1.2 , ( used large sized high resolution images in res drawable ), app open show list freezed cant scroll list , if try scroll getting out app ( app closed ) return mobile home screen without force close , then changed image small sized low resolution images worked fine in galaxy s3 . i expect opposite freeze on galaxy pocket duos rather galaxy s3 because low specification galaxy s3 . any solutions problem appreciated. my manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package=...

angularjs - How to make multiple click by using Angular e2e? -

i'm writing e2e tests i'm using grid. while i'm trying make single selection grid, works fine. element('#wrapped_grid .item-id-2 .slick-cell').click(); but couldn't figure out how simulate multiple selection, (combination of click + ctrl key) any ideas appreciated ! thanks. while don't of way simulate asked, consider "bypassing" ui simulate multiple selection directly on controller. in other words, directly invoke method on controller have handled user's multi select.

insert a value in a input field using selenium and phpunit -

<table id="regtable" class="gstable" cellspacing="0" cellpadding="0" style="margin: 20px auto 0px; width: 450px; padding: 5px; font-size: 12px;"> <tbody> <tr> <td width="50%">email address</td> <td> <input id="useremail" class="validate[required,custom[email]]" type="text" name="useremail" style="border: 1px solid rgb(187, 187, 187); box-shadow: 0px 0px 0px rgb(255, 255, 255);"> how can insert value in input field using selenium , phpunit? well question not precise assuming you've got selenium , phpunit installed , want know methods use this: $this->byid('useremail')->value('testmail@live.com'); that should insert text "testmail@live.com" in input filed id "useremail".

c# - Better way to install IIS7 programmatically -

i have webapp installer installs of prerequisites, includes iis 7 too. since iis doesn't come prerequisite in visual studio setup project, came following code install iis code (targeting windows vista , 7). private string configureiis7() { string output = string.empty; if (environment.osversion.tostring().contains("microsoft windows nt 5")) // windowsxp [with or without sp2] { messagebox.show("iis 6.0 not installed on machine. please install same , proceed installation or contact administrator","installer",messageboxbuttons .ok ,messageboxicon .warning); throw new system.exception("iis 6.0 not installed on machine."); } else { string cmdtoexecute; cmdtoexecute = "cmd /c start /w pkgmgr /l:log.etw /iu:iis-webserverrole;iis-webserver;iis-commonhttpfeatures;iis-staticcontent;iis-defaultdocument;iis-directorybrowsing;iis-httperrors;iis-httpredirect;iis-applicationdevelopment;ii...

dicom - Programming with GDCM in Windows and changing pixel data with VTK? -

i have 2 questions. first: haven't got definite documentation on how use gdcm library in windows. @ possible use gdcm library in visual studio in windows? if so, please provide me instruction how install library in visual studio? want change or add way gdcm command " gdcmimg " functions. second: have multiframe dicom images need modify pixels , keep tags(private or non-private) intact. have tried matlab, gdcm , dcmtk. in each case there problem. matlab can't change multiframe images runs out of memory. gdcm can't keep tags intact(i use " gdcmimg " command) , don't know yet how change functionality, dcmtk(i use " dcmodify " command purpose) can change single frame dicom images , mysteriously fails in case of multi-frame dicom images when images provided vendors. mean that, tried multi-frame dicom images made myself using matlab , change pixel data in using " dcmodify ", when try vendor provided multi-frame dicom image fails...

Scala 2.10 reflection, how do I extract the field values from a case class -

how can extract field values case class in scala using new reflection model in scala 2.10? example, using below doesn't pull out field methods def getmethods[t:typetag](t:t) = typeof[t].members.collect { case m:methodsymbol => m } i plan pump them into {field <- fields} { currentmirror.reflect(caseclass).reflectfield(field).get } methodsymbol has iscaseaccessor method allows precisely this: def getmethods[t: typetag] = typeof[t].members.collect { case m: methodsymbol if m.iscaseaccessor => m }.tolist now can write following: scala> case class person(name: string, age: int) defined class person scala> getmethods[person] res1: list[reflect.runtime.universe.methodsymbol] = list(value age, value name) and method symbols want.

java - In search of some guidance regarding HashMap -

i'm making sudoku solver program in java, uses backtracking , bruteforce solving algorithm. problem seem having when insert correct values in simple container, wrong values showing when try access class. hashmap has correct values in correct locations when print out inside insert method in sudokucontainer , (with for(int = 0 < dim; i++) + for(int j = 0; j < dim; j++) ) followed square[][] tmp = solutionshash.get(count) , system.out.println(tmp[i][j].getvalue()); . it's successful when use same for-loops right after solutions.insert statement in square class' fillinnremainingofboard() (followed square[][] tmp = solutions.solutionshash.get(count) , same system.out.println statement. the problem occurs when try same board class, can see in test() method in class. prints out predefined values(or nothing if board empty). difference use i.e. square[][] tmp = allsquares[0][0].solutionshash.get(wantednumber) , same before. mentioned, don't see why should m...