Posts

Showing posts from February, 2015

Qt internationalization and CMake: how to update *.ts and don't lose them -

i'm having cmakelists.txt in directory translation files ( *.ts ): set(translations lang_de.ts lang_en.ts ) find_package(qt5linguisttools) qt5_add_translation(qm_files ${translations}) set(qm_files ${qm_files} parent_scope) add_custom_target (translations depends ${qm_files}) it builds *.qm files specified *.ts . but want improve , 2 custom targets, won't built automatically. 1 appending new strings sources ts files, , 1 refreshing ts . last 1 update ts sources , remove obsolete strings ts . i've tried add after lines above: add_custom_target ( ts_append command qt5_create_translation(qm_files ${cmake_source_dir}/src/app ${translations} options -i ${cmake_source_dir}/src) ) add_custom_target ( ts_refresh command qt5_create_translation(qm_files ${cmake_source_dir}/src/app ${translations} options -no-obsolete -i ${cmake_source_dir}/src) ) but seems can't use qt5_create_translation macro inside custom target, isn't it? m

How to uninstall grails from Windows 7 -

i installed grails couple of years on laptop play with. since no longer use it, tried uninstall it. however, can't find way it. don't want delete folders since there environment variables , maybe registry entries worried about. correct way of uninstalling grails windows? on windows 7 correct manner remove installed version of grails is: delete directory/folder containing grails version. delete corresponding (if any) folder within c:\users\<your username here>\.grails directory/folder. remove (or update version) environment variable grails_home . can done through right clicking on my computer selecting properties clicking advanced system settings in left navigation. there click environment variables button , delete or edit grails_home variable in system variables listing. grails not create registry entries.

beautifulsoup - Extracting data from a web page using BS4 in Python -

i trying extract data site: http://www.afl.com.au/fixture in way such have dictionary having date key , "preview" links values in list, like dict = {saturday, june 07: ["preview url-1, "preview url-2","preview url-3","preview url-4"]} please me it, have used code below: def extractdata(): ldateinfomatchcase = false # ldateinfomatchcase = [] global gdict row in table_for_players.findall("tr"): ldaterowindex in row.findall("th", {"colspan" : "4"}): ldatelist.append(ldaterowindex.text) print ldatelist index in ldatelist: #print index lpreviewlinklist = [] row in table_for_players.findall("tr"): ldaterowindex in row.findall("th", {"colspan" : "4"}): if ldaterowindex.text == index: ldateinfomatchcase = true else:

python - Django 1.6 Profile pic not showing -

