Posts

Showing posts from September, 2014

Java Android translation animation - how to "take away" ImageView through bottom of the screen? -

i have , imageview set on bottom of screen. want animation translate move away through bottom side of screen. if slide need set final y point @ -300 i'll sure imageview slides , how slide down - possible set in xml, or programmatically only? you can set positive y value in code of translate anim. translateanimation(0,0,urview.gety,urviewgety+300)

I need to add a non-static column to a table in SQL Server -

i trying add column , populate in sql server 2008 using: alter table tbl_1 add 'actuals_' & year(getdate())-3 update tbl_1 set 'actuals_' & year(getdate())-3 = tbl_2.txtytd tbl_2 tbl_2.year = year(getdate())-3 my reason need have column change when year changes data within change based on current year. table dropped , recreated each time. have tried using + instead of &. any , resources appreciated.

java - Reliable data transfer over an UnReliable Channel -

i have data channel can transfer data on it, channel wireless system implemented myself low reliability 90% , low bandwidth due physical limitation. in order overcome this, i'm planning wrap whole data channel system should use data correct method, , send request resend when when data corrupted (corruption checked checksum). whenever 1 of wrapper receives bad data send resend request , , hold place in memory unknown data, in stack.the stack grow when reliability drops down, since each side start send resend request each other since had not received last resend request . when reliability returns normal, try resend resend requests until stack goes empty. this affect bandwidth since of request won't data, resend requests .moreover system run on microcontroller limited ram, few bytes, may cause stack overflow in rare cases. any suggestions? here java model describes data channel: public interface datachannel { abstract void send(string s); abstract vo

In Android how do I disconnect a socket? -

so i've got socket connected outside web address , when gets message it's supposed disconnect. tried calling socket.close() socket.isconnected() still true. no luck searching answer isconnected() tells if made successful connection socket. isclosed() tells if called close() . check out guys response https://stackoverflow.com/a/3701249/2453771

Redis Multiple Instance in FreeBSD -

im trying learn freebsd, , install multiple instance of redis on it. know easy in linux running ./install_server script. i've tried running script utils expected wont work in bsd. installs in /etc/init.d is there direct me learn doing multiple instance of redis under freebsd or teach me how it? im new in freebsd, , want learn it. came linux , os x. thank in advance! the default install on freebsd runs 1 instance, usual daemons. but can run multiple instances hand. of course you'd have write different configuration file each instance, using separate port, , maybe different directory dump databases. why not use multiple databases in 1 redis instance?

r - How to avoid listing out function arguments but still subset too? -

i have function myfun(a,b,c,d,e,f,g,h) contains vectorised expression of parameters within it. i'd add new column: data$result <- with(data, myfun(a,b,c,d,e,f,g,h)) a,b,c,d,e,f,g,h column names of data . i'm using data.table data.frame answers appreciated too. so far parameter list (column names) can tedious type out, , i'd improve readability. there better way? > myfun <- function(a,b,c) a+b+c > dt <- data.table(a=1:5,b=1:5,c=1:5) > with(dt,myfun(a,b,c)) [1] 3 6 9 12 15 the ultimate thing is: dt[isflag, newcol:=myfun(a,b,c,d,e,f,g,h)] however: > dt[a==1,do.call(myfun,dt)] [1] 3 6 9 12 15 notice j expression seems ignore subset. result should 3 . ignoring subset aspect now: df$result <- do.call("myfun", df) . copies whole df whereas data.table allows add column reference: df[,result:=myfun(a,b,c,d,e,f,g,h)] . to include comment @eddi (and i'm not sure how combine these operations in data.fra

Does chrome dev tools have anything similar to sublime text's snippets and tab triggers? -

when i'm writing code in sublime text, have ability create "snippets" can "tabtrigger" code. for example, if i'm writing js code , want log console, created snippet have type "log" , hit tab. hit tab console.log(); inserted code. google seems have different definition of snippets, , wondering if described functionality available when writing code directly in dev tools source panel? i did not find tab trigger ability in chrome way simmulate operation: using autohotkey run after installing , , right click autohotkey in taskbar corner -> edit script add following script files. #ifwinactive developer tools - ::ml:: sendinput {raw}margin-left:10px; return write own script above, save , reload script have fun! more say: #ifwinactive means part applies current window name started developer tools - .so if want script work, shoul make develop window seperated main chrome window have window name. ::ml:: defines keys t

version control - Git: How to manage multiple branches on submodule and tie them to particular branches on main repo -

i working on large project main repository submodule rapidly changing. there 1 submodule has different branches. lets call them master, dev1 , dev2. main repository has various branches master, dev1, dev2, dev3, dev4 etc. know when checkout branch on main repository submodule checked out @ particular commit in detached head. having multiple branches in submodule force me remember checkout right branches on main repository submodule before making commits main repo or submodule. want when checkout particular branch on main repository, branch matching name should automatically checked out on submodule , if there no matching branch, 'master' branch on submodule should checked out. want same thing happen while switching branches on submodule appropriate branch on main repo has appropriate commit on relevant branch on submodule. git 1.8.2 added option track submodule branch. not able figure out if useful anyways achieve want. please let me know if seems possible other way. gr

sql - get records for the date in between dates -

here table inventory fromdate todate productid description qty --------- -------- --------- ------------ ---- rec1 8/8/2013 8/12/2013 1111 cream 5 rec2 8/13/2013 8/19/2013 1111 cream 10 rec3 8/20/2013 8/21/2013 1111 cream 20 table dimdate datedate --------- 8/13/2013 8/14/2013 . . 8/19/2013 how rec2 date 8/15/2013 inventory table? i using teradata database. add clause records greater date. where yourdatefield >= cast(('08/15/2013' (date,format 'mm/dd/yyyy')) date)

gitignore - How to "unignore" Visual Web Site *.refresh files when you have [Bb]in/* -

i'm using standard visual studio .gitignore @ https://github.com/github/gitignore/blob/master/visualstudio.gitignore part of gitignore ignore bin folders, problem, because need include bin/*.refresh files visual studio web site projects. when 1 has (local file) web site project in: c:\projects\myprojecta\myprojectweb references libraries stored "hint files" in c:\projects\myprojecta\myprojectweb\bin folder *.refresh. so if reference (a non framework dll) ajaxcontroltoolkit.dll , in bin folder, end ajaxcontroltoolkit.dll , ajaxcontroltoolkit.dll.refresh . content of file indicates path of find dll. (let's ignore potential pathing problems when repo cloned, because we're checking in dlls _lib folder that's checked repo) how 1 "unignore" *.refresh files found within visual studio web site project bin folders included clones of repo? use exclamation mark. **/[bb]in/* !**/[bb]in/*.refresh

finding an array range in PHP -

i have range of values in array like: $values = array(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5); i need find index of smallest value in array that's greater or equal specified number. example, if user inputs 0.25, need know first array index 2. in other languages i've used, r, there 'which' function return array of indices meet criteria. i've not found in php, i'm hopeful else has solved this. thanks. you can use array_filter it r does.

c++ - boost asio - SSL async_read and async_write from one thread -

i know openssl, boost asio ssl implementation based on, doesn't allow concurrent ssl_read() , ssl_write() (i.e. ssl_read() , ssl_write() executed different threads). is safe call boost asio async_read() , async_write() on ssl socket same thread? thanks the requirement boost::asio::ssl:::stream thread safety; not place requirement thread may initiate operations: distinct objects: safe. shared objects: unsafe. application must ensure asynchronous operations performed within same implicit or explicit strand. if application has 1 thread processing io_service , , async_read() , async_write() initiated within thread, safe, operation , completion handler(s) running within implicit strand. on other hand, if multiple threads processing io_service , explicit strand necessary. async_read() , async_write() operations need initiated within strand , , completion handlers need wrapped same strand . for more details on boost.asio's thread safety requir

node.js - How to get the favorites from flickr -

i working on node.js list of favorites photos user in flickr , know there other method public list of favorites, , 1 works fine me, using flickr api return me error. {"stat":"fail", "code":98, "message":"invalid auth token"} this code: var util = require('util'), http = require('http'), keys = require(__dirname + '/../oauth/flickrkeys'), utilities = require(__dirname + '/utilities'); var getphotos = function(userinfo, callback) { var requestresponse, parameters, requestpoint, url, tohash, secretkey, api_signature, method = "flickr.favorites.getlist", format = "json"; requestpoint = 'http://api.flickr.com/services/rest/'; url = requestpoint + '?api_key=' + keys.clave + '&auth_token=' + userinfo.oauth_token + '&format=' + format + '&method=' + method + '&min_fave_date=' + userinf

sql server - SQL Statement to Get The Minimum DateTime from 2 String FIelds -

i've got bit of messy table on hands has 2 fields, date field , time field both strings. need minimum date fields, or record if there no date/time attached it. here's sample data: id first last date time 1 joe smith 2013-09-06 04:00 1 joe smith 2013-09-06 02:00 2 jack jones 3 john jack 2013-09-05 06:00 3 john jack 2013-09-15 15:00 what want query following: id first last date time 1 joe smith 2013-09-06 02:00 2 jack jones 3 john jack 2013-09-05 06:00 the min date/time id 1 , 3 , id 2 because doesn't have date/time. cam following query gives me id's 1 , 3 want them: select * test t cast(t.date + ' ' + t.time datetime ) = (select top 1 cast(p.date + ' ' + p.time datetime ) dtime test p t.id = p.id order dtime) but doesn't return row number 2 @ all. imagine th

jquery .remove() method doesn't trigger .on('remove') event -

i'm removing html element .remove() method , @ same time element have event handler not triggered. why can be? here jsfiddle , code: html <span id='del_span'>delete</span><br> <span id='to_del'>i'm going deleted</span> js $('#del_span').click(function() { $('#to_del').remove(); }); $('#to_del').on('remove', function() { alert("i'm being deleted"); //is never triggered }); the remove() method doesn't automatically trigger remove event (because no such event exists), can manually though, custom event: $('#del_span').click(function() { $('#to_del').trigger('remove').remove(); }); $('#to_del').on('remove', function() { alert("i'm being deleted"); //is never triggered }); js fiddle demo . incidentally, in browsers support mutation events use: $('#del_span').click(function() { $(

search - Lucene not finding expected data -

i'm having issue lucene , i'm hoping can give me idea i'm doing wrong. i'm using lucene 4.4 , i'm using standardanalyser. i'm trying search on 1 field i'm getting weird result. for example when search word "gros*" result return records "grossesse". fine , expected. when search "gross*" finds nothing. any idea i'm doing wrong? there setting i'm missing? or ideas appreciated. thanks this index private void createindex(analyzer analyzer, string catalogueid, locale locale, directory index) throws ioexception { indexwriterconfig config = new indexwriterconfig(version.lucene_44, analyzer); indexwriter w = new indexwriter(index, config); document doc = null; (produitcatalogue produitcatalogue : produitcataloguesmap.get(catalogueid + locale.getlanguage()).values()) { doc = new document(); doc.add(new intfield("id", produitcatalogue.getid(), store.yes)); textfi

ios - UIPickerView appears empty -

i have view 2 pickers, , using ...viewforrow... modify fonts text appears inside picker. however, 1 of pickers appears empty, if scroll through picker, values appear in designated textfields. other picker appears fine. wondering why 1 of picker appears empty? note picker appears empty has 2 components. it's credit card expiration date picker, has 1 component month , 1 year. here code ...viewforrow... method: - (uiview *)pickerview:(uipickerview *)pickerview viewforrow:(nsinteger)row forcomponent:(nsinteger)component reusingview:(uiview *)view { uilabel *pickerlabel = (uilabel *)view; if (pickerlabel == nil) { //label size cgrect frame = cgrectmake(0.0, 0.0, 280, 30); pickerlabel = [[uilabel alloc] initwithframe:frame]; [pickerlabel settextalignment:uitextalignmentleft]; [pickerlabel setbackgroundcolor:[uicolor clearcolor]]; [pickerlabel setfont:[uifont fontwithname:@"helvetica" size:11.0]]; }

xslt - XSL: How can I limit table output to one page -

i have business requirement rendering table data in pdf. requirement contents of table must not exceed 1 page including header/footer. each row of table can vary in height it's not simple limiting number of rows output. how works table contents spill on many pages needed render table. does know how can limit output of table 1 page? btw, pretty new xsl , xsl-fo. thank much! without stating want explicitly, if wish cut off overflow have several ways. since 1 page, not bother doing header/footer regions @ all. place content in absolutely positioned block-containers size wish. for "middle" one, put table inside block-container , set overflow="hidden" on it. i tested both renderx xep , apache fop, works perfect clip off overflow. like this: <fo:page-sequence master-reference="first"> <fo:flow flow-name="xsl-region-body"> <fo:block-container position="absolute" top="3in" le

c++ - Boost Library Build -

i try build boost library visual studio. follow boost lib build instructions , stackoverflow link . open visual studio command prompt (2010) adminstator , run bootstrap.bat. then, build failed. @ .log file more information. using 'vc10' toolset. generating code... microsoft (r) incremental linker version 10.00.40219.01 copyright (c) microsoft corporation. rights reserved. there 1 interface on system: name : wi-fi ... hosted network status : not started link : fatal error lnk1181: cannot open input file 'there.obj' i'm not sure enough understand error, don't have else. changed tools/build/v2/engine/build.bat , remove part; if not "_%vs110comntools%_" == "__" ( set "boost_jam_toolset=vc11" set "boost_jam_toolset_root=%vs110comntools%..\..\vc\" goto :eof) call :clear_error if exist "%programfiles%\microsoft visual studio 11.0\vc\vcvarsall.bat" ( set "boost_jam_t

c++ - CMake: Visual Studio Project Created Using OBJECT Library Feature -

Image
i'm using cmake create have following visual studio solution layout: solution + project1 (c) + project2 (fortran) the goal create c wrapper (project1) around fortran routines (project2) combined single shared library. so, need link .obj file produced in fortran project produced in c project. possible using object library feature (introduced in cmake 2.8.8). detailed here project1 creates shared library , project2 creates .obj file. in cmakelists.txt of project1 use: add_library(lib1${lib1_src} $<target_objects:lib2>) in cmakelists.txt of project2 use: add_library(lib2 object ${lib2_src}) in cmakelists.txt of solution use: cmake_minimum_required(version 2.8.8) project (test) enable_language (c) enable_language (fortran) set(cmake_runtime_output_directory ${cmake_binary_dir}/bin) set(cmake_library_output_directory ${cmake_binary_dir}/lib) set(cmake_archive_output_directory ${cmake_binary_dir}/lib) include_directories(project1) include_dir

wpf - MVVM - pass info from MainWindow ViewModel to WinForms based child UserControl -

i'm working on wpf/mvvm application host winforms graphical control display of cad-type geometry. first, little background. basically, have mainwindow treeview on left , tabcontrol on right. treeview renders observable collection of treenode objects. based on type of node that's clicked in tree, main window's viewmodel creates instance of appropriate child viewmodel selected tree node (a "workspace"). new workspace added observable collection that's bound tabcontrol - creates new tab item. similar well-known josh smith example. in xaml of main window, i'm using <datatemplate datatype...> to instantiate appropriate view created viewmodel. so far, good. works well. now, here's i'm stuck... one "type" of tree node represents cad model. when node of type selected, view that's instantiated contains winforms graphical control (wrapped in winformshost usercontrol). underlying winforms control has "loadfile(

How to limit max file size for upload in nginx for special location with fastcgi -

i want limit max file size upload server 501kb location /account/personal_info/documents/ , 50k other url of site security (ddos, etc) made config text below, second max_body_size in location /account/personal_info/documents/ not work @ all. how should that? location / { include fastcgi_params; fastcgi_pass unix:/var/run/www/mysite.sock; client_max_body_size 50k; } location /account/personal_info/documents/ { client_max_body_size 501k; fastcgi_pass unix:/var/run/www/mysite.sock; fastcgi_param path_info /account/personal_info/documents/; } is uri , http(s)://example.com/account/personal_info/documents/ in browser? if so, more specific in configuration make sure nginx applies correct location block. location = /account/personal_info/documents/ { # ... }

Python pandas timeseries resample giving unexpected results -

the data here bank account running balance. want resample data use end of day balance, last value given day. there can multiple data points day, representing multiple transactions. in [1]: stringio import stringio in [2]: import pandas pd in [3]: import numpy np in [4]: print "pandas version", pd.__version__ pandas version 0.12.0 in [5]: print "numpy version", np.__version__ numpy version 1.7.1 in [6]: data_string = stringio(""""date","balance" ...: "08/09/2013","1000" ...: "08/09/2013","950" ...: "08/09/2013","930" ...: "08/06/2013","910" ...: "08/02/2013","900" ...: "08/01/2013","88" ...: "08/01/2013","87" ...: """) in [7]: ts = pd.read_csv(data_string, parse_dates=[0], index_col=0) in [8]: print ts balance date 20

c# - Does not contain definition for object -

it randomly encounters these errors, when don't mess @ all. says "error 4 'application.form1' not contain definition 'combobox4_selectedindexchanged' , no extension method 'combobox4_selectedindexchanged' accepting first argument of type 'awesome_application.form1' found (are missing using directive or assembly reference?) c:\users\admin\documents\visual studio 2012\samples\application\awesome application\form1.designer.cs 223 81 awesome application it had 10 occurrences of this, , has happened before. makes cannot @ form1.cs [design]. code looks in error area. // combobox4 // this.combobox4.displaymember = "<default>"; this.combobox4.formattingenabled = true; this.combobox4.items.addrange(new object[] { resources.getstring("combobox4.items")}); resources.applyresources(this.combobox4, "combobox4"); this.combobox4.name = "combo

excel - VBA to ask user if he wants to save the workbook? -

i want users option save workbook (if have made changes) @ beginning of macro. how can achieve this? i've tried: thisworkbook.save but unfortunately doesn't generate prompt. i've tried: thisworkbook.save(thisworkbook.fullname) but asks users if sure want overwrite existing file - gives different prompt 1 want. just wrap own prompt: if not thisworkbook.saved if msgbox("do want save file before continuing?",vbyesno,"save?") = vbyes thisworkbook.save end if end if

backbone.js - Backbone Marionette: CompositeView replacing items instead of appending them -

i've got marionette compositeview i'm using fill in dropdown. json response clean when call collection.fetch() within compositeview, instead of appending new itemviews, compositeview seems replacing them in dom. here's code (coffeescript): class @pdcollectionitemview extends backbone.marionette.itemview el: 'li' template: handlebars.compile('{{ title }}') class @pdcollectionsview extends backbone.marionette.compositeview id: 'pd_collections' classname: 'selection' itemview: pdcollectionitemview itemviewcontainer: '.scroll ul' template: handlebarstemplates['connections/collection_select'] #handlebars_assets gem ui: modaltrigger: '#pd_collection_selector' modal : '#pd_selection_modal' selectbtn : '#select_collection' initialize: -> @selectedcollection = undefined connectors.app.vent.on "connections:collecti

css - WordPress Menu Dropdown Not Dropping down -

for reason cannot drop down appear on site: http://a.dev200.com/cflow/ works fine on mobile screen size, not on desktop screen size. can me out please? thanks you have " overflow: hidden " in " megamenu " div. try fix or add css code: #megamenu.megafullwidth { overflow: visible; }

python - Subplots from two DataFrames in one column, sharing x -axis -

i need plot few columns (two or more columns per 1 plot) 2 dataframes in 1 column,sharing x -axis. data has same index. example taken , modified [ 1 ]: df = dataframe(randn(1000, 4), index=date_range('1/1/2000', periods=1000), columns=list('ab')) df2 = dataframe(randn(1000, 4), index=df.index, columns=list('cd')) df = df.cumsum() df2 = df.cumsum() fig, axes = plt.subplots(nrows=2, ncols=1, sharex=true) df['a'].plot(ax=axes[0,0]) df2['c'].plot(ax=axes[0,0]) df['b'].plot(ax=axes[1,0]) df2['d'].plot(ax=axes[1,0]) running got: indexerror: many indices bug or missing ? when change ncols=2 ,everything ok, 2 additional blank plots. i can use other solution above looks better: ax1 = subplot(211) df['a'].plot() df2['c'].plot() ax2 = subplot(212, sharex=ax1) df['b'].plot() df2['d'].plot() it's because axes 1d ndarray axes[0, 0] not valid index. 0 , 1 valid. change pl

c# - Why is the Destructor not being called? -

i have interesting scenario class inform entity has been destroyed; however, not doing want too. the problem the deconstructor, reason not supposed do. the question why destructor not being invoked , make sure necessary clean up. the code so here have informer ~ class connection { public const int port = 50000;// can range between 49152 , 65536 //teh constructor public boolean connect() { //setinformation information.id = 545; using (var webserv = new clientsdksoapclient("clientsdksoap")) { continueconnection.waitone(); webserv.clientlogin(information); } return true; } ~connection() { using (var webserv = new clientsdksoapclient("clientsdksoap")) { webserv.clientlogout(information); } } } additional information i want web service record if connection class destroyed given reason. when client connecting,

asp.net mvc - NullDisplayText Data Attribute -

i have mvc application , trying assign nulldisplaytext property fields in model, not getting results. here portion of model data attribute, null value should cause output "(none)"... public class task ... <displayformat(nulldisplaytext:="(none)", applyformatineditmode:=true, convertemptystringtonull:=true)> public property estimatedprice nullable(of decimal) ... end class when access property in view (strongly typed task of course) so... @modeltype projectname.task @html.valuefor(function(model) model.estimatedprice) the debugger says model.estimatedprice = nothing output nothing. why nulldisplaytext attribute not correctly working here? any ideas going wrong? in order <displayformat> attribute apply in view, have use @html.displayfor , @html.editorfor helpers. example: @html.displayfor(function(model) model.estimatedprice)

Specify different sort orders after click with jQuery tablesorter -

i started using excellent jquery tablesorter script. might dumb question, cannot figure out how specify order in columns sorted after clicking. not referring whether columns sorted in ascending or descending order, rather sequence in columns sorted. for example, if 1 clicks on column 2, might want sort column 2, column 4, column 5. however, if 1 clicks on column 3, might want sort column 3, column 5, column 4. thanks in advance advice! --mc i can guess asking how sort multiple columns? or mean want other columns automatically sort based on first column clicked? if want know how sort multiple columns then, default, hold down shift key click on columns sort in order. can change key changing sortmultisortkey option ( demo ). if want automatically sort multiple columns based on chosen column, recommend adding sort links/buttons you, otherwise taking choices away users. try ( demo ): html <button class="sort1">sort 1-3</button> <butt

binding - How to bind NSObject<EAAccessoryDelegate, NSStreamDelegate> in Monotouch? -

i trying bind library , have following definitions on .h files @interface fbfaccessorycontroller : nsobject <eaaccessorydelegate, nsstreamdelegate> { id <fbfmobileonedelegate> _delegate; bool scannerstarted; } @property (nonatomic, assign) id <fbfmobileonedelegate> delegate; @property (readonly, nonatomic) bool version1b; - (bool)mobileoneconnected; @property (readonly, nonatomic) nsnumber *voltindex; @property (readonly, nonatomic) bool scannerstarted; - (void)startscanner; - (void)stopscanner; - (void)checkbattery; @end for delegate @class fbfaccessorycontroller; @protocol fbfmobileonedelegate <nsobject> @required - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didchangeconnectionstatus:(bool)connected; - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didreceivedata:(nsdata *)data; @optional - (void) mobileoneaccessorycontroller:(fbfaccessorycontroller *)mobileone didrecei

ruby - RVM in Elementary Luna OS -

i error "rvm not function" when trying use in elementary luna os' terminal. there explanation here http://rvm.io/integration/gnome-terminal , elementary os'terminal has no setting menu(!) -- how can fixed in os? just open terminal , paste this: echo '[[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm"' >> ~/.bash_profile then execute this: source ~/.bash_profile and should work

gnu make - Makefile.am rebuilds entire project -

i have simple project: https://github.com/spesmilo/obelisk for reason 'make install' causes entire project rebuild everytime. seems object files getting built twice. have no idea why. 'make' fine though. full output: http://pastebin.com/gvwi2bkn ~/obelisk> make; make; make install making in include/obelisk make[1]: entering directory `/home/genjix/obelisk/include/obelisk' make[1]: nothing done `all'. make[1]: leaving directory `/home/genjix/obelisk/include/obelisk' making in src make[1]: entering directory `/home/genjix/obelisk/src' make[1]: nothing done `all'. make[1]: leaving directory `/home/genjix/obelisk/src' make[1]: entering directory `/home/genjix/obelisk' make[1]: nothing done `all-am'. make[1]: leaving directory `/home/genjix/obelisk' making in include/obelisk make[1]: entering directory `/home/genjix/obelisk/include/obelisk' make[1]: nothing done `all'. make[1]: leaving directory `/home/genjix/obeli

java - "File in use" error while publishing JAR on Windows 8 -

i publishing jar directly folder smartfoxserver uses extensions. if extension not in use, works, if extension in use file in use error. here's kicker: there setting in smartfoxserver automatically update extension during runtime if file updated. point is, file can overwriten without negative consequence. i don't think problem specific smartfoxserver or intellij though solution may be. when drag , drop file different publish location "extensions" directory want it, after confirm overwrite, good. any recommendations on how around this? the solution move installation of destination directory outside "program files". in case installed smartfoxserver @ c:\smartfoxserver_2x instead of inside program files directory.

java - Run a JAR file from the command line and specify classpath -

i've compiled jar file , specified main-class in manifest (i used eclipse export function). dependencies in directory labeled lib . can't seem straight answer on how execute jar file while specifying should use lib/* classpath. i've tried: ]$ java -jar -cp .:lib/* myjar.jar ]$ java -cp .:lib/* -jar myjar.jar ]$ java -cp .:lib/* com.somepackage.subpackage.main etc... each gives error saying: error: not find or load main class .... or gives noclassdeffounderror indicating libraries not being found. i tried remaking jar file , included lib directory , contents, still no dice... how can execute jar file command line , specify classpath use? when specify -jar -cp parameter ignored. from the documentation : when use option, jar file source of user classes, , other user class path settings ignored. you cannot "include" needed jar files jar file (you need extract contents , put .class files jar file) you have 2 options:

javascript - Improving code for a jQuery Button -

i'm starting js ans jquery , i've been trying improve code bootstrap 3 button i'm working on. it has 2 inside spans, 1 text , 1 chevrons font icons. i wondering if there way optimize code (just sake of learning). here working code. first html <button type="button" class="btn btn-default btn-lg btn-imgs"> <span class="btn-imgs-toggle">ocultar imágenes </span> <span class="glyphicon glyphicon-chevron-up"></span> </button> now jquery: $('.btn-imgs').click(function(){ $('.thumbnail img').toggle(); //variables var icono = $(this).children('.glyphicon'); var $text = $(this).children('.btn-imgs-toggle'); //cambia texto del boton $text.toggleclass('mostrar'); //si el texto y el icono coinciden con un tipo cambialos al otro if( $text.hasclass('mostrar') && $(i

plsql - How to Mimic a Continue Statement in a Cursor-For-Loop in Oracle 10G PL/SQL? -

in oracle 10g, there no continue statement. typically mimicked in explicit cursor such: open c_cur ; <<cont>> loop ... if condition = 10 goto cont ; end if; end loop; close c_cur ; given loop keyword follows cursor in cursor-for-loop syntax, how can continue statement mimicked? for rec in c_cur loop ... end loop ; for rec in c_cur loop ... if condition = 10 goto cont ; end if ; <<cont>> null; -- end cannot preceeded <<marker>> end loop ;

c - Why am I getting Expected Identifier or '('? -

i'm learning c , trying write simple program. here code: #include <stdio.h> int[] getnumbers( int x, int y, int z ); int main() { int[] thenumbers = getnumbers(5,6,7); return 0; } int[] getnumbers( int x, int y, int z) { int[] numbers = { x, y, z }; return numbers; } i can't figure out issue is. here's example approach works in c. there better approaches, it's unclear actual goals are. illustrates ways of handling trying do, in working c. c going more rigid , explicit language java. java happens have taken syntax c/c++. #include <stdio.h> typedef struct { int a[3]; } int_array; int_array getnumbers( int x, int y, int z ); int main() { int_array thenumbers = getnumbers(5,6,7); printf( "%d, %d, %d\n", thenumbers.a[0], thenumbers.a[1], thenumbers.a[2] ); return 0; } int_array getnumbers( int x, int y, int z) { int_array numbers = { x, y, z }; return numbers; }

javascript - Copy <li> and insert them after themselves -

i want copy contents of each of <ul> 's of selected class, that <ul class="testowyul"> <li>a</li> <li>b</li> <li>c</li> </ul> will change <ul class="testowyul"> <li>a</li> <li>b</li> <li>c</li> <li>a</li> <li>b</li> <li>c</li> </ul> it seemed simple, reason cannot make work. problem is, i'm using class (as there going multiple lists of type), , not know how select <ul> , perform clone() , append() . tried chaining $(".testowyul").children().clone().after(".testowyul"); didn't work. use $.append() function argument: $(".testowyul").append(function(){return $(this).children().clone();});

c++ - Application directory access -

is there way grant windows c++ application read/write access directory unprivileged user running application otherwise not have access to? writing , communicating service performs actual file access work, i'd prefer not throw code @ problem if there's easier / more straightforward solution. no the purpose of security make sure directories , other items not accessed when shouldn't be.

internet explorer 10 - What is MATM in my User-agent -

the used ie user-agent's in stats are: mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; matm) mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0) what matm stand for? matm codename hardware, 1 of several same vendor: useragent: mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; wow64; trident/6.0; matmjs) vendor: ts - useragent: mozilla/5.0 (compatible; msie 9.0; windows nt 6.1; trident/7.0; matm) vendor: ts - useragent: mozilla/5.0 (compatible; msie 9.0; windows nt 6.1; trident/7.0; matp) vendor: ts - useragent: mozilla/5.0 (msie 9.0; windows nt 6.3; wow64; trident/7.0; matbjs; rv:11.0) gecko vendor: ts - useragent: mozilla/5.0 (windows nt 6.3; win64; x64; trident/7.0; matpjs; rv:11.0) gecko vendor: ts - useragent: mozilla/5.0 (windows nt 6.3; wow64; trident/7.0; tnjb; rv:11.0) gecko vendor: ts - useragent: mozilla/5.0 (windows nt 6.3; win64; x64; trident/7.0; touch; tajb; rv:11.0) gecko ve

Javascript - Using a variable to get a piece of an array -

i working on webpage connects cgi backend. cgi backend far works perfectly, don't know javascript well, struggling handle getting results ajax json requests. what have: a javascript function queries cgi. the cgi responds in json array. { "array": [ { "line": "1", "numbers": "12321", "var": "12321", "var2": "12321" }, { "line": "2", "numbers": "-1", "var": "12320", "var2": "6160" } ] } line, numbers, var, , var2 must placed in separate cells of table. <table> <tr> <th>line</th><th>numbers</th><th>var</th><th>var2</th> </tr> <tr> <td>array[0].line</td><td>array[0].numbers<

tcl - create the variable's name after take off within a loop -

here's script: #!/usr/bin/expect set a1 "aaa" set a2 "bbb" set a3 "ccc" {set b 1} {$b<4} {incr b} { send a$b } the output : a1a2a3 looks instead of values $a1 $a2 $a3 all got actual names of "variables" is a1 a2 a3 let's try code: send $$b now output is $1$2$3 which means if can letter a sneaked there.. can create $a1 $a2 $a3 how can sneak letter "a" in there ? after need like.. $c = $$b send $c which means values become $c , can execute $c send . but $c = $$b is not working. , neither does. set c = $$b or c=$$b ultimately goal print values for $a1 , $a2 , $a3 some recommended arrays , lists, seem either not orderly or not organized can edit $a1, $a2, $a3, etc. ( hand ) there nothing wrong lists or arrays... but you're asking this: eval "puts \$a$b" but still, list meant task, use it. edit: seems right way is: puts [set a$b]