Posts

Showing posts from September, 2014

wpf - Where should the crud logic be implemented in mvvm? -

in mvvm light application search in customer list. search narrows customer list displayed in master/detail view datagrid (the master customersearchresultview) , separately defined usercontrol firstname, lastname, address etc, etc (the detail - customersearchdetailview). here main content of master/detail view: <stackpanel minwidth="150" > <textblock text="customer search result list" /> <grid> <datagrid name="customerlist" itemssource="{binding searchresult}" selecteditem="{binding selectedrow, mode=twoway}" > ..... </datagrid> </grid> <grid grid.column="2"> <textblock text="customer details" style="{staticresource heading2}" margin="30,-23,0,0"/> <content:customersearchdetail datacontext="{binding selected

ios - Responding to DELETE on UIKeyboardTypeDecimalPad -

this thing driving me crazy. how repond user pressing delete key on numeric keypad? can't find delegate method , see empty string when shouldchangecharactersinrange() called. thanks! i figured out... - (bool)textfield:(uitextfield *)textfield shouldchangecharactersinrange:(nsrange)range replacementstring:(nsstring *)string { if ([string length] == 0) return yes; nscharacterset *nonnumberset = [[nscharacterset decimaldigitcharacterset] invertedset]; string = [[string componentsseparatedbycharactersinset:nonnumberset] componentsjoinedbystring:@""]; textfield.text = [textfield.text stringbyreplacingcharactersinrange:range withstring:string]; return no; }

sql - Postgres: average user response time from interaction with a bot -

i have table stores messages between users , bot (basically state machine), , i'm trying find pairs of message/response table, in order calculate each user's average response time. caveat is, not outgoing messages response. each row stores message_id, user_id, created_at (timestamp), state_code , outgoing (boolean). i have been looking @ window functions, intention of using lag , lead find relevant pairs of messages , calculate difference between created_at values, averaged on each user give each user's avg. response time. problem have no way of assuring both messages issued same sate_code. ideas? update: can assure user's message response given outgoing message if have same state code. so, example ╔════════════╦═════════╦════════════╦════════════╦══════════╗ ║ message_id ║ user_id ║ created_at ║ state_code ║ outgoing ║ ╠════════════╬═════════╬════════════╬════════════╬══════════╣ ║ 1 ║ 11 ║ mm/dd/yy ║ 20 ║ t ║ ║ 2 ║

amazon web services - Mysql Not Working When Inserting via Bash Commands, but Working When Inserted Manuall -

so working mysql database on aws(amazon web services) , have found there seems problem when added parameter group it. without parameter group can use in bash script , insert correct table mysql -h portal-rds -u $user --password=$mysqlpw <<query_input use glacier; insert test values ('anna'); query_input with parameter group above part not work , yet can manually log in , insert values want. has had problems before? fyi has nothing security group, database in same security group before added new parameter group it. ok after going on more documentation found mysql has commit call , can turn auto commit off , found in parameter group has auto-commit off. might need code looks mysql -h portal-rds -u $user --password=$mysqlpw <<query_input use glacier; insert test values ('anna'); commit; query_input thank guys trying help

php - facebook making stream more like feed (page-id/feed) -

now, i'm requesting query: $fb->api( array('method' => 'fql.query', 'query' => "select [fields] stream source_id in ( select page_id page page_id='415533455147213' ) , type != '46' , type != '' limit 5")); with $fb->api('/415533455147213/feed?limit=3'); getting picture(if photo aploaded, or shared), feeds author photo icon , photo caption... how fql query properly? well, found need hiding in attachment column of stream table ;]] @igy suggested ;]

xaml - WPF Scroll a Uniformgrid -

Image
i need display files located in specific path. have created user control contains textblocks details of file (name, size, extension, etc), control child of uniform grid. the problem is, if uniformgrid 5x5, , have on 25 files, 26th element not shown. i'd know, there way scroll content of uniform grid? i know can use listbox , binding (i'm still reading it), need add controls programmatically, 'cause control has event, , i'm subscribing when new instance of usercontrol created , added child array. i've seen this post, , placed uniforgrid inside itemscontrol, not work @ all, xaml: <scrollviewer grid.column="1" verticalscrollbarvisibility="auto" horizontalscrollbarvisibility="disabled" > <itemscontrol x:name="gridarchivos"> <itemscontrol.itemspanel > <itemspaneltemplate > <uniformgrid columns="5" /> </itemspaneltemplate>

mysql - copy from t1 into new table t2 filtering out duplicate rows -

i have table t1 , rows have duplicates in columns except id . t1 's id auto_increment , has 1mil rows. t2 new table without data , id not need auto_increment create new column this. q: after create t2 , how can copy t1 t2 distinct values t1 in columns, t2 has no duplicate rows i on amazons rds engine=innodb t1 - have +---+-----+-----+------+-------+ |id |fname|lname|mytext|morevar| |---|-----|-----|------|-------| | 1 | joe | min | abc | 123 | | 2 | joe | min | abc | 123 | | 3 | mar | kam | def | 789 | | 4 | kel | smi | ghi | 456 | +------------------------------+ t2 - end with +---+-----+-----+------+-------+ |id |fname|lname|mytext|morevar| |---|-----|-----|------|-------| | 1 | joe | min | abc | 123 | | 3 | mar | kam | def | 789 | | 4 | kel | smi | ghi | 456 | +------------------------------+ this attempt, got: error code: 1136. column count doesn't match value count @ row 1 insert t2 (id,fname,lname,mytext,morevar) sel

java - JButton not displaying -

hi know why "button1" not displaying? can not seem figure out when execute program works , runs not display button. appreciated thanks. private container c; private jpanel gridpanel; private jcombobox combo; final jlabel label = new jlabel(); private jbutton button1 = new jbutton("clear"); private jbutton button2 = new jbutton("exit"); /** * christopher haddad - 559815x */ public planets() { c = getcontentpane(); gridpanel = new jpanel(); gridpanel.setlayout(new gridlayout(5, 0, 0, 0)); label.setvisible(true); combo = new jcombobox(); combo.seteditable(false); combo.additem("no planet selected"); combo.additem("mercury"); combo.additem("venus"); combo.additem("earth"); gridpanel.add(combo); add(button1); add(button2); button1.addactionlistener(this); button2.addactionlistener(this); c.add(gridpanel, borderlayout.north); settitle(&quo

Rails 4 Strong Params has_many with JSON -

i'm attempting pass json on client side , have rails take care of handling object creation. here models: class order < activerecord::base has_many :order_items, :autosave => true belongs_to :menu_session end class orderitem < activerecord::base belongs_to :order has_one :menu_item end controller class ordercontroller < applicationcontroller #post /order/create def create @order = order.new(order_params) @order.save end private def order_params params.require(:order).permit(:comments, :menu_session_id, :order_items => [:menu_item_id]) end end the json data: {'order': {'comments': 'none', 'menu_session_id': '9', 'order_items':[{'menu_item_id': '5'}, {'menu_item_id': '5'}]}}; the javascript var data = {}; data.order = {'comments': 'none', 'menu_session_id': '9', 'order_items':[{'menu_item_id': &

arduino - node.js not responding from intranet -

i have following node.js server defined , running var httpserver = http.createserver(onrequest).listen(8080,'0.0.0.0',function(){ console.log("listening at: http://192.168.1.6:8080/"); console.log("server up"); }); seriallistener(debug); initsocketio(httpserver,debug); i can see page intranet. there no accessibility internet. have port forwarded 8080 , have tested using wamp server. can me please. there funny thing - node.js server running , web page accessible when there internet connection available. why so? if can see @ all, node working properly. if there's places can't see from, it's firewall issue, either on box or on switch in front of box.

jquery - Enable mouse scroll without vertical scrollbar displayed and maintain the background -

requirement : enable mouse wheel vertical scroll without displaying scrollbar , maintain background. using below solution, able achieve expected following solution mentioned below <div style='overflow:hidden; width:200px;'> <div style='overflow:scroll; width:217px'> mousewheel scrollable content here.... </div> </div> link : remove html scrollbars allow mousewheel scrolling the issue have inside child div, there table alternate colors , styling , maintain background. currently, using above solution, scrollbar area of 17px empty , looks has rubbed off scrollbar. questions : (a) how can maintain background ? (b) can reduce width of vertical scrollbar 1px appears thin line , users not notice existence of scrollbar. tried different solution using jquery avoid background problem //my page split 2 sections div1 , div2 //div1 - div on left hand side //div2 - div on right han

sockets - C - Public IP from file descriptor -

i have 3 process in 3 different computers. process 1, client, asks process 2 ip , port of process 3. process 3 connected process 2 earlier, , process 2 gets ip of process 3 file descriptor (process 3 knows ip , port of process 2). this works fine, if try run process 2 , process 3 in same computer, ip of process 3 127.0.0.1 process 1 never finds process 3. socklen_t len; struct sockaddr_storage addr; char ipstr[inet_addrstrlen]; len = sizeof addr; getpeername(fd, (struct sockaddr*) &addr, &len); struct sockaddr_in *s = (struct sockaddr_in *) &addr; inet_ntop(af_inet, &s->sin_addr, ipstr, sizeof ipstr); this code i'm using, , ipstr ip get. how can solve this? many thanks! if after getpeername() call process 3 socket detect address localhost, can instead call getsockname() process 1 socket ip process 1 used connect process 2. long process 3 listening same interfaces process 2 when running on same machine,

android - Writing to database located on sdcard in phonegap is not working -

i working on phonegap application, here condition, i have sqlite database saved on sdcard, want access through phonegap. i able access using following code var db = window.opendatabase("../../../../mnt/sdcard/test", "1.0", "test db", 1000000); but same code not working devices. above code working on emulator, samsung tab2. when deployed application on mobile phone not working. following manifest file. <uses-permission android:name="android.permission.camera" /> <uses-permission android:name="android.permission.vibrate" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.access_location_extra_commands" /> <uses-permission android:name="android.permission.internet" /> <uses-permission an

sql update - zend form handling of NULL from DB to form and back to DB -

i have db table various columns of various types including few decimal typed columns may or may not significant. read record database , through error_log output resulting associative array using serialize($dbarray) , can see columns have 'n' signifying contain null value. same array used in $form->populate($dbarray) "populate" form. upon submission, use error_log again serialize($dbarray) , columns in question have 's(1):0' value portion of serialize output. this issue me because have validator greaterthan 0 fails when expect pass when not eter value particular element. elements not required elements , should run validator when entered , because null not returned gets run. somewhere null value converted 0 subsequently turned 0.00 in db. any idea need form return null when nothing entered element. have element defined type 'text' use elements of nature. there varchars same db record returned null, , think recall date column keeping null value

image - Creating a link between IOS Apps -

china has messaging app, app call wechat 微信 300 millions users. wechat, can link other e-commerce app , e-commerce app can send pictures wechat? how linking app work? far know, ios not support that. url schemes may help.. here apple document here tutorial

Haskell name declaration rules -

i'm teaching myself haskell, , i've come across 2 implementations of "flip" function raise questions me name declaration. these 2 same thing: flip'' :: (a -> b -> c) -> b -> -> c flip'' f y x = f x y flip' :: (a -> b -> c) -> (b -> -> c) flip' f = g g x y = f y x the first example expect. in second example, i'm confused why we're allowed write g x y = f y x when haven't declared either x or y yet. understand lazy evaluation means neither evaluated until they're needed, expected compiler @ least want declaration. it compiles without type signature... works fine: flip' f = g g x y = f y x so x , y untyped variables? or else going on? why able this? i'm confused why we're allowed write g x y = f y x when haven't declared either x or y yet. since g, x , y appear left of equal sign, are, in fact, declared. where introduces scope loc

debugging - Qt Application shows build error in Debug mode, OK in release mode -

i have qt (i think 4.8.4) 32-bit statically compiled on 64-bit windows 7. compiler using mingw 32-bit (mingw32-make.exe). when build statically in release mode, files generated succefully in following directory: c:\qt\qt5.0.0\tools\qtcreator\bin\project-build-unnamed_microsoft_windows_sdk_for_windows_7_7_1_7600_0_30514_x86-release however, when try build in debug mode, gives me following compile errors cannot find -lqtmaind cannot find -lqtguid cannot find -lqtnetworkd cannot find -lqtcored collect2: ld returned 1 exit status please let me know can access debug features. also, changes shall have make in configuration able build project dynamically well. when installed qt, did configure install static debug libraries also. if not try reconfiguring , reinstalling it. in windows, think installed preconfigured, precompiled binary may not have static debug support. try downloading source , configure , compile according needs

PHP isn't updating with the MYSQL database -

the code below shows connection reach mysql database, reason once grabs details database doesn't update php page after that. example, table lastwinner string datatype contains "david". after saving php file output shows david, if change value in mysql database output doesn't change afterwards. <div id="navigation"> <?php $host = "localhost"; $username = "db_user"; $password = "password"; $db_name = "db_name"; $message = "the last person win lottery is: "; mysql_connect("$host", "$username", "$password") or die (mysql_error ()); mysql_select_db("$db_name") or die(mysql_error()); $total = "select lastwinner total info"; $rs = mysql_query($total); while($row =

javascript - Google Geochart: Improper colour code for the disputed for area -

i using google geochart api implementing state wise report indian political map. used following code: google.load('visualization', '1', {'packages': ['geochart']}); google.setonloadcallback(drawvisualization); function drawvisualization() { var data = new google.visualization.datatable(); data.addcolumn('string', 'country'); data.addcolumn('number', 'value'); data.addcolumn({type:'string', role:'tooltip'}); var ivalue = new array(); data.addrows([[{v:'in-ap',f:'andhra pradesh'}, 5,'5']]); ivalue['in-ap'] = 'http://en.wikipedia.org/wiki/andhra_pradesh'; data.addrows([[{v:'in-ar',f:'arunachal pradesh'},4,'4']]); ivalue['in-ar'] = 'http://en.wikipedia.org/wiki/arunachal_pradesh'; data.addrows([[{v:'in-as',f:'assam'},2,'2']]); ivalue['in-as'] = 'http://en.wikipedia.org/wiki/assam'

How to create and initialize a SDL 2.0 window to support 3D rendering with OpenGL 3.0+? -

i new sdl , trying use version 2.0. believe in previouse versions of sdl (1.2 , 1.3) creating window done sdl_setvideomode , has since been droped source . how create window rendering 3d opengl 3.0+ sdl 2.0? (with programmable pipeline of course) my first gess sdl_creatwindow sdl_getwindowsurface sdl_createrenderer code below: sdl_window* window = sdl_createwindow(title, x, y, w, h, sdl_window_shown | sdl_window_opengl); sdl_surface* s = sdl_getwindowsurface(window); sdl_renderer* renderer = sdl_createrenderer(window, -1, flags); sdl_setrenderdrawcolor(renderer, 0xff, 0xff, 0xff, 0xff); however, documentation on sdl_getwindowsurface says cannot used "3d or rendering api on window" source . is there other way render 3d opengl 3.0+ in sdl 2.0, or should use sdl 1.2 because sdl 2.0 in release candidate status? try using sdl_gl_setattribute() before create window: sdl_gl_setattribute( sdl_gl_context_major_version, 3 ); sdl_

php - How to display username on the header of every page? -

i stuck problem. display "welcome username" on header of every page ".html" pages. since html page, don't think can use php. also, want work without javascript. so in overview: - display username in header of html page (.html) - no javascript - retrieve username in cookies it used on website japan-guide.com. however, confused on how it. seems use php. however, .html page , links .html pages. there seems no .php page inbetween. i tried searching online, can't find it. help. i wondering. can use iframe in html displays php code "welcome username". work? our better change html files php , modifying later. i agree zerkms . cannot entirely trust site of page ends in html . dynamic content processor such php can modified (using web server setting) allows execute file extension, including html .

asp.net mvc - if i select dropdown option 1 then i get another dropdown only one record -

i have 2 dropdown , 1st static 'displayanswer' , 2nd 'correctanswer' here select 'displayanswer' option 2 1 , 2 in 'correctanswer' 2nd dropdown, or select 3 1, 2 , 3 in 'correctanswer' 2nd dropdown, or select 4 1, 2, 3 , 4 in 'correctanswer' 2nd dropdown. using mvc razor. plz me. thnks. this can achieved using jquery irrespective if using asp.net mvc . 1 way of achieving need , there might other solutions can follow, worked me. below samples code, can modify fit in scenario. in sample going working departments , units when adding new user. department consists out of different units. when department selected first drop down department's units displayed in second drop down. let me start view (page). accepts view model called createuserviewmodel . view model should used instead of passing through domain model. @model myproject.viewmodels.users.createuserviewmodel the html markup representing 2 drop downs: <t

Difference between Windows Embedded Compact 2013 and Windows Embedded 8 -

i have quires regarding win ce. is there difference between windows compact embedded , windows embedded edition? in website saw new version of win ce, win ce 2013. win ce 2013 , win embedded 8 same. differences? we planning use in hand held device industrial standards real time operation not necessary. mentioned application best, win ce 2013 or windows embedded 8? windows embedded 8 stripped down version of windows 8, windows embedded compact 2013 real time os. as os best needed realtime os our industrial application , has been pain in ass, if don't need realtime os go embedded.

django - remove a migration from south migration history -

i have app named 'robots' , used 0.9 version of it i later find out 0.9 has feature don't want , downgraded 0.8 after sometime, try south migrate on project , meet error south.exceptions.nomigrations: application '<module 'robots' '/home/ubuntu/virtualenvs/codingqna/local/lib/python2.7/site-packages/robots/__init__.pyc'>' has no migrations. i guess 0.9 had migrations file 0.8 doesn't, , south complaining it. how remove south's history never existed? (like used 0.8 beginning without migrations files) or other way can use here? delete south_migrationhistory app_name='robots'; south_migrationhistory table keeps track of migrations have been applied , yet applied. since 0.8 of robots doesn't have migration files entries table south_migrationhistory can removed , won't affect else.

python - what about saving extra variable in a QuerySet? -

for example have queryset folder=folder.objects.all() . what saving variable in for in folder: i.fcount = 33 so can use in templates like: {% folder in folders %}{{ folder.fcount }}{% endfor %} i using in 1 of page: models.py class folder(models.model): employer=models.foreignkey(employer) name=models.charfield(max_length=100) lastupdate= models.datetimefield(auto_now=true) class savedcandidatemanager(models.manager): def itemcount(self,fd): return self.filter(folder=fd).count() class savedcandidate(models.model): folder=models.foreignkey(folder) candidate=models.foreignkey(jobseeker) created=models.datetimefield(auto_now_add = true) objects=savedcandidatemanager() views.py def folder(request): folder=folder.objects.filter(employer=request.user.employer) in folder: i.fcount=savedcandidate.objects.itemcount(i) return render(request,'employer/pages/candidatefolder.html', {'fol

testing - Cmake with fruit tests -

i have project uses fruit testing (fortran code). code. calculator.f90 module calculator implicit none contains subroutine add (a, b, output) integer, intent(in) :: a, b integer, intent(out):: output output = a+b end subroutine add end module calculator and test calculator_test.f90 module calculator_test use fruit contains subroutine test_5_2_2 use calculator, only: add integer :: result call add(2,2,result) call assertequals(4,result) end subroutine test_5_2_2 subroutine test_5_2_3 use calculator, only: add integer :: result call add(2,3,result) call assertequals(5,result) end subroutine test_5_2_3 end module now i'd use cmake build , run tests (triggered jenkins), question is: need change tests or possible run test i've written through cmake, , if how? i've searched lot online testing cmake seems done c++ , using executeable testfiles files. thanks! -minde

unity3d - Creating Rope Physics for Unity -

i want create bungee jumping-like game in unity , therefore need rope physics. need elastic ropes capability pull objects velocity after little extension. know place start? because have no idea how start such scripting. i looked @ asset store. there rope physic simulators, have on own, plus expensive. i tried using spring and/or configurable joints in unity, did not give want. edit: examining jakobsen relaxation method right now. if have more methods offer, or know deeps of method, please feel free me. there example on unity wiki of creating 3d physics based ropes. might take bit of configuration work how need too. there asset on asset store costs $15. might little complex doing, however. the new quickropes 2 rope physics editing tool has been re-written ease of use in mind. tool powerful new way generate , edit complex rope simulations. use built in spline editor form ropes endless shapes before ever hit play! want use cloth rope? can new cloth m

python - How can I find multiple URLs within a string (href attribute) -

i've written script (see here) urls within template directory, of hrefs contain 2 urls use depending on language app runs in. so script gives me list of whatever in href='here' , want collect urls href looks this; href="{{ 'http://www.link.com/blah/page.htm'|cy:'http://www.link.com/welsh/blah/page.htm' }}" what regular expression need return those? (as many people, i'm awful @ regex!) something like: href="{{ 'http://www.link.com/blah/page.htm'|cy:'http://www.link.com/welsh/blah/page.htm' }}" import re print re.findall("'(http://(?:.*?))'", href) # ['http://www.link.com/blah/page.htm', 'http://www.link.com/welsh/blah/page.htm'] takes starting http:// that's inside apostrophes.

java - Simulating String.split using StringTokenizer -

i'm converting code existing application to compile against java 1.1 compiler custom piece of hardware. means i can't use string.split(regex) convert existing string array. i created method should give same result string.split(regex) there's wrong , can't figure out what. code: private static string[] split(string delim, string line) { stringtokenizer tokens = new stringtokenizer(line, delim, true); string previous = ""; vector v = new vector(); while(tokens.hasmoretokens()) { string token = tokens.nexttoken(); if(!",".equals(token)) { v.add(token); } else if(",".equals(previous)) { v.add(""); } else { previous = token; } } return (string[]) v.toarray(new string[v.size()]); } sample input: rm^res,0013a2004081937f,,9060,1234ff sample output: string line = "rm^res,0013a2004081937f,,9060,1234ff"; string[] items = split(",", line); for(

backbone.js - save model object using backbone -

i'm using backbone,and have model data like: { "a":[{"a1":"name1","a2":"add2"},{"a1":"name3","a2":"add3"}],"c":"data1" } now want edit , add data,i set data like: var clone = $.extend([], model.get("a")); for(var i=0;i<count;i++){ clone[i].a1= "a"+i; clone[i].a2= "b"+i; clone[i].a3= "c"+i; } model.set({a:clone}); but says "clone[i]" undefined,while when there 1 object(count=1), can works,i don't know why. hope help,thanks. what count ? should work: _.map(clone, function (item, index) { item.a1 = "a" + index; item.a2 = "b" + index; item.a3 = "c" + index; return item; });

django - Whoosh ImportError: cannot import name SpellChecker -

in order solve no "filestorage" attribute problem, update whoosh. however, comes new problem. from whoosh.spelling import spellchecker importerror: cannot import name spellchecker at moment, have install older version of woosh. pip install whoosh==2.4 the issue in django-haystack.

c++ - How to make an vector of abstract template class -

following not work: std::vector<irule*> vec; rulerangedouble *rule = new rulerangedouble(0, 100); vec.push_back(rule); now how can make vector of different rules? know, have use pointers... else have working? how can change base structure work? i use interface following: // interface template <typename t> class irule { public: virtual bool isvalid(t value) = 0; }; and example class looks this: class rulerangedouble : public irule<double> { private: double min; double max; public: bool isvalid(double value) { .... }; }; you can implement getbestvalidvalue() in several ways. 1 define special general (but non-template) return type used getbestvalidvalue() , argument type isvalid(value) (juanchopanza's answer faulty here): class valuetype { enum { is_int, is_double } my_type; // add more if want union { my_int; my_d

git - Android Studio - checkout a *branch* from GitHub -

Image
we have repo in github has 3 branches. example, master , developer , preview . when checkout repo in android studio, seems checkout master branch only, ignoring other branches. (eclipse used ask branch checkout/import when cloning repo github) the question is : how can select branch @ time of checking out repo android studio? image 1- checking out github image 2- asks repo url, not branch. in vcs menu, choose git , click branch choose branch want use. or click right bottom corner git menu.

django template tag - comparing two variables -

{% if firstpass != secondpass %} errors.append('passwords not same') i trying make page users can change personal information. 1 in particular pertains checking whether password textbox (firstpass) , password re-entering textbox (secondpass) contain same password. reason, getting compiler error on line != sign. can suggest why? : ( if taught right need append error message errors list. need change bit. first need create form in template. create dummy form understand happening. <form action="/password-confirm/" method="post">{% csrf_token %} <input type="text" name="firstpass"> <input type="text" name="secondpass"> <input type="submit" name=""> </form> second create view in views.py . def password_confirm(request): if request.method == "post": firstpass = request.post["firstpass"] secondpass =

java - How to enable debug logging on jenkins? -

i trying debug how ssh-slaves behaving jenkins documentation https://wiki.jenkins-ci.org/display/jenkins/logging extreamly incomplete. i added new logger , added: "hudson." all "org.jenkinsci.plugins." all still new log added not updated @ all. also, found no information on how enable logging everything, empty, start or what? update: tried add -djava.util.logging.loglevel=fine command line starting jenkins surprise did not had effect on jenkins_log did had effect on log can check on gui. typically, use gui viewing logs, why had effect; however, if want gui doesn't provide (such better information of going on slave), may have container you're running jenkins in, review logging config, set debug, , read logs there, or try running slave manually node... if on node, can try running slave like: java -jar slave.jar -jnlpurl http://<yourjenkinsurl>:8080/<computer>/<slave>/slave-agent.jnlp better details specific

gitignore - GIT - how to enforce file exclusion by server? -

i want enforce file exclusion git server. users should not able push file doesn't match rules central repository. tried setup rules in /info/exclude on git server side, ignore it. is there way ? (excluding hooks solution). thanks help you ask users add system config: git config --system core.excludesfile /share/path/to/system/wide/gitignore that way, users referencing shared (gitignore) file.

convert binary data to image using php -

Image
this question has answer here: coverting hex image in php? 2 answers i have binary image data saved in old database, saved old developer, want display image using php, can not. i have tried imagecreatefromstring returns false . binary example data: http://freezinfo.com/gg.php given string displayed text ( extactly sequence ), it's lineup of hexadecimal numbers. in jpeg, magic numbers of such file ff d8 first 2 bytes , ff d9 last 2 bytes (compare how identify contents of byte[] jpeg? ). these hexadecimal (hex in short) numbers can found @ beginning , end of sequence well: ff00d800ff00 ... 1f00ff00d9000 ## ## ## ## looking these magic numbers reveals hex values append 00 always. shows @ end single 0 found. so 4 characters form 1 value. hex-encoded looks 16 bit values value never goes on 8 bit range (0-255), therefore ther

Rails 3 two selects with the same options but keep values unique -

i trying figure out how deal 2 select boxes same options (i using formtastic gem) , force unique values. example: <select name="departure" size="1"> <option value="1">ny</option> <option value="2">fl</option> <option value="3">la</option> </select> <select name="arrival" size="1"> <option value="1">ny</option> <option value="2">fl</option> <option value="3">la</option> </select> the simplest way use jquery, know if there validation option in rails 3 handle such scenario. in advance! you'll have write own think. validate :departure_cant_equal_arrival def departure_cant_equal_arrival if departure.present? , arrival.present? , (departure == arrival) errors.add(:arrival, "can't same departure") end end

android - Socket IO Error while handshaking Caused by java.net.SocketTimeoutException -

hi new have client on android phone , want connect socketio server on raspberry pi. have take client example https://github.com/fatshotty/socket.io-java-client/blob/master/examples/basic/basicexample2.java change ip address , port. when run problem 03-21 11:37:09.469 19973-20232/com.example.app i/system.out﹕ error occured 03-21 11:37:09.469 19973-20232/com.example.app w/system.err﹕ io.socket.socketioexception: error while handshaking 03-21 11:37:09.470 19973-20232/com.example.app w/system.err﹕ @ io.socket.ioconnection.handshake(ioconnection.java:322) 03-21 11:37:09.470 19973-20232/com.example.app w/system.err﹕ @ io.socket.ioconnection.access$600(ioconnection.java:39) 03-21 11:37:09.470 19973-20232/com.example.app w/system.err﹕ @ io.socket.ioconnection$connectthread.run(ioconnection.java:199) 03-21 11:37:09.470 19973-20232/com.example.app w/system.err﹕ caused by: java.net.sockettimeoutexception 03-21 11:37:09.471 19973-20232/com.example.app w/system.err﹕ @ java.n

ios - perform Parse.com user signup on the current thread (signUp:) and retrieving the NSError -

i have call parse's user signup method on current thread, not background thread it's being called on background thread. -(bool)signup method isn't enough bool response if registration successful or not, have handle potential errors. i've noticed method -(bool)signup:(nserror **)error current ios programming skills not there yet when comes understanding how use :) here signup: documentation i've tried adding property user object called nserror *latesterror , hoping call mentioned method , put nserror returned value can handle errors on main thread: -(bool)registeruser{ pfuser *newuser = [pfuser user]; newuser.username = self.username; newuser.password = self.password; return [newuser signup:self.lasterror]; // error } but error: implicit conversion of objective-c ponter 'nserror *__autoreleasing *' disallowed arc any ideas how make work method or alternative ways achieve same result? you have pass reference n

post - AngularJS - Error: value.push is not a function -

i have service defined -> storegrservices.factory('productlist', ['$resource', function($resource) { return $resource('', {},{ query: {url:'/apis/productshome.php', method:'get', isarray:false}, getproductdetail: {url:'/apis/getproductdetail.php', method:'post', isarray:true} }); }]); and in controller how have called post -> storegrcontrollers.controller('productpagectrl', ['$scope','productlist','$routeparams', function($scope, productlist, $routeparams) { $scope.postvariable = new productlist(); $scope.postvariable.productcode = $routeparams.code; $scope.postvariable.$getproductdetail(); }]); this sends product code server , server returns array in response. have used isarray: true, still keeps giving me error. don't 'value' variable/object in code. please suggest how can fix this. this complete error -> error: value.push

transactions - Automocity in PHP (Begin and Commit in PHP) -

may sound silly, want know there way enclose php codes in functions if error happen rollback process has done.? (like done in mysql- automocity) ex : $this->begin; $this->function1(); $this->function2(); $this->commit; a database server can rollback changes database table, since php far more powerful, cannot done (easily). you this: try { // / create file file_put_contents("/tmp/test.txt", "test"); // ... more actions here ... // error occurs, rollback! if($some_error) { throw new exception(); } } catch(exception $e) { // undo changes @unlink("/tmp/test.txt"); } also note there few things cannot undone. http call webservice example.

xsl fo - XSL-FO FOP pagebreak if table fits on a new site -

being quite new fop , structure, came problem fop creates pagebreaks within tables. have 20 tables filled 1 or 2 rows, others have lot more. requirement if table including heading , header fit on blank page , there not enough space on current page display table, pagebreak created. need conditional pagebreak ( did not find) , way find whether table fits on page or not. so there block-attributes might have missed? (speaking block-attributes because table heading , table content 2 different tables due historical reasons) you can try adding keep-together='always' fo:block . force whole fo:block on same page.

c++ - What game ideas do you recommend for a newbie to begin his quest for game development? -

i know subjective question.. don't know else ask here. game ideas recommend has not yet programmed game yet? want start basic game. i start scroll , shoot aka shoot'em game game. such 2d games more ore less easy program , make fun without effort level design etc.

android - how to get string value using this code -

how string values using this,right return integer value. getapplicationcontext(),getresources().getidentifier("please_try_again_"+nativelocalesymbol, "string", getpackagename()); getidentifier returns resource identifier why int. using id can resource int resid = getapplicationcontext().getresources().getidentifier("please_try_again_"+nativelocalesymbol, "string", getpackagename()); getapplicationcontext().getresources().getstring(resid)

c - Reach kernel session space from kernel driver -

i'm writing kernel driver, should read (and in cases, write) memory addresses in kernel session space (win32k.sys). i've read in topic example in windbg should change context random user process read memory of kernel session space (with .process /p). how can in kernel driver? should create user process communicate driver (that's idea now, hope there better solution) or there more simple solution this? session space not mapped in system address space (that drivers share, if not attached process). why getting bsod while accessing win32k. you need attached eprocess via kestackattachprocess perform operation. can session id zwqueryinformationprocess(processsessioninformation) function.

jasper reports - Cascading parameter from iReport to JasperReports Server -

i have made report in ireport , while previewing prompting parameter value in ireport preview mode working file but while exporting jasperreports server not asking parameter , showing "report empty". so how pass parameter or cascading parameter in jasperreports server ireport ? you have add manualy. go "repository navigator" (in ireport) find report, right click input controls , click on "create local input control". id must same name of parameter. jaspersoft studio allows create input controls while sending report server don't have manualy.

Android ListView not poulating with json datas -

i want populate listview json values. i'm able json values, dont know problem is. in logcat shows nullpointerexception , unfortunately activity stops. suggesstion plz...... my java public class certify_absent_list extends activity { private static listview listview; private static list<string> list; private string teachername,date; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); //setcontentview(r.layout.); listview=(listview) findviewbyid(r.id.listview1); list=new arraylist<string>(); teachername=getintent().getextras().getstring("teachername"); date=getintent().getextras().getstring("today"); new absent_list_bg_task().execute(); } private class absent_list_bg_task extends asynctask<string,void,string> { protected string doinbackground(s