i'm trying display picture 1 of models in template, run following error. seems there error in views i'm not sure change. feel i'm passing right parameters it's not working. traceback: file "/library/python/2.7/site-packages/django/core/handlers/base.py" in get_response 114. response = wrapped_callback(request, *callback_args, **callback_kwargs) file "views.py" in showdocprofile 51. return render(request,'meddy1/docprofile.html',{'doctor': profile}) file "/library/python/2.7/site-packages/django/shortcuts/__init__.py" in render 53. return httpresponse(loader.render_to_string(*args, **kwargs), file "/library/python/2.7/site-packages/django/template/loader.py" in render_to_string 169. return t.render(context_instance) file "/library/python/2.7/site-packages/django/template/base.py" in render 140. return self._render(context) file "/library/

ios - addTarget:action:forControlEvents: ignored when interacting with separate UITapGestureRecognizer -

i'm new ios programming i have code (abridged) looks following uiview *somesubview = [[uiview alloc] initwithframe:...]; [self addsubview:somesubview]; [somesubview addtarget:self action:@selector(_handletaponview:) forcontrolevents:uicontroleventtouchupinside]; _tapgesturerecognizer = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(_handletap:)]; _tapgesturerecognizer.delegate = self; [self.view addgesturerecognizer:_tapgesturerecognizer]; unfortunately gesture recognizer triggers , views addtarget call not. i've tried commenting out gesture recognizer code , works, know not call addtarget on subview. i solved using gesturerecognizer:shouldreceivetouch: , doing hit test sub view, feel i'm missing fundamental understanding here wouldn't require me adding manual hit test. its important note don't want code in _handletap in _tapgesturerecognizer execute when have tapped on subview. any guidance here? thanks! try using:

angularjs - How does $timeout cause the afterSelectionChange function to be called? -

i'm trying here enough info go fix problem, wanting understanding going on inside angular. ng-grid has issues, lots of them, i've found "fix" 1 don't understand. i have grid enough rows fills visible area. if click on different rows, afterselectionchange method called. if after clicking in grid move focus arrow keys, calls callback if grid scrolls. so put in $timeout print out selected row every half second see if changing selected row , not calling callback, , fixed problem. every time move cursor keyboard, callback fires, though thing happening in callback $log.debug(). is because $timeout causing happen within framework $apply or $digest? if that's case, why isn't keyboard causing happen? edit: options @tassekatt $scope.callgridoptions = { data: 'callrecords', multiselect: false, sortinfo: {fields:['starton'], directions:['asc']}, columndefs: [ ... ], af

objective c - Syntax for passing “no options” to a parameter of type NSJSONWritingOptions -

in objective-c wrote code following: nserror *error; nsdata *jsondata = [nsjsonserialization datawithjsonobject:somedictionary options:0 error:&error]; i trying same thing in swift. prompting xcode’s syntax checking wrote this: var jsonerror: nserror let jsondata = nsjsonserialization.datawithjsonobject(somedictionary, options: nsjsonwritingoptions(), error: &jsonerror) but gives me error: “could not find overload init accepts supplied arguments.” think problem might nsjsonwritingoptions() bit, , i’m guessing have swift syntax wrong. tried replacing nsjsonwritingoptions() nsjsonwritingoptions(0) , got same error; tried replacing nil (as suggested this answer ) got error “could not find overload __conversion accepts supplied arguments.” how can indicate want default json writing options, whatever might be? the problem not nsjsonwritingoptions; type

sql server - Sql Comparison Operator inside XML node -

i have query inside node of xml file, , want know how use comparison operator example > without have trouble xml syntax <query id="some_query> if (sysdate > v_date ) //...do stuff <\query> is ok?

symfony - Convert Doctrine 2 result object (entity) to array? -

i know possible specify want array type instead of object type when run query doctrine. however, happen working code can't edit returns me result query object , want able convert array somehow. seems in older version doctrine used have toarray() can used. is there similar can use? no, doctrine 2 uses data mapper pattern , doesn't make assumptions php class. if class doesn't provide toarray() method explicitly, you'd need create array manually object's getter methods.

Cannot connect to Mysql using java jdbc Driver -

i building application in tomcat 7, using spring data , hibernate. have working on mac, when ported application on linux server, , changed configuration match mysql login, connection exception on tomcat startup. a couple differences between development environment (where works) , production environment(where doesn't work): -development mac, production linux -development mysql version: ver 14.14 distrib 5.6.16, osx10.9 (x86_64) using editline wrapper, production mysql version: ver 14.14 distrib 5.5.37, debian-linux-gnu (x86_64) using readline 6.2 hibernate.properties looks this: hibernate.dialect=org.hibernate.dialect.mysqldialect hibernate.connection.driver_class=com.mysql.jdbc.driver hibernate.connection.url=jdbc:mysql://localhost:3306/<dbname> hibernate.connection.username=root hibernate.connection.password=<root password> one weird thing on linux box, mysql doesn't show when typing netstat command, can log in command line no problem. when in mysql,

initialization - What's the use of expression.init() in Swift -

the swift programming language guide, page language reference -> expressions , section postfix expressions -> initializer expression talks syntax <expression>.init(<initializer arguments>) when use (apart self.init() , super.init() covered in other parts of grammar)? seems me in case above expression valid (and expression not self or super ), can do: <expression>(<initializer arguments>) while syntax template looks this: <expression>.init(<initializer arguments>) the grammar defines initializer-expression as: initializer-expression → postfix-expression . init­ note invocation arguments not included. matches constructs a.init , , necessary because init keyword, a.init not match explicit-member-expression (which requires identifier rather keyword member name). initializer expressions part of grammar because can invoke initializer belongs class not direct superclass of class writing ( c invokes a.init in examp

css - Stack bootstrap glyphicons -

Image
i'm using following bootstrap icon class="glyphicon glyphicon-plus" and want change color of button , use following want plus icon in circle ,how should that? i.glyphicon { color: white; } another icon package called font-awesome has better flexibility , feature of stacking icons together. bootstrap 3 containing glyphicons don't have options took out css font-awesome , adopted glyphicon. the html looks like: <span class="glyphicon-stack"> <i class="glyphicon glyphicon-circle glyphicon-stack-2x"></i> <i class="glyphicon glyphicon-plus glyphicon-stack glyphicon-stack-1x"></i> </span> the main css: .glyphicon-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .glyphicon-circle{ position: relative; border-radius: 50%; width: 100%; height: auto; padding-top: 100%; background: black; } .glyphico

java - Cannot convert value of type [com.sun.proxy.$Proxy32 ScopedObject -

i using spring batch, below configurations. <beans:bean id="symfonyjob" class="com.st.symfony.symfony" p:dir="${symfony.dir}" p:consolepath="${symfony.console.path}" p:strutil-ref="strutil" p:logfilepath="${batch.log.file.path}.#{jobparameters[batch_id]}" scope="step"/> <beans:bean id="importexchangesitemwriter" class="com.st.batch.foundation.importexchangesitemwriter" p:symfony-ref="symfonyjob" p:replytimeout="${import.exchanges.reply.timeout}" scope="step"/> <beans:bean id="importexchangesfileitemreader" class="org.springframework.batch.item.file.multithreadedflatfileitemreader" p:resource="file:${spring.tmp.batch.dir}/#{jobparameters[batch_id]}/exchanges.txt" p:linemapper-ref="stlinemapper" p:startat="#{stepexecutioncontext['startat']}" p:maxitemcount=&

php - Facebook signed request doesn't return user ID -

i adding facebook login codeigniter app (i integrating fb canvas app) using code presented here . app isn't open public yet, testing own account (which has "administrator" role app on fb). the problem is, not getting user id following code. in fact, i'm getting small portion of data should getting. here relevant part of code (found in libraries/facebook.php on git page above): public function getsignedrequest() { if (!$this->signedrequest) { if ($this->allowsignedrequest && !empty($_request['signed_request'])) { //this condition true $this->signedrequest = $this->parsesignedrequest( $_request['signed_request'] //long random-looking string, 180 characters ); } else if (!empty($_cookie[$this->getsignedrequestcookiename()])) { $this->signedrequest = $this->parsesignedrequest( $_cookie[$this->getsignedrequestcookiename()]); } } return $th

Python Tkinter ScrolledText -

i'm trying make tkinter entry box, need more space 1 line. seems self.scroll = scrolledtext.scrolledtext(self.tk).pack() is best looking way right now, dont know how inputted text self.scroll , use else, theres no clear documentation on either. know? mistake: self.scroll = scrolledtext.scrolledtext(self.tk).pack() this way assign pack() result self.scroll (not scrolledtext ) , pack() returns none . always: self.scroll = scrolledtext.scrolledtext(self.tk) self.scroll.pack() and see standard text widget documentation how get/set text. from tkinter import * import tkinter.scrolledtext scrolledtext master = tk() st = scrolledtext.scrolledtext(master) st.pack() st.insert(insert, "some text") st.insert(end, " in scrolledtext") print( st.get(1.0, end) ) master.mainloop()

javascript - image.src to large image freezes while loading -

i keep reading images loaded asynchronously, or use onload (which doesn't solve problem). when loading large image, canvas.todataurl() , whole page freezes while image being loaded. what i'm doing prerendering procedurally generated map (for game) in hidden canvas, loading data image draw faster. actual problem setting src, happens if img.src=img.src invoke loading again. is there way @ make large images load on time instead of @ once , causing huge disruption?

java - Login Directly second time -

i want create login page user login first time. when user want use app second time dont have encounter login page. code here loginpreferences = getsharedpreferences("loginprefs", mode_private); loginprefseditor = loginpreferences.edit(); savelogin = loginpreferences.getboolean("savelogin", false); if (savelogin == true) { name.settext(loginpreferences.getstring("username", "")); pass.settext(loginpreferences.getstring("password", "")); } login.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { name1 = name.gettext().tostring(); pass1 = pass.gettext().tostring(); //new thread (new task()).start(); loginprefseditor.putboolean("savelogin", true); loginprefseditor.putstring("username", name1); loginprefseditor.putstr

java - When I push the 'home' button, my app gets killed -

here's code: public class play extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(new mainsurfaceview(this)); } @override protected void onpause() { super.onpause(); } public class mainsurfaceview extends surfaceview implements surfaceholder.callback { private surfaceholder msurfaceholder; private drawingthread mthread; private bitmap background; public mainsurfaceview(context context) { super(context); msurfaceholder = getholder(); msurfaceholder.addcallback(this); mthread = new drawingthread(); background = bitmapfactory.decoderesource(getresources(), r.drawable.background); } @override public void surfacechanged(surfaceholder holder, int format, int width, int height) { } @override public void surfacecreated(surfaceholder holder) { mthread.keeprunning = true; mthread.start(); } @override public void surfacedestroyed(surfaceholder holder) { mthread.keeprunning = false; boolean retry =

par - Controlling inner figure margins in R -

Image
i must have changed in par() settings, cannot recall what. looks inner figure margins must have changed somewhere. obvious whenever add lines, using lines() , abline() , or points() functions during plotting. below image illustrate problem: the black solid line @ y=0 represents abline(h=0) . can see, line crosses plotting region. any ideas on how fix this? have tried multiple things, did not come solution problem yet. the answer problem given setting par(xpd=false) . thanks ben bolker.

javascript - Uncaught TypeError undefined is not a function when called outside of jQuery -

i'm trying figure out why when call setupcontrolbox within $.getjson call works (in if condition) if call else condition throws undefined error (i set opts.load_url false). call have encapsulated in $.somefunction()? // load existing form data if (opts.load_url) { $.getjson(opts.load_url, function(json) { form_db_id = json.form_id; fromjson(json.form_structure); opts.loaded(json); var controlbox = setupcontrolbox(opts.control_box_target); }); } else { var controlbox = setupcontrolbox(opts.control_box_target); }

Twilio answer button -

instead of having browser calls answered immediately, how create answer or decline message? have decline stop incoming call or send voicemail if setup. setup mute/unmute button , keypad entering numbers need if call placed automated system, don't see examples in docs or quick start. twilio.device.incoming(function (conn) { conn.accept(); }); you can prompt user call , give option accept or reject call, making use of connection.reject() function. <script type="text/javascript"> twilio.device.incoming(function (connection) { if (confirm('accept incoming call ' + connection.parameters.from + '?')){ connection.accept(); } else { connection.reject(); }); see mute , senddigits functions of connection: https://www.twilio.com/docs/client/connection

c++ - Getting country code for QLocale::Country -

i trying find country code given qlocale::country value. in manual have found function, similar: qlocale::name . qstring qlocale::name () const returns language , country of locale string of form "language_country", language lowercase, two-letter iso 639 language code, , country uppercase, two- or three-letter iso 3166 country code. the second part of return value need, have constructed following function: qstring getcountrycode(qlocale::country c) { return qlocale(qlocale::anylanguage, c).name().split('_').at(1).tolower(); } strangely enough, if call function following way: qdebug() << getcountrycode(qlocale::canada); it produce output: "us" i have expected "ca"! on other hand, if call like: qdebug() << getcountrycode(qlocale::hungary); then produce correct answer: "hu" what missing here? (i using qt 5.2) in general, given feature want isn't directly available, ple

firefox addon - Can js-ctypes use gecko api? -

so js-ctypes way have used it, calling winapi. use mozilla functions. possible? specifically i'm trying use 1 here: http://mxr.mozilla.org/mozilla-central/source/widget/windows/wintaskbar.cpp#244 you cannot call c++ stuff directly, exported or not, js-ctypes supports plain c abi. unfortunately there no common c++ abi anyway; each compiler uses it's own grant name mangling scheme , thiscall calling convention... however, if really, really, really, wanted working in mozilla-land, have @ glue code , - in theory @ least - used js-ctypes (although never seen done). in particular case, nwiwintaskbar.defaultgroupid will return verbatim result of wintaskbar::getappusermodelid , there no need go through js-ctypes in first place.

microcontroller - SONAR 6500 series -

i have program 6500 series sonar connected arduino micro controller scanning of room detect movement. codes need in c++. idea of codes used? new , stuck. there sonarsource commercial plugin analyzes c/c++ http://www.sonarsource.com/products/plugins/languages/cpp/ sonarsource website lists external c++ plugin http://docs.codehaus.org/display/sonar/external+plugins . won't support sonarsource team on plugin. if "new this", suggest define precisely objectives, according project strategy: want analyze code time time or want put in place whole process continuous integration (cms, build, testing, sca, ...). do not hesitate ask further precisions. regards.

mysql - Convert table with date range into list of dates -

this question has answer here: generate days date range 23 answers i have table called daterange looks this |id|datestart| dateend| | 1|14-may-14|16-may-14| | 1|20-may-14|21-may-14| | 2|20-may-14|21-may-14| which convert following format in table called datelisted |id| date| | 1|14-may-14| | 1|15-may-14| | 1|16-may-14| | 1|20-may-14| | 1|21-may-14| | 2|20-may-14| | 2|21-may-14| i have reviewed following question, convert date range individual days , however, data different hoping assist me? thanks. if have utility table of dates, it's easy... drop table if exists my_table; create table my_table (id int not null ,datestart date not null ,dateend date not null ,primary key(id,datestart) ); insert my_table values (1,'2014-05-14','2014-05-16'), (1,'2014-05-20','2014-05-21'), (2,'2014-05-20','201

ios - UIScrollView pass dragging to main view -

i have next trouble , hope give me advice handle it. i have page controller w/ vertical scrolling. inside of page view use few component 1 of them uiscrollview. in order scroll between pages should drag except uiscrollview, because scrollview catch events , prevent page controller them. so question, how possible pass drag event uipagecontrollerview uiscrollview. for example, when scroll content of uiscrollview reach top, pass dragging page controller change page. , vise versa, if reach end of content of uiscrollview next dragging handled pagecontroller change page. any advises appreciated. thanks. what want sounds awful lot pull refresh technique, pull down page latest tweets/facebook posts/lemon pie recipes/whatever. instead of refreshing, want event trigger segue new page. default built in 1 works uitableview there lot of libraries let use uiscrollview. here's example: http://mt.gomiso.com/2012/03/22/yet-another-pull-to-refresh-library/ you take them apar

c++ - Checking for a nested, templated class -

i'm trying build trait checks existence of nested, templated class. take checking whether class o has nested class inner template parameter t : template <typename o, typename t> struct has_inner { static const bool value = std::is_class<typename o::template inner<t> >::value; }; however, not work properly. given 2 example classes dummy , ok struct dummy {}; struct ok { template <typename t> struct inner { }; }; the check on ok std::cout << std::boolalpha << has_inner<ok, float>::value << std::endl; will work, whereas check on dummy std::cout << std::boolalpha << has_inner<dummy, int>::value << std::endl; will fail compile on clang 3.2 error error: 'inner' following 'template' keyword not refer template static const bool value = std::is_class<typename o::template inner<t> >::value;

How can I deal with an error of a line about Swift code in WWDC 2014 -

i followed wwdc 2014 session 403 write code in playground file: var onchange:(int)->void = {} but got error: 'int' not subtype of '{}' , why? line same 1 in video. the entire code is: class temperaturenotifier { var onchange:(int)->void = {} var currenttemp = 72 init() { onchange = { temp in self.currenttemp = temp } } } anyone knows reason? at least current version of swift have access to, i've found if have arguments in closure, kind of error pops up. in order fix it, have give close in syntax: class temperaturenotifier { var onchange : (int) -> void = {x in} var currenttemp = 72 init() { self.onchange = { temp in self.currenttemp = temp } } } it seems silly - since got code session video - bug in swift. should file bug report @ http://bugreport.apple.com .

javafx - How to send text from my text editor to a Processing-Sketch -

this question in reference earlier post (which put on hold). https://stackoverflow.com/questions/24091606/push-text-from-java-applet-to-processing-sketch i have developed own text editor multiple text editing areas in javafx. i allow user write multiple processing code/sketches, hit "run all" button run sketches in parallel. i trying find way automate steps of : for each text area in editor { -copy text -make new processing sketch -paste processing sketch created -run process sketch } this not right approach it, if is, not sure how implement it. looked @ examples here on using robot. can java program "type" windows program notepad but not seem work me. any ideas on how achieve this? i on windows 7, develop solution cross platform if possible. your idea having editor gui interact processing gui is... messy. , unreliable. guis meant human interaction, not automatic interaction, , there's better way want. the proces

How to add a sub document to sub document array in MongoDB -

i have collection in mogodb this: { "_id" : objectid("5393006538efaae30ec2d458"), "username" : "shiva", "userunderapikey" : 123456, "groups" : [ { "groupname" : "default", "groupmembers" : [ ] } ] } i want add new group in groups array sub document, below { "_id" : objectid("5393006538efaae30ec2d458"), "username" : "shiva", "userunderapikey" : 123456, "groups" : [ { "groupname" : "default", "groupmembers" : [ ] }, { "groupname" : "family", "groupmembers" : [ ] } ] } how insert new sub document in array of sub documents.any appriciated to add new member array use $push would: db.collection.update( { "_id": objectid("5393006538efaae30ec2d458") }, {

How to disable internet access for particular application in android -

i want know how disable internet particular application, please suggest me how achieve because many application given type of feature it depends if asking control in app writing or in 3rd party app on device for 3rd party apps: android 4.3 had permission manager allowed adjusting permissions individually installed apps. feature pulled (google said released mistake) android 4.4 , no longer available. similar feature might available on vendor-specific/un-official roms. for apps write yourself: need add proper permissions ( android:name="android.permission.internet ) access network. without app not able make network traffic.

jquery - Popup doesnt show when using mysqli -

i'm creating form, results should showed in popup. the query works, when combine popup doesn't. when use popup script alone doesn't show popup. so quess problem popup. //javascript $main .= '<head> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> </head>'; //end javascript - //script <script> $(document).ready(function() { $("#dialog").dialog({ autoopen: false, show: { effect: "blind", duration: 1000 }, hide: { effect: "explode", duration: 1000 } }); $("#select-button").click(function() { $( "#dialog" ).dialog( "open" ); }); }); </script> - //form

sprite kit - Spritekit - Spawn waves of monsters -

i'm making simple racing game in monsters spawned (randomly) 3 out of 5 lanes in portrait mode. -(void)addenemy { skspritenode *enemy; enemy = [skspritenode spritenodewithimagenamed:@"enemy1"]; [enemy setscale:.65]; enemy.physicsbody = [skphysicsbody bodywithrectangleofsize:enemy.size]; enemy.physicsbody.categorybitmask = obstaclecategory; enemy.physicsbody.dynamic = yes; enemy.zposition = 2; enemy.physicsbody.contacttestbitmask = turtlecategory; enemy.physicsbody.collisionbitmask = 0; enemy.physicsbody.usesprecisecollisiondetection = yes; enemy.name = @"enemy"; //selecting random y position enemy int r = (arc4random() % 5) ; enemy.position = cgpointmake(48+r*56,self.frame.size.height); [self addchild:enemy]; skaction *actionmove = [skaction moveto:cgpointmake(enemy.position.x,-80) duration:1.43]; [enemy runaction:actionmove]; skspritenode *enemy2; enemy2 = [skspritenode spritenodewithimagenamed:@"enemy1"]; [enemy2 setscale:.65];

java - Any alternate to RSyntaxTextArea in Javafx? -

i working on code editor java used in parallel computing , distributed computing. i'm looking alternate rsyntaxtextarea in javafx, bcz tried implement in javafx , not working well, half of text area doesn't show , cursor lags in text area. tab texttab = new tab("sample tab"); rsyntaxtextarea ta= new rsyntaxtextarea(); swingnode sn = new swingnode(); string text=""; ta.settext(text); ta.setsyntaxeditingstyle(syntaxconstants.syntax_style_java); ta.setantialiasingenabled(true); ta.setcodefoldingenabled(true); rtextscrollpane sp = new rtextscrollpane(ta); sn.setcontent(sp); texttab.setcontent(sn); i newbie in javafx, don't know how fix these issues. doesn't match beauty of javafx. try codearea (or more styleclassedtextarea ) component tomas mikula's richtextfx framework.

jquery - display tables row according to drop down value -

i want increase or decrease rows of table selecting number of rows drop down for example if have select 25 drop down table show first 25 rows only i want use plugin . not know how can use this this code jsfiddle $('#nrows').change(function(){ rows = $(this).val(); alert(rows + ' number of rows displayed using plugin' ); $('#table').datatable(); }); please tell me how can display selected number of rows if you're doing @ initialization, you'd use pagelength property : $('#nrows').change(function () { rows = $(this).val(); $('#table').datatable({'pagelength':rows}); }); jsfiddle: http://jsfiddle.net/wmfax/4/ that being said, work first time initialize datatable; after that, you'll want update page length via api , redraw table. if try use above more once, you'll error stating "cannot reinitialise datatable" after second time toggle nrows dropdown. here quick &

reporting services - Error : Cannort create a connection to Data Source 'XYZ' in SSRS -

Image
i have deployed ssrs report user.but while accessing report report server user getting below error but , of users able access same report,please suggest me.do need add him in security thanks in advance the user connecting report needs have access database data source is. can use stored credentials if level of database access not important. you can instead add them user group has read access database instead of giving them direct access etc. this depends on security need in database. below can see how setup report server connection: report server connection

bitbucket server - How re-push a fixed commit on Git? -

i fixed code , pushed incorrect commit message. when tried fix commit message, accident reverted commit. situation now: latest commit = correct commit message, changes of previous commit undone previous commit = correct commit content, wrong commit message all of has been pushed server. i rid of latest commit, change commit message of previous commit , push server. i'm happy solutions atlassian source tree command line okay. if it's last commit, it's easy: git commit --amend this brings editor last commit message , lets edit message. (you can use -m if want wipe out old message , use new one.) and when push, this: git push --force <repository> <branch> reference: changing git commit message after push (given no 1 pulled remote)

php - Join and rename on multiple column in less queries -

i developing little site use mysql database server, i'm stuck on problem. i have table contains user, called "user", user contain 3 columns, "username", "avatar" , "user_id" now have second table, called "wedding", contains 6 columns: user_id of 4 different users (called mid1, mid2, tid1 , tid2), wed_id, , wed_date. my purpose in single query (the number of queries of site limited, that's why want use minimum amount of queries) data of wedding row, , user_name , avatar of 4 user referenced in wedding, , avoid duplication, have username of first user username1, second user username2 , on, , same things avatar. first don't know if it's possible, that's why i'm stuck on how query be, if know how create such queries i'll him lot! select wed_id, wed_date, user1.username username1, user1.avatar avatar1, user2.username username2, user2.avatar avatar2, user3.username username3, user

php - Setting up control system for website -

i have been working on website using wordpress. far have been using ftp , wordpress editor make changes code etc. have brought on few members assist me changing code, , wondering best way control changes. know git can used sort of stuff, how can make can't make changes server without going through git? --thanks don't give access server, handle access through git. you set post-commit hook copies updated files server / pulls them repository server. see example question: simple git post-commit hook copy committed files folder

ruby - Get full path of file_field image in rails -

i trying full path image uploading rails file_field helper. %h4 upload image .col-sm-8 =label_tag "upload image" .col-sm-4 =form_tag(controller:"images", :html => {:multipart => true}) =select("app", "app", ["#{rails.env}_thing", "#{rails.env}_otherthing"], {include_blank: true}) =file_field :post, :image %button.btn.btn-primary.btn-block{:type => "submit"} ="upload image" when hits controller action params are: {"utf8"=>"✓", "authenticity_token"=>"kvf52okmdkqpte/ja99r33213123210wrklc2umhgdm=", "app"=>{"app"=>"development_thing"}, "post"=>{"image"=>"picture.png"}, "html"=>{"multipart"=>"true"}, "action"=>"create", "controller"=>"images"} what want though full path of

Undefined symbols for architecture armv7 IOS 7 -

this question has answer here: error using regexlitekit draw rout on mapview 6 answers hi i'm trying create route map in application got classes file implement route map have imported project after importing giving issue showing error this. undefined symbols architecture armv7: "_uregex_end", referenced from: _rkl_performregexop in regexkitlite.o _rkl_search in regexkitlite.o _rkl_findranges in regexkitlite.o "_uregex_appendreplacement", referenced from: _rkl_replaceall in regexkitlite.o "_uregex_groupcount", referenced from: _rkl_getcachedregex in regexkitlite.o "_uregex_appendtail", referenced from: _rkl_replaceall in regexkitlite.o "_u_strlen", referenced from: _rkl_userinfodictionary in regexkitlite.o "_uregex_reset", refe

php - How can call a page on submit using ajax? -

i want create chat room in php using ajax. therefore want call page clicking on submit. have 2 pages chat.php , getchat.php. wrong , how can call getchat.php . have try function not working. please me. chat.php <script> function showuser() { xmlhttp.open("get","getchat.php",true); xmlhttp.send(); } </script> <form onsubmit="showuser(this.value)" method="post"> <label>name :</label> <input type="text" name="username" /><br /> <textarea name="message"></textarea> <input type="submit" name="submit" /> </form> getchat.php <?php $con = mysqli_connect('localhost','root','','ajax'); if (!$con) { die('could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"ajax_demo"); $sql="select * chat"; $result = mysqli_query($con,$sq

groovy - Split an XML file into multiple files -

suppose have following xml file: <a> <b> .... </b> <b> .... </b> <b> .... </b> </a> i want split file multiple xml files based on number of <b> tags. like: file01.xml <a> <b> .... </b> </a> file02.xml <a> <b> .... </b> </a> file03.xml <a> <b> .... </b> </a> and on... i'm new groovy , tried following piece of code. import java.util.hashmap import java.util.list import javax.xml.parsers.documentbuilderfactory import org.custommonkey.xmlunit.* import org.w3c.dom.nodelist import javax.xml.xpath.* import javax.xml.transform.transformerfactory import org.w3c.dom.* import javax.xml.transform.dom.domsource import javax.xml.transform.stream.streamresult class file_split { file input = new file("c:\\file\\input.xml") def dbf = documentbuilderfactory.newinstance().new

How to recieve the output of a command in Net::Telnet perl -

here code use net::telnet (); $remote = new net::telnet (timeout => 30, prompt => '/>/'); $remote->open("router1"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->waitfor('/mr-ferx2>/'); $remote->close(); i trying log router , give "sh hard" command. consistently error. "command timed-out @ telnetter.pl line 9" and if try instead "sh ver" command on second line use net::telnet (); $remote = new net::telnet (timeout => 30, prompt => '/>$/'); $remote->open("router1"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->cmd("sh hard\n"); print $remote->wa

distributed caching - AppFabric Cache Database configuration has 1GB size -

Image
i use appfabric cache sql server-based cluster configuration. the problem configuration database has grown 1gb size. the problematic table takes space in db 'configaudit'. full of entries values of column 'operation': updatenew, updateold, updatedtimestamps of each minute. i can not find information appfabric's cluster configuration database, nor audit of cache operations. cache works fine except problem. is there way audit turned off , or other solution make database smaller , not growing again? kind regards, charles. dbo.configaudit table used track changes on dbo.config table. diagnostics, , cannot changed via powershell commands. to turn off tracking, can disable triggers dbo.config table. example,

ruby - RSpec.configure not working and examples fails due to rspec-mocks#setup -

i'am started rspec 3 months ago , i'am working in sinatra project (using ruby 2.1.1) ... i don't have errors in specs (they're running in other computers) while running them on own got every single example ... failure/error: unable find matching line backtrace argumenterror: wrong number of arguments (0 1) # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-mocks-2.14.6/lib/rspec/mocks.rb:10:in `setup' # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/mocking_adapters/rspec.rb:17:in `setup_mocks_for_rspec' # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:337:in `run_before_example' # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:147:in `block in run' # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.0/lib/rspec/core/example.rb:299:in `with_around_example_hooks' # /home/vagrant/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.0/lib/rspec/core

amazon web services - AWS S3 Java SDK - Access Denied -

i trying access bucket , object using aws sdk while running code getting error exception in thread "main" com.amazonaws.services.s3.model.amazons3exception: access denied (service: amazon s3; status code: 403; error code: accessdenied; request id: x), s3 extended request id: y= kindly suggest, lacking , why access denied error occurring although have taken following permission bucket: s3:getobject s3:getobjectversion s3:getobjectacl s3:getbucketacl s3:getbucketcors s3:getbucketlocation s3:getbucketlogging s3:listbucket s3:listbucketversions s3:listbucketmultipartuploads s3:getobjecttorrent s3:getobjectversionacl code follows: awscredentials credentials = new basicawscredentials(accesskey, secretkey); clientconfiguration clientconfig = new clientconfiguration(); clientconfig.setprotocol(protocol.http); amazons3 conn = new amazons3client(credentials, clientconfig); conn.setendpoint(bucketname); bucket bucket = conn.createbucket(bucketname); o