Posts

Showing posts from August, 2010

reflection - Java private method hiding public accessors -

i have class this: import java.util.list; import java.util.string; import javax.xml.bind.annotation.xmltype; @xmltype public class foo { private list<foo> compound; private string bar; // private method used internally know // if compound instance private boolean iscompound() { return compound != null && compound.size() != 0; } // public setter compound instance var public void setcompound(list<foo> compound) { this.compound = compound; } // public getter compound instance var public list<foo> getcompound() { return compound; } public void setbar(string bar) { this.bar = bar; } public string getbar() { return bar; } } in normal use, class behaves expect. methods getcompound , setcompound , set compound list. however, i'm using class object that's passed in web service built using jax-ws. when jax-ws compiler sees class, ignores setco

ksh: zero divisor error when declaring a variable -

update : weird. looked further, , realized there 2 *ksh packages in server: pdksh-5.2.14-37.el5_8.1.x86_64 mksh-39-7.el6_4.1.x86_64 and mksh set in /etc/alternatives : lrwxrwxrwx 1 root root 9 apr 23 10:39 /etc/alternatives/ksh -> /bin/mksh i pointed /bin/pdksh , tried script again, , worked. to replicate issue, changed /bin/mksh , time, script worked without error. in short, not replicate issue anymore. weird. i'm looking further. thanks. given korn shell script: #!/bin/ksh u=$1 with $1 passed abc/s0mething , how can work around error? ksh: abc/s0mething 0 divisor. ksh version: @(#)mirbsd ksh r39 2009/08/01 thanks. it's weird, if asking workaround, can be u=`printf '%q' $1` however, not able replicate problem on system understand it... if doesn't work, shall remove answer.

git - Gerrit - Gitlab Integration -

in order improve development process, our organization have decided introduce gerrit in development workflow. person responsible implementing gerrit server. user guides available in internet helpful in implementing gerrit our existing workflow. using jenkins , sonar non-interactive users verifying builds. while dealing repositories 1 question rises. of open sources using gerrit-replication plugin replicate latest code public code repository. these public repositories exposed using gitlab users can clone code. here doesn't need public repository code maintained in house. is choice point both gitlab , gerrit common git repository location? any appreciated. you can use gerrit in front of gitlab via replication feature. replication feature not git clone/fetch, pushs (approved) changes remote repository. you have import repositories via e.g. 'git push origin master' requires permissions (or need admin). not big deal unless forget remove these permissions. if

push notifications iOS add device -

i new iphone , when tried test xcode project push notifications , doesn't token , failed token , think because when creating certificate didn't mark on device , want add device testing , token should ?? - (void)application:(uiapplication*)application didregisterforremotenotificationswithdevicetoken:(nsdata*)devicetoken { nslog(@"my token is: %@", devicetoken); } - (void)application:(uiapplication*)application didfailtoregisterforremotenotificationswitherror:(nserror*)error { nslog(@"failed token, error: %@", error); } for should first set provisioning profile in have added device udid. add below code register pushnotification in device. when run app first time ask permission . //push noti [[uiapplication sharedapplication]registerforremotenotificationtypes:(uiremotenotificationtypealert|uiremotenotificationtypebadge|uiremotenotificationtypesound)]; if allow below delegate called. , give device token. -(void)application:(uiappl

php - Symfony2 : Redirect user to index page when page not found or 404 errors thrown -

i want redirect user particular page when page not found error comes in symfony2. for customization of error page message created app\resources\twigbundle\views\exception\error404.html.twing but want redirect user particular page. how can that? thanks you want create event listener listens kernel.exception event kernel dispatches when encounters exception. then, check inside listener if exception instance of notfoundhttpexception , , if is, redirect page of choice. here's exemple: <?php // src/acme/demobundle/eventlistener/acmeexceptionlistener.php namespace acme\demobundle\eventlistener; use symfony\component\httpkernel\event\getresponseforexceptionevent; use symfony\component\httpfoundation\redirectresponse; use symfony\component\httpkernel\exception\notfoundhttpexception; class acmeexceptionlistener { public function onkernelexception(getresponseforexceptionevent $event) { // exception object received event $exception = $

html - How to lock JavaScript element on page? -

i made new element in javascript , appendchild ed parentnode of html element, seems great, see , can put data in it, when i'm trying change size of browser, or scroll element "following me". how can "lock" it, won't move place put in? thank answering. made it! :) used method wrote @abhishek verma. you can create element , apply following css class. .staticelement { position: static; top: 0: left: 250; } you can change position of div changing value of top left element in css.

Java Syntax expression.new MyClass -

having function public parametermethodparameterbuilder withparameter() { methodparameter parameter = new methodparameter(); return withparameter(parameter).new parametermethodparameterbuilder(parameter); } what mean of experession below withparameter(parameter).new parametermethodparameterbuilder(parameter) the syntax obj.new inner() creates , returns instance of inner class(*) inner linked instance obj of encapsulating class. when inner class declared, need instance of encapsulating class instantiate inner class. syntax confronted purpose. here simplest example this: public class mainclass { public class innerclass { } } you instantiate innerclass way: mainclass mc = new mainclass(); mc.new innerclass(); (*) inner class = non-static nested class

xmlhttprequest - Flash crossdomain multipart POST not working? -

i'm using moxie xhr2 polyfill issue crossdomain post file upload, using formdata construct multipart request containing file object fileinput . using html5 runtime, request successful , file uploaded. however, when using flash runtime, crossdomain.xml requested, request hits readystate 4 status of 0, suggesting request cancelled because invalid cross-domain request. the crossdomain.xml spec mentions nothing request methods. quick search on moxie github turns this issue , seems have been resolved, although issue still open. unlike in issue, i'm not seeing any request go through after crossdomain.xml . the code send request: var xhr = new moxie.xmlhttprequest(); xhr.open('post', url, true); xhr.bind('load', function() { if(this.status === 200) { // yay! } else { // boo! } }); var form = new moxie.formdata(); form.append('file', file); // file moxie.file fileinput xhr.send(form); my crossdomain.xml following: <?x

multithreading - What happens during an ioctl/syscall done in thread while another thread is forking? -

i've read a lot can happen when mixing threads , forking , should better avoided. i'm finding myself in situation don't have choice , receive kernel-crash of kernel-module. my reduced test-case has 2 threads. 1 of doing ioctls open device-node in loop. other 1 doing 1 fork, waits child exit, immediately. if use pthread_atfork synchronized thread fork-call working. where can @ find out more on happens during fork on open file-descriptors executing ioctl ? kind of corruption can happen? edit : andreas made me change test case. instead of having child exiting immediatly i'm not waiting 10 seconds before exiting. i'm collecting pid in parent-process later waitpid. i'm forking 100 times. if makes crash after 2 or 3 forks. there should no problem caused threading in regard. there should no kernel crashes. from description sounds writing own kernel module handles file descriptor in question. note forked process gets copies of open file descriptor

winforms - Multiple child and parent form in C# -

i have 6 forms (let f1,f2,f2a,f2b,f2c,f2d) i'm trying make f2a - f2d childs of f2 while f2 parentform f1 , f1 child form f2 what i've tried f1 private void button1_click(object sender, eventargs e) { f2 nx = new f2(this); this.visible = false; nx.visible = true; } f2 public f2(f1 parentform) { initializecomponent(); this.of = parentform; f2a na = new f2a(this); //it give me error describe down there. } public f1 of; f2a - f2d public f2* (f2 parentform) //well lets * stand letter of each form { initializecomponent(); this.of = parentform; } public f2 of; on f2 gives me 2 error 1.the best overloaded method match 'gui_x.f2a.f2a(system.windows.forms.f2)' has invalid arguments 2.argument 1: cannot convert 'gui_x.f2' 'system.windows.forms.mainmenu' so why isn't work f2 f2a - f2d while it's work f1 f2 ? wrong put ?how can resolve ? i'm new c#

PHP odbc_connect Foxpro database -

i'm wondering if it's @ possible connect foxpro database or free table via php odbc_connect . i've tried other examples doesn't want connect. if i'm using odbc_connect need put in quotes? $conn = odbc_connect ('','',''); there no password foxpro database or user associated table. value of $dsn variable? this page shows appropriate odbc connection strings vfp, both database , free tables: https://www.connectionstrings.com/visual-foxpro/

javascript - Google Plus API onload callback behavior -

i trying load google plus api within function in object, like: var myobject = { initialize : function(options) { window.___gcfg = { parsetags : 'explicit' }; (function() { var po = document.createelement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js?onload=onloadgoogleplus'; var s = document.getelementsbytagname('script')[0]; s.parentnode.insertbefore(po, s); })(); ... then have onloadgoogleplus() defined outside object, regular global function. now, if execute anonymous function load gapi within object, using initialize() function callback not called. in case "this" keyword points object. but, if following (which makes "this" keyword point "window"), work: initialize : function(options) { window.___gcfg = {

Sending files and directories using scp -

i want send following files computer remote computer using scp . directory1 file1 file2 directory2 file3 file4 ... how can send file1 , file2 , etc. such saved same directories on remote computer on computer (e.g. directory1 , directory2 created on remote computer , directory2 contains file3 , file4 )? copy directory "foo" local host remote host's directory "bar" scp -r foo your_username@remotehost.edu:/some/remote/directory/bar the -r tells copy recursively.

python - Storing logical conditions in a dictionary and passing them to if statements -

i have dictionary of logical conditions, i.e. == 1, need use in if statement evaluation. may not possible, wanted find out sure. sample code: z = {'var1':['a == 1'], 'var2':['b == 3'] } = 6 b = 20 #if use dictionary value in if statement this: if z['var1']: print 'true' else: print 'false' #it evaluate true. want statement #translate following form: if == 1: print 'true' else: print 'false' i have been searching various permutations on if statements, list comprehensions , string manipulation, haven't found results matching problem. if not possible, i'd know. if there better approach, i'd know well. in advance answers. you trying store expression, possible use built-in eval() function (you can use exec if want play around statements). >>> = 6 >>> b = 3 >>> z = { 'var1':eval('a == 1'), 'v

internet explorer - Detect when a web page is loaded without using sleep -

i creating vb script on windows opens site in ie. want: detect when web page loaded , display message. achieved using sleep ( wscript.sleep ) approx. seconds when site gets loaded. however, site pops user name, password in midway. when user enter credentials, finishes loading page. don't want use "sleep" approx seconds, instead exact function or way detect page got loaded. checked on line , tried using do while loop, onload , onclick functions, nothing works. simplify, if write script open site yahoo , detect, display message "hi" when page loaded: doesn't work without using sleep ( wscript.sleep ). try conventional method: set objie = createobject("internetexplorer.application") objie.visible = true objie.navigate "https://www.yahoo.com/" while objie.readystate <> 4 wscript.sleep 10 loop ' code here ' ... upd: 1 should check errors: set objie = createobject("internetexplorer.application")

php - Block user not listed in vhost -

i using vhosts file in apache server , have hundreds of domains pointing each 1 one documentroot folder. the problem when user comes server domain not listed in vhosts apache treat first entry in vhosts default. not that. block user, not display page. how can that? i believe want: <virtualhost _default_:*> documentroot /www/default //or ever </virtualhost>

python - how to read and and untar tar.gz files in IPython -

i tried %%sh tar xvf filename.tar.gz but didn't work. how read tar.gz files in ipython. thanks i can't understand why want python (and specially ipython), it's ok... for put command system python use subprocess: from subprocess import call # first param must command, , options, # call(["tar", "-xzf", "filename.tar.gz"]) and must work not on ipython, in every python program.

javascript - How to show an alert if all checkboxes aren't checked? -

i want alert if check-box not checked (- working ) and alert if all check-box not checked ( need in ) checkbox : <input type="checkbox" value="1" id="data" name="data[]"> <input type="checkbox" value="2" id="data" name="data[]"> <input type="checkbox" value="3" id="data" name="data[]"> button : <input name=\"submitclose\" type=\"submit\" value=\"close\" id=\"submitclose\"> below jquery : echo "<script> jquery(function($) { $(\"input[id='submitclose']\").click(function() { var count_checked = $(\"[id='data']:checked\").length; if (count_checked == 0) { alert(\"please select packet(s) close.\"); return false; } else{

Android convert/compile C++ as Neon -

i writing simple android program using c++ of jni , opencv. input image stored mat. instead of using opencv's normalize function, wish write own normalize function in c++. know, there support neon. however, looking @ helloneon sample in ndk folder, realised code written in neon instrinsics. question: there way directly compile c++ code neon code? i.e. wish avoid writing function in neon intrinsics. thank you. largely depends on compiler. both gcc , clang support "automatic vectorizing" in recent versions, quality of generated code variable - depending on actual source code. always, compiler firstly responsible generating correct code, secondly generate fast/efficient code. if in doubt, go "safe" option. it should, however, work use -mfpu=neon -ftree-vectorize . i expect need "massage" code make vectorize well, - @ least that's experience on x86, compiler attempt build sse instructions when vectorizing. succeeds in simple cases,

r - Subsetting a list of data frame with multiple criteria -

i have large dateset multiple data forest inventory. data frame contains species found in each plot. , data organized site. > str(mm,max.level=2) list of 50 $ :'data.frame': 2944 obs. of 18 variables: ..$ plot : int [1:2944] 2 3 3 3 3 4 4 4 5 5 ... ..$ cla : factor w/ 2 levels "a","n": 1 1 1 1 1 1 1 1 1 1 ... ..$ subclase : factor w/ 7 levels "1","3c","3e",..: 5 2 3 2 3 2 3 3 1 1 ... ..$ posesp : int [1:2944] 1 1 1 2 2 1 1 2 1 2 ... ..$ especie : int [1:2944] 28 72 72 41 44 28 43 28 28 43 ... ..$ ocupa : int [1:2944] 10 6 7 3 2 9 5 4 5 5 ... ..$ estado : int [1:2944] 3 4 4 4 4 4 2 2 1 2 ... ..$ fpmasa : int [1:2944] 1 4 4 4 4 2 4 2 1 4 ... ..$ edad : int [1:2944] 14 na na na na 35 na 5 2 na ... ..$ finfor : int [1:2944] 8 na na na na 7 na 5 1 na ... ..$ fiabil : int [1:2944] 4 na na na na 4 na 3 4 na ... ..

php - MemcachePool::get(): Server localhost (tcp 11211, udp 0) failed with: Network timeout -

i have been working memcache , php long time , great have been getting error after every 10 15 minutes. memcachepool::get(): server localhost (tcp 11211, udp 0) failed with: network timeout i thought might due firewall or turned of firewall yet didn't stop giving message. after every error have restart memcache. and it's memcache not d on windows 7 machine php 5.4 msvc9 ts version. can not understand network timeout issue. can done solve this. currently, have 1 local machine windows 7 cannot make cluster of memcache or install memcache(d). unsure if memcache daemon or client issue.

php headers doesn't downloads -

i trying make "force download" via php, strange symbols. i tried add header ("application/typeofmyfile") , header ("content-disposition")... , many others many other post here, nothing i've got this: $f_location = "path/myfile.nl2pkg"; $f_name = "myfile.nl2pkg"; header("content-type: application/octet-stream"); header("content-disposition: attachment; filename=".$f_name); //here tried basename($f_name) nothing header("content-length: ".filesize($f_location)); header("content-transfer-encoding: binary"); i'm doing because when user clicks on "download" button, ajax send him page force download, put data in db , refresh main page. it's first time working on headers, , read, don't know if i'm doing wrong. your headers code seems fine. problem seems somewhere else. to debug code use headers_sent determine if headers have been sent. can use

python - Starting OPEN CL - How to bring a GPU card to its maximum? -

i new gpu computing , need advice , since seems open cl becomes new industry standard move on it, instead of cuda. so used python , multiprocessing fantastic , simple tool. want expand processing capacity gpu power. far have 1 function needs calculated. so far calling function numbers calculated , result after 10 seconds. how can open cl , best tool program open cl under python ? it possible use decorator, send function gpu card , calculate in light speed ? if possible want sent function several thousand times gpu parallel processing 100% calculation power ? how can , open cl right tool of doing ? any advice or demo code appreciated. regards frank the popular method of using opencl python pyopencl . pyopencl full wrapper around opencl api, provides every piece of opencl functionality within python, along nice pythonic simplifications. it's not quite easy adding decorator function, it's still pretty straightforward , running it. there's set of docume

reporting services - Visual Studio 2008 setup for SSRS development on AX 2009 -

Image
my problem didn't find how develop outside production environment, mean when deploy dynamics ax reporting projects, find them in ax production environment, there way specify deployment target (dev, test or other)? tried add /axconfig switch visual studio shortcut path ax config files different environment have error message visual studio: invalid command line. unknown switch : axconfig. i'm using ax 2009 no sp1, sql server 2005, visual studio 2008, reports working fine in visual studio , ax. just change in project properties change these settings

Is there a way I can get appium to start within the code? -

i trying launch appium server within code writing using java. tried following command , doesn't work: appium = runtime.getruntime().exec("/usr/local/bin/appium"); in order start appium on os x should include 'open' , add '.app' @ end. for example: appium = runtime.getruntime().exec("open /applications/appium.app");

Grizzly 2.3.11 + Atmosphere 2.1.3: getServletPath() returns null -

hellow fellow developers! i'm testing atmosphere 2.1.3 using grizzly 2.3.11. i've created managedservice(path="/chat") , error: 'no atmospherehandler maps request /chat status 500 message server error'. if change path managedservice(path="/") works. i've debugged bit , seems org.atmosphere.cpr.atmosphererequest.getservletpath() returns null, default path "/" used , that's cause makes test work using managedservice(path="/") . well, i'll appreciate because need use path kinda managedservice(path="/chat"). in advance! note: post related atmosphere + grizzly: no atmospherehandler maps request /chat status 500 message server error pd: main test class: package com.dweb.atmosphere.grizzly; import java.io.ioexception; import org.atmosphere.container.grizzly2cometsupport; import org.atmosphere.cpr.atmosphereservlet; import org.glassfish.grizzly.comet.cometaddon; import org.glassfish.grizzly.http.serve

html - Mouseover image pulls other images down -

i'm having problem images of website i'm making. i've been trying different ways solve , best found far. still, it's not need. have 8 buttons , need second 1 replaced bigger image. thing is, pulls others down, , wanted on them. there way it? did in coding: <a href="index.html"> <input type="image" src="hp-homebutton.png" alt="submit" style="position: relative;" value="home button"/> </a> <p> <img src="hp-monthsbutton.png" onmouseover="this.src='hp-months.png'" onmouseout="this.src='hp-monthsbutton.png'" style="position: relative;"/> <p> <img src="hp-forumbutton.png" style="position: relative;"/> <p> <img src="hp-newsbutton.png" style="position: relative;"/> <p> <img src="hp-contactbutton.png" style="position: relative;"/> <

android - Alert Dialog closes without pressing anything_android -

i want code below razrada.show(); executing after press save on alertdialog, shows , closes code alertdialog.builder razradaplacanja = new alertdialog.builder(noviracun.this); razradaplacanja.settitle("način plaćanja"); layoutinflater inflater = getlayoutinflater(); view vieww = inflater.inflate(r.layout.razrada, null); razradaplacanja.setview(vieww); final edittext gotovinaedit = (edittext) vieww.findviewbyid(r.id.gotovinaedit); final edittext karticeedit = (edittext) vieww.findviewbyid(r.id.karticeedit); razradaplacanja.setpositivebutton("save", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int which) { try { json.put("totalcash", gotovinaedit.gettext().tostring()); json.put("totalcreditcards", karticeedit.gettext().tos

c# - IObservable<T>.ToTask<T> method returns Task awaiting activation -

why task await forever?: var task = observable .fromeventpattern<messageresponseeventargs>(communicator, "pushmessagerecieved") .where(i => i.eventargs.getrequestfromreceivedmessage().name == requestname) .select(i => i.eventargs) .runasync(system.threading.cancellationtoken.none) .totask(); task.wait(); i know "pushmessagerecieved" fired; can set break point on select lambda , hit it. task.wait() never moves. better update: firstasync() looking for: public static task<messageresponseeventargs> handlepushmessagerecievedasync(this icommunicator communicator, requestname requestname) { if (communicator == null) return task.fromresult<messageresponseeventargs>(null); var observable = getcommunicatorobservableforpushmessagereceived(communicator); return observable .where(i => i.getrequestfromreceivedmessage().name == requestname) .select(i => i)

QML on android - will C++ work for business logic? -

doing investigation on feasibility of using qt/qml upcoming project. client wants on windows , mac desktops, possibility of ios , android down road. know build move relatively easily. i'm not of desktop programmer, see qml designed work c++. result, should relatively easy build app runs on mac , windows, , ios accept c++, can't see lot of roadblocks there. i'm confused android. see folks talking building android app using qml, seem still using java; gather uses ndk in background. but if write application has qml front and, , c++ guts not covered qml, can work on android? or need rewrite c++ piece in java? app not simple one, going have provide logic outside of qml, @ least, sure looks way. while might save time , $$$ using qt not have go native on desktops , ios, see problem android down road. but if write application has qml front and, , c++ guts not covered qml, can work on android? or need rewrite c++ piece in java? it depends. may need go through ja

vb.net - MeasureText() - SizeF to inches -

i guess don't know search terms use, should simple... determine width in inches of string. dim ssize system.drawing.sizef dim ffont new font("arial", 12) ssize = me.creategraphics().measurestring(txtaddr.text, ffont) the units here whatever ide using. i'm not sure constant value, if conversion should straightforward. any way, want convert returned units inches when text printed @ 100% using specified font. how do that? thanks hans! dim boxgraphics graphics = txtaddr.creategraphics() dim ssize system.drawing.sizef = boxgraphics.measurestring(txtaddr.text, new font("arial", 12)) dim iinches single = ssize.width / boxgraphics.dpix beginnings of dymo labelwriter 450 code might interested: ' project ref dymo.label.framework .net 3.5/4 ' imports dymo.label.framework dim olabel label olabel = label.open("h:\info\forms\admin\dymo labels\apcdaddress.labe

c# - How to add Outlook toolbar under the subject line? -

i need write outlook 2003-2010 plugin using c# adds two buttons message ribbon bar (#1 on picture) , several buttons toolbar or form region under "subject" line (#2 on picture) . see image here currently managed add button ribbon toolbar, appears in "add-ins" ribbon bar. how add buttons "message" ribbon bar? and how add toolbar #2 ? have no clue how add it. please me! i have follwing code: using system; using system.collections.generic; using system.linq; using system.text; using system.xml.linq; using outlook = microsoft.office.interop.outlook; using office = microsoft.office.core; using system.windows.forms; namespace sendlatertoolbar { public partial class thisaddin { office.commandbar newtoolbar; office.commandbarbutton firstbutton; office.commandbarbutton secondbutton; outlook.explorers selectexplorers; outlook.inspectors inspectors; office.commandbarbutton _objemailtoolbarbutt

Why is my VHDL detector not recognizing the state change? -

i having problem vhdl code, hope help. see, 'q' signal supposed detect whether state has changed or not, never does. if state never gets 'detecting' 'idle'. q signal remains on '0' value, though state changes, while reset off , clk signal on upper edge. hope see problem is. p.s. state_reg signal state @ moment , next 1 next state. qlevel_detected signal used debugging. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity detector port ( clk, reset : in std_logic; level : in std_logic; q : out std_logic; qlevel_detected : out std_logic ); end detector; architecture behavioral of detector type state (idle, detecting); signal state_reg, state_next : state; signal level_detected_reg, level_detected_next : std_logic; begin process(clk, reset) begin if (reset

ruby on rails - Past time while testing with Rspec -

i'm curious on practices around testing time in rspec, ie. datetime data type , date data type. on shorthand, problem have, i'm trying test lsting page ie. index.html.erb looking past tense time method use not future tense time method. require 'spec_helper' describe 'list objects' 'shows objects' object11 = object.create( title: 'local stuff', description: 'an article on local disputes', posted_from: 'new jersey', posted_by: 'ned flanders', posted_at: 6.days.from_now <-- looking past tense time method use. ) visit objects_url expect(page).to have_text(object1.title) expect(page).to have_text(object1.description) expect(page).to have_text(object1.posted_from) expect(page).to have_text(object1.posted_by) expect(page).to have_text(object1.posted_from) expect(page).to hav

javascript - cross domain upload with uploadify -

Image
i trying upload video file youtube youtube data api(using python client library) through uploadify, this trying $('#id_file').uploadify({ 'uploader' : uploadify.swf', 'script' : 'https://uploads.gdata.youtube.com/action/formdataupload...........(youtube post url)', 'scriptaccess' : 'always', }); but getting flash security error while uploading this screenshot of error msg. , does uploadify support third party upload? or need configuration ? any input help. thanks

java - Sign JAR file with thawte certificate -

i´m trying sign jar file thawte certificate i´ve runned problems , try explain i´ve done. step 1 i´ve created keystore file in jks format using following command: keytool -genkey -keystore keystore -alias alias -keyalg rsa -keysize and generating certificate: keytool -certreq -alias alias -keystore keystore -file file.csr after i´ve done did send generated certificate request thawte confirmation. step 2 - notice: done on other computer. after while i´ve received email thawte containing confirmation , code signing certificate. when i´ve received confirmation created 2 .cer files. 1 containing received certificate , containing thawte intermediate certificate got website. imported these keystore used in step one. step 3 the last thing dig signed jar file using following command: jarsigner c:\signed\file.jar keystore everything went fine except warning: warning: signer certificate expire within 6 months. no -tsa or -tsacert provided , jar no

c# - Visual Studio 2010 - changing Language property -

is possible change language property of main form via code? if so, how? details: in config file have set lang="en". want use localization setting change main form dependent on variable. have set localizable property true . for example: if (config.lang == "fr") { //change **language** property "french" } else { //remain (default) } the issue don't see language property anywhere in coding window no matter i'm wondering if it's possible this. because of way resources managed in .net ui programs, easiest way set thread locale appropriately right @ start of program before create forms. firstly determine culture want config file: cultureinfo culture = ... whatever then set main thread's currentuiculture , currentculture locale: system.threading.thread.currentthread.currentuiculture = culture; system.threading.thread.currentthread.currentculture = culture; this code go program.cs @ start of main() .

visual studio - "No appropriate mapping exists" error while unshelving shelveset in TFS -

Image
i using tfs 2012. in tfs there more 15 users. when try unshelve shelveset files shows error shown below interesting error not comes few users, , able unshelve it. users have same permission. error comes 1 user , user not come in same pc(tfs server installed pc).so it's little strange error. thinking may problem mappings,but user same kind of mapping allows unshelve it. tried re creating user , not solve problem. why error comes? check workspace have selected in "pending changes" and/or "source control explorer", must have workspace selected has mapping includes path server path of file trying unshelve. so if file on shelveset is: $/tfs/main/file1.cs , need have workspace selected has mapping either includes file or 1 of it's parent folders (e.g. $/tfs/main ) i have multiple workspace different branches , see error when try unshelve "main" workspace when "feature branch" workspace selected.

jquery - Why doesn't an F5 key press in Chrome remove AJAX-added elements from the DOM? -

i'm loading more elements on page via ajax. elements loaded when user scrolls bottom of browser window. i've noticed if viewing top of page , hit f5, elements have loaded via script removed page. however, if i'm scrolled half-way down page , hit f5, elements have been loaded via script aren't removed - remain on page. have expected ajax-added elements removed on f5 press regardless of have scrolled in browser window. update: happens in chrome only. can explain this?

php - Correct SQL Query for Accessing Groups available to User -

i have series of tables set in following way (they have been simplified readability): user - id - name user_has_oi_relationship - user_id - oi_relationship_id oi_relationship - id - description chat_group_has_oi_relationship - chat_group_id - oi_relationship_id chat_group - id - name - description each entry in 'user' table has series of oi relationships attached it, defined in 'user_has_oi_relationship' table. each chat group has series of oi relationships attached it, defined in 'chat_group_has_oi_relationship' table. what i'd select available chat groups available particular user, defined user id, based on oi relationships. i'm pretty joins , such, 1 stumping me. keep getting groups returned! i think should it: select cg.* chat_group cg join chat_group_has_oi_relationship cgr on cg.id = cgr.chat_group_id join user_has_oi_relationship ur on ur.oi_relationship_id = cgr.oi_relationship_id join user u on ur.user_id = u.id u.name

node.js - Installing node modules with node-gyp spawn ENOENT error -

i'm trying install dependencies of node-rtp-midi module. followed tutorial on node-gyp github , searched internet many hours. can't thing work. every time module needs node-gyp, installation of dependencies fails. bellow can find screenshot cmd output. http://i.imgur.com/jlzicdt.jpg?1 any appreciated! visual studio 2012 installed windows sdk installed python 2.7 installed node.js version 0.10.26 node-gyp version 0.13.0 you need set python envvar full path including executable! path variable not enough. set python=c:....python\2.7.4\python.exe otherwise node-gyp finds correct path , executes found path, not executable. result enoent.

c++ - There seems to be a contradiction in §12.3.2/1 in the C++11 Standard -

c++11 standard §12.3.2/1 (emphasis mine): a member function of class x having no parameters name of form conversion-function-id : operator conversion-type-id conversion-type-id : type-specifier-seq conversion-declarator conversion-declarator : ptr-operator conversion-declarator specifies conversion x type specified conversion-type-id . such functions called conversion functions. no return type can specified. if conversion function member function , type of conversion function (8.3.5) “function taking no parameter returning conversion-type-id ”. is conversion function member function, or there cases not true? the clause "if conversion function member function," added working draft in n2798 part of concepts wording per n2773 proposed wording concepts . n2798 12.3.2/1 reads (i'll use bold show additions, , strikeout show removals): 1 member function of class x having

webintents - How can I confirm a Twitter web intent was sent? -

i'd confirm user tweeted after clicking twitter web intent . how can accomplish this? example: <a href="https://twitter.com/intent/tweet?text=simple+web+intent">tweet</a> assuming anonymous* user clicks link , tweets, how can confirm this? ideally i'd love link tweet. * anonymous in not authenticated on site , without knowing twitter username update this solution no longer works after twitter updated behaviour of widgets. can track if tweet button clicked now, , not if tweet posted. you can track tweets using 'twttr.events.bind' event listener form twitter api. working example of tracking tweets can found here: http://jsfiddle.net/ez4wu/3/ html : <a href="https://twitter.com/intent/tweet?url=https://www.webniraj.com/2012/09/11/twitter-api-tweet-button-callbacks/&text=twitter+api:+tweet+button+callbacks"><i class="icon-twitter-sign icon-white"></i> tweet</a> javas

Why does double brackets notation escape strings in bash? -

given following example code: var="foo" if [[ ${var} != 'bar' ]]; then... if run piece of code in bash debug mode ( bash -x ), reads out follows: [[ foo != \b\a\r ]] it still passes correctly, why show escapes? there better way this? set -x ignores particular method of escaping , quoting, , constructs own equivalent representation of strings. shouldn't care exact format. 'bar' , \b\a\r encodes exact same string, , that's matters.

JavaScript JSON Array Numbers Are Inconsistent -

i have json includes array each key. of time, when access number leading zero, returns number integer. (this expect.) when try access number 0400 through 0577 (inclusive) returns number seems relative 256. can me understand why happens range of numbers? var pricelist = { "1":['product 1',0400, 1375,0200], "2":['product 2',0425, 0599,0200], "3":['product 3',0399, 0579,0200] } alert(pricelist[1][1]); // expect alert 400 -- actual alert: 256 alert(pricelist[2][1]); // expect alert 420 -- actual alert: 277 alert(pricelist[3][1]); // expect alert 399 -- actual alert: 399 assuming mean json , not javascript object literal syntax, have not legal json since contains leading 0 in number disallowed in json. legal json, consider, { "1": ["product 1", 400, 1375, 200], "2": ["product 2", 425, 599, 200], "3": ["product 3", 399,