Posts

Showing posts from April, 2015

npm - Facing issue in setting my first react-native project. -

npm err! darwin 14.5.0 npm err! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "--save-exact" "react-native" npm err! node v4.2.1 npm err! npm v3.10.6 npm err! code econnreset npm err! network tunneling socket not established, cause=getaddrinfo enotfound proxy proxy:8083 npm err! network not problem npm npm err! network , related network connectivity. npm err! network in cases behind proxy or have bad network settings. npm err! network npm err! network if behind proxy, please make sure npm err! network 'proxy' config set properly. see: 'npm config' npm err! please include following file support request: npm err! /users/i816556/awesomeproject/npm-debug.log npm install --save --save-exact react-native failed probably have npm related issues. check question more help.

algorithm - Find all simple cycles through a given node in Neo4j -

i'm working graphs , knew neo4j . can neo4j me find simple cycles go through given node in graph? i can in java / python code implementing a modification of johnson's algorithm . this example of graph created, cypher code can executed on neo4j database: create (john:person { name : '@john',facebook: 'facebook.com/john'}) create (josh:person { name : '@josh',facebook: 'facebook.com/josh'}) create (dan:person { name : '@dan',facebook: 'facebook.com/dan'}) create (kenny:person { name : '@kenny',facebook: 'facebook.com/kenny'}) create (bart:person { name : '@bart',facebook: 'facebook.com/bart'}) create (mike:person { name : '@mike',facebook: 'facebook.com/mike'}) create (jenny:person { name : '@jenny',facebook: 'facebook.com/jenny'}) create (frank:person { name : '@frank',facebook: 'facebook.com/frank'}) create (erick:person { name : '@eri...

BigCommerce - Stencil - client configurable text value pair -

working on stencil theme supports third-party javascript widget. no problem passing product data script. problem need pass client's license key , don't want hardcode in template. schema.json not support text field. idea how store owner can set text configuration accessible via yaml? any reason setting value in config.json file , calling template wouldn't work? you set value in config file so. "settings": { "my_license_key": "abcdefg", .... } then call value in template. <p>{{theme_settings.my_license_key}}</p> this way wouldn't need include yaml attribute on each page need value either.

windows - Xamarin Tools->Android menu disabled in Visual Studio 2015 -

as in title, cannot use xamarin in visual studio 2015 on windows 10, because have tools > android menu disabled. has got same issue? trying figure out problem , find solution hours, nothing reinstalling visual studio or installing android studio , later launching visual studio helps. the solution solve problem : to launch uninstaller.exe in c:\program files (x86)\android\android-sdk then manual installation https://developer.xamarin.com/guides/android/getting_started/installation/windows/manual_installation/ now ok, sub menus under tools / android active. @moderator: yesterday put ide logs jon douglas asked because had same issue , post not here. why ?

Trying to make jquery validation errors get added dynamically, why isn't this code working? -

i'm using following code try , dynamically add error labels , not have use many if else statements doesn't seem work, appreciated :) this works: errorplacement: function(error, element) { if (element.attr("name") == "site" ) error.insertafter("div#siteerror"); else if (element.attr("name") == "name" ) error.insertafter("div#nameerror"); else if (element.attr("name") == "email" ) error.insertafter("div#emailerror"); else if (element.attr("name") == "password" ) error.insertafter("div#passworderror"); else if (element.attr("name") == "headerimage" ) error.insertafter("div#headerimageerror"); else if (element.attr("name") == "header1" ) error.insertafter("div#header1error...

search - Iterative Deepening Without Specified Depth Limit -

i have question regarding search technique iterative deepening. question is, difference between normal depth-first search , iterative deepening without specified depth limit? have tree goal node have no specified limit in iterative deepening search. output same traversal sequence if regular depth-first search? suppose goal @ depth level of 3 (with root being @ depth = 0), , it's not way on "left" side of tree (where found depth-first search (dfs)). a normal dfs may spend lot of time search @ depth levels of 4, 5, 6, etc., beforing moving "up" tree, "to right", , finding goal @ depth 3. iterative deepening, if there goal @ depth = 3, never waste time looking @ nodes @ depth = 4. because iterative deepening first dfs depth limit of 1, dfs depth limit of 2, , dfs depth limit of 3 (which find goal , therefore terminate search). note in example situation, breadth-first search (brfs) not waste time @ depth of 4, , bit faster due not re-doing...

groovy - Creating/updating array of objects in elasticsearch logstash output -

i facing issue using elastic search output logstash. here sample event { "guid":"someguid", "nestedobject":{ "field1":"val1", "field2":"val2" } } i expect document id present in elasticsearch when update happens. here want have in elastic search document after 2 upserts: { "oldfield":"some old field original document before upserts." "nestedobjects":[{ "field1":"val1", "field2":"val2" }, { "field3":"val3", "field4":"val4" }] } here current elastic search output setting: elasticsearch { index => "elastictest" action => "update" document_type => "summary" document_id => "%{guid}" doc_as_upsert => true script_lang => "groo...

angularjs - iam trying to send data from angular services to nodejs backend Nothing happens -

i have enclosed service function here. iam trying send simple data node backend nothing happens. @ api endpoint things works saving data in shape(in postman). iam sure iam wrong somewhere here in angular no errors triggering. no http request raised . app.service('userservices', function($rootscope, $http) { this.addtoinvitelist = function(email, cb) { var url = $rootscope.api_server_url + "/users/addtoinvitelist"; $http({ method: 'post', url: url, headers: { 'content-type': 'application/x-www-form-urlencoded' } // set headers angular passing info form data (not request payload) }).success(function(data) { console.log("email posted sucessfully" + data); cb(data); }) } }) and controller code here, app.controller('invitecontroller', function($scope, $rootscope, $routeparams, $location, userservices) { $scope.addtoinvitelist = function(email) { userser...

GNU assembler: creating a symbol using macro argument -

i have macro creates labels, want create labels if aren't defined. problem label built using macro argument, , assembler doesn't symbols generated using macro arguments. code doesn't work. errors out on ifndef. there other way write this? .macro create_handler modifier .ifndef handler\modifier handler\modifier: code more code .endif .endif error: junk @ end of line, first unrecognized character `\' i think there 2 problems. 1 \modifier: looks macro argument named modifier: , colon. need use \modifier\(): instead. \() breaks string parser knows have ended name of argument. second, last .endif should .endm : .macro create_handler modifier .ifndef handler\modifier handler\modifier\(): .4byte 0 .endif .endm create_handler foo create_handler foo this results in listing (ignore line numbers, added 1 of existing files): 74 0010 00000000 create_handler foo 75 create_handler foo defined symbols ...

version control - Can I specify private key in git config? -

i want use separate private key single git repository. i don't have access home directory or can't set env variables well. is there can specify in .git/config because can chnage .git/config use ssh instead of https. have hardcoded user:pass in url of config file one option use authentication agent forwarding when logging remote machine run git commands. here's guide setting up . an authentication agent (usually ssh-agent ) store keys in memory don't have keep typing in password. authentication agent forwarding when remote machine allowed use agent. when ssh machine forwarding, can ssh again there if had keys of local machine. it's handy , avoids need copy private keys on place.

javascript - Using dart as transpiler with node.js -

is there way use dart language node.js? livescript, coffeescript, typescript, etc. thanks! yes, definitely. similar question thoroughly answered on use angular 2 dart frontend node.js backend . for dart node.js i/o integration there's emerging library node io .

C# Deserializing an XML with repeating tags -

i have input xml string repeating <row> tags i'm trying deserialize object, rows except last 1 ignored. appreciated. as example, after deserialization, object is: object.command[0].usertable = {oci.ocitable} colheading: {string[3]} colheadingfield: {string[3]} row: {string[3]} rowfield: {string[3]} this wrong, because there 1 row in object, there should 4 <row> in input xml string this: <?xml version="1.0" encoding="iso-8859-1" ?> <broadsoftdocument protocol="oci" xmlns="c" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <sessionid xmlns="">feajiofefeaij</sessionid> <command echo="" xsi:type="usergetlistinserviceproviderresponse" xmlns=""> <usertable> <colheading>user id</colheading> <colheading>group id</colheading> <colheading>...

Is there a way to insert multiple values using single statement in sybase -

i have 200-300 values inserted in table. don't want write insert statement 200 times. there short way it? have tried insert #nodes (nodes) values ('100161'),('100164'),('102226'),('100143'),('108942'),('106922'),('108949'),('107191'), ('100098'),('107182'),('107193'),('98646'),('100102'),('100105'),('103044'),('103293'), ('103296'),('103297'),('104178'),('103018'),('104145'),('103017'),('103019'),('108991'), ('108995'),('109000'),('103020'),('102121'),('103021'),('106284'),('103951'),('100117'),('102872'), ('102873'),('100125'),('101582'),('102234'),('103027'),('103028'),('102225'),('101574'),('106964'), ('106969'),('108956'),(...

redux - Why `mapDispatchToProps` does not see `stateProps`? -

intro the signature of mapdispatchtoprops is: mapdispatchtoprops(dispatch, [ownprops]): dispatchprops one wonder, why mapdispatchtoprops not provided stateprops i.e. result of mapstatetoprops call. alternative syntax such as: mapdispatchtoprops(dispatch, [ownprops], [stateprops]): dispatchprops it seems me not break (not performance) , can beneficial in situations. question is there reason why not implemented? missing something? how solve use case presented below without feature? why not break anything such change allow user customize dispatchprops functions stateprops . when stateprops change, react-redux can recompute dispatchprops actual stateprops , rerender component. such logic happens ownprops performance if user not need read stateprops , can omit argument in mapdispatchtoprops implementation. react-redux can detect , assume, dispatchprops not dependent on stateprops . such performance tweak implemented ownprops . use case say have 10 act...

.net - Custom exception- Try catch - in c# -

it allowed use custom exception, exception can thrown below. try { int foo = int.parse(token); } catch (formatexception ex) { //assuming added constructor throw new parserexception( $"failed read {token} number.", filename, linenumber, ex); } but in normal try catch block, says , throwing exceptions clear stacktrace. try { forthcall(); } catch (exception ex) { throw ex; } so in custom exception,how managed use throw exception, without clear stacktrace? there several ways can done. as mentioned in link in c#, how can rethrow innerexception without losing stack trace? , can use exceptiondispatchinfo class code similar try { task.wait(); } catch(aggregateexception ex) { exceptiondispatchinfo.capture(ex.innerexception).throw(); } another way have handler return boolean, whether exception handled or not, can use in catch clause: catch (exception ex) { if ...

video - Directshow vcam start on connection -

poking around @ vivek's vcam of directshow capture source filter : a sample source filter emulates video capture device contributed vivek (rep movsd public newsgroups). is possible configure start @ beginning of virtual camera stream when program begins consuming vcam source. virtual camera receives various commands , requests controlling application: when added graph, when set up, when connected within pipeline, when set pause, run. free handle way like.

android - @Part parameters can only be used with multipart encoding. (parameter #8) -

before post question here, have tried add @multipart above interface method , searching in stackoverflow still cannot find similar problem. in case, try send image using typedfile server. interface method : @headers({"content-type: application/json"}) @post("/user/change") void postchange(@query("name") string name, @query("email") string email, @query("password") string password, @query("phone") string phone, @query("user_id") string userid, @query("address[]") string[] listaddress, @query("head[]") string[] head, @part("photo_profile") typedfile photoprofile, @body typedinput jsonobject, callback<receivedto> callback); edit in method can see @part , @body . if add @multipart above method, throw error @body parameters cannot used form or multi-part encoding. (parameter #9) i using retrofit 1.9 we use @query get request , in fact @query appen...

angularjs - How can I restrict characters of a md-chip value? -

i using md-chips. want limit character 10. i tried md-maxlength, 1 custome directive limit characters working in textarea , input not in chips chip limit limits count of chips can add 'chips' model: <md-chips ng-model="myitems" placeholder="add item" md-max-chips="5"> </md-chips> demo: https://jsfiddle.net/suunyz3e/290/ you cannot add more 5 chips input. unfortunately there's little validation control md-chips directive: from ( angularjs material ) validation allow validation callback hilighting style invalid chips character chip limit if you're after character limit, can this: <md-chips ng-model="myitems" placeholder="add item" md-max-chips="5" md-on-add="validatechip($chip)"> </md-chips> controller: angular.module('sandbox', ['ngmaterial']).controller('testctrl', function($scope) { ...

selenium - Test Automation using Node.js -

my client has new system in development using node.js. i need write automation scripts system , client has recommended me go node.js time developers can take part in creation of automation scripts. i need recommendation test automation frameworks use. have experience working selenium webdriver using java. any guidance , direction helpful. thanks. a reasonably logic option in case try webdriver.io , implementation of selenium 2.0 bindings nodejs.

python - Does anyone understand this error? -

valueerror: error parsing datetime string "2015-01-31:00:00" @ position 10 i trying call np.datetime64('2015-01-31:00:00') . a date in ms gives idea of string format accepts in [74]: np.datetime64('2015-01-31','ms') out[74]: numpy.datetime64('2015-01-31t00:00:00.000') see examples on numpy doc page http://docs.scipy.org/doc/numpy/reference/arrays.datetime.html space works in [79]: np.datetime64('2015-01-31 00:00:00','ms') out[79]: numpy.datetime64('2015-01-31t00:00:00.000')

php - Remove duplicate data based on postID -

i have array follows: array ( [0] => array ( [postid] => 105 [posttitle] => test [postnonarray] => subzero [postdesc] => array ( [0] => array ( [para] => subzero [align] => l ) ) [postdate] => 25.08.2016 [posttime] => 13:44 [postimage] => http://testyourprojects.biz/custom/ci/tharjumal/uploads/post/post_1472112857.png [postvideo] => ) [1] => array ( [postid] => 106 [posttitle] => test 2 [postnonarray] => test [postdesc] => array ( [0] => array ( [para] => test [align] => l ...

asp.net mvc 4 - HttpContext.Current.Session is NULL inside async Task [.NET 4] -

httpcontext customcontext = httpcontext.current; task task = new task(() => { httpcontext.current = customcontext; // httpcontext.current.session shows null // logic goes here }); task.start(); i read question in site & found as httpcontext bound thread, that's why null in task. so that, save context in other variable try use it. works fine in case of httpcontext.current.request.cookies , httpcontext.current.session gives me null. any explanation or appriciated.

ios - Is it possible to set text on single button of UITableViewCell in swift -

i have 1 uitableview having 2 buttons on cell.i want set text on button picker view , date picker.on selection of done button uipickerview can set text firstbutton. when selecting date uidatepicker secondbutton, firstbutton text gets changes. var selectedindexpath = nsindexpath(forrow: 0, insection: 0) datatableview.reloadrowsatindexpaths([selectedindexpath], withrowanimation: .none) here function on done button click: @ibaction func pickerdonebuttonclicked(sender: anyobject) { let cell = datatableview.dequeuereusablecellwithidentifier("cell", forindexpath: selectedindexpath) as! datatableviewcell cell.frequencybutton .settitle(pickerdatasource[frequencypicker.selectedrowincomponent(0)], forstate: uicontrolstate.normal) datapicker.hidden = true pickertoolbar.hidden = true datapickerview.hidden = true datatableview.reloadrowsatindexpaths([selectedindexpath], withrowanimation: .none) } i have reload tableview row on done button action.pleas...

javascript - How to pass Id value to window.location.href in MVC application -

currently working on mvc application in need render page action in mvc application need pass id parameter action. here code. var cardcode=$('#cardcode').val(); if (str.substr("successfully")) { window.location.href='@url.action("editpartner","mstpartner",new { id = cardcode})'; } in code when passing value id, i.e id=cardcode not allowed there how pass cardcode value action? please give suggestion. your code doesn't work because can't pass variable in there. works if value hardcoded window.location.href='@url.action("editpartner","mstpartner",new { id = "123"})'; what can use replace method var cardcode=$('#cardcode').val(); if (str.substr("successfully")) { window.location.href='@url.action("editpartner","mstpartner",new { id = "cc"})'.replace("cc",cardcode); }

javascript - How can I Set a end time value to a video played on a browser using HTML? -

i have video around 50secs in length. want first 30secs of video played. have created html code renders video on webpage plays 50secs. want first 30secs played. here's code play first maxtime seconds , pause var video = document.getelementbyid("video"); video.play(); var maxtime = 10; video.addeventlistener("progress", function(){ if(video.currenttime >= maxtime){ video.pause(); } }, false); <video id='video' preload='none' poster="https://media.w3.org/2010/05/sintel/poster.png"> <source id='mp4' src="https://media.w3.org/2010/05/sintel/trailer.mp4" type='video/mp4'> <source id='webm' src="https://media.w3.org/2010/05/sintel/trailer.webm" type='video/webm'> <source id='ogv' src="https://media.w3.org/2010/05/sintel/trailer.ogv"...

java - How can I know the file name after downloading in automation test? -

i using selenium , testng web ui automation test. download files firefox using same way access file download dialog in firefox . file downloaded default name without open/save/cancel dialog successfully. i repeat test different test data. problems are when there file 'abc.pdf' in target 'browser.download.dir', if download file same name, new file saved 'abc (1).pdf'; that's not want. in following test have problem decide open pdf , check content. (now solution is, write retry method: check if file downloaded, if yes, move folder; if no, check again. there better way?) sometimes when click link or button download, file name generated dynamically web system. file .pdf, .eml, .txt, etc. can know file suffix ui. can't know name in advance. same here, need open file , assertion in following test. how overcome? if need run test in multiple threads? appreciated! an easy way wait new file created file watcher: https://docs.oracle.com/j...

mysql - How can i get Array values to separate php variables -

i trying retrieve records in mysql db.i want retrieve records belong img_path column.from following code getting results array.but iw ant them separate variables. my code $result_list = array(); while($row = mysqli_fetch_array($query)) { $result_list[] = $row; } foreach($result_list $row) { $productitems[] = array( 'img_path' => $row['img_path'], ); } print_r($productitems); current output array ( [0] => array ( [img_path] => img/8041171eda3a8fddf508bfd0d9a0866e1472441466.png ) [1] => array ( [img_path] => img/91882b5f9ffa624a9dc81dfa0ec980861472441077.jpg ) [2] => array ( [img_path] => img ) ) expected output $variable1 = img/8041171eda3a8fddf508bfd0d9a0866e1472441466.png; $variable2 = img/91882b5f9ffa624a9dc81dfa0ec980861472441077.jpg; you can use extract function this: $result_list = array(); while($row = mysqli_fetch_array($query)) { $result_list[] = $row; } foreach($result_list $row) { ...

jquery - Calling another page's js function from different page -

i have 3 pages dashboard.html, documents.jsp, documents.js in dashboard.html file have href link should redirect page documents.jsp , call function in documents.js file included in documents.jsp file. dashboard.html <a href="documents.jsp?filter=somefunctiondocumentsjsfile" documents.js in file have ajax call like function somefunctiondocumentsjsfile(){ $.ajax({ url : "deletedocument?docid=" + json.stringify(selecteditemstodelete), type: "get", success: function(data){ console.log(data); showdangerpopup(data); getofficialdocs(); } }); } how should achieve this simply add onload="somefunctiondocumentsjsfile()" attribute opening <body> tag in documents.jsp file.

c# - Crystal Report not passing parameters to subreport -

i have configurable win forms app in can set how times subreport can inserted main report this: config page: (order of importing subreports) subrep1 subrep1 subrep1 subrep3 subrep3 subrep2 subrep2 subrep2 so, in main report import/insert 3 times subreport 1, 2 times subreport 2 , 3 times subreport 2. each subreport has 1 parameter , set through code value, appears on first instance of report... so, this: subrep1 (has parameter) subrep1 subrep1 subrep3 (has parameter) subrep3 subrep2 (has parameter) subrep2 subrep2 the problem need have parameter each one! code... setmainreportparameters(reportparameterlist); (int = 0; < rlc.reportlayout.count; i++) { if (rlc.reportlayout[i].subreportname == "sectionreporttest1.rpt") { setsectiononereportparameters(reportparameterlist); } if (rlc.reportlayout[i].subreportname == "sec...

httpd.conf - Writing a mod-wsgi script on Amazon linux -

i using httpd2.4 mod-wsgi installed on amazon linux. my wsgi script looks this: /projects/mv2/test/test.wsgi import sys import os sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) test import * /projects/mv2/test/test.py from flask import flask app = flask(__name__) @app.route('/test') def hello_world(): return 'hello, world!' apache conf file <virtualhost *:80> servername test-algo.com wsgidaemonprocess algos_app user=mv2 group=mv2 threads=1 wsgiscriptalias / /projects/mv2/test/test.wsgi <directory /projects/mv2/test/test> wsgiprocessgroup algos_app wsgiapplicationgroup %{global} options multiviews followsymlinks allowoverride require granted </directory> </virtualhost> when hit url http://test-algo.com/test , 403 response , following httpd error file [authz_core:error] [pid 27555] [client 153.156.225.142:65083] ah01630: client denied ser...

.htaccess - How to enable php display_error on in my cPanel -

i went through whatever there , showed me add these 2 lines in .htaccess file. php_flag display_errors on php_value error_reporting "e_all & ~e_strict & ~e_notice" but error log message : invalid command 'php_flag', perhaps misspelled or defined module not included in server configuration there popular question in stackoverflow : here there has been answered considering user has local server. here writing php scripts direclty on hostgator cpanel , want see line number , other useful information debugging, still nothing useful found. and doing bit more digging here tells need add own php.ini file. when added php.ini file , added 2 lines nothing shown. how can debug php code if writing script direcly on cpanel ?

html - How to create href link inside controller in Angularjs? -

i showing flash error message if mobile number not validated. flash message "mobile number not validated. click here validate" . but want display same error message "click here" hyper link redirect me top of page. if (res.json.response.mobilevalidated == false) { flashservice.error("mobile number not validated." + (<a href="#/otp"> click here </a> ) +" validate", false); $scope.disabled = function() { $scope.model.disabled = true; $scope.title = "cannot access until mobile number validated."; } } else { $scope.model.disabled = false; } how can use html tags inside controller? error message dynamic one. use ng-include . js add $scope.includepath = function () { `templateurl="..../your template path"` }; html <div ng-include="includepath" > new html here </div> here in case can use <button...

c++ - force automake and autoconf to set the -lz flag behind the compilation line, and do it without changing the .ac files -

i having source package developer comfortably using ancient gcc version, compilation requires -lz flags before object specs. package "branchy" , automake , autoconf "stuffy" have 2 questions: first question how configure autotools set -lz flag behind? second, possible force setting @ of -lz flag without messing makefile.ac , configure.ac files? since not software package editing these files whenever doing new build not option. note if copy compilation line throws error , put -lz , -lxerces-c flags @ end works. have somehow change in autotools. update: well managed somehow fix running badly configured line with $ g++ line_contents -lz -lxerces-c (making sure in right directory) , had idea of running make again, seemed automake considered step passed , went forward. still, nice find answer on how change order autotools! you can write own "gcc" task. python or bash script check if 1 of arguments -lz , , reoder them , call real gcc ....

ibm - MQ Upgrading 7.5 to 8 -

i have upgraded ibm mq 7.5 8.0. beforehand using ssl. since ssl disabled in mq8. have use tls. question need create certificate again use mq 8 after upgrading process? no, certificate independent of protocol used.

mysql - PHP - output result in ascending order of while() loop -

i need show result based on calculations inside of loop. result of loop should ascending order $distance. $sql = "select distinct * cinemas city='$city'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $lat1 = $_get['lat']; $lon1= $_get['lon']; $lat2 = $row['latitude']; $lon2 = $row['longitude']; //starting calculating distance $theta = $lon1 - $lon2; $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); $dist = acos($dist); $dist = rad2deg($dist); $miles = $dist * 60 * 1.1515; $unit = $miles * 1.609344; $distance = substr($unit,0,4); echo $row['cinemaname'].$distance; }} how show result in ascending order based on $distance? it shows as: cinema name 20 km cinema name 5 km cinema name 30 km cinema name ...

CouchDB Referential Integrity -

i new couchdb , nosql scene , coming sql background. have questions on referential integrity, example have product document below { type: "product" name: "sweet necklace" category: "necklace" } and each category have own document { type: "category", name: "necklace", custom_attr: ".." } just sake of argument, happens when stakeholder chose rename category "necklace" "accessories", should happen on products have category field set "necklace"? do bulk update on products category equal necklace? (i don't think couchdb allows perform "update where" kinda statement) what best practice on handling such situation? p/s: chose save category name in product document instead of category id since nosql encourages denormalization anyway. if you're maintaining separate document category you've not denormalized data @ all. in fact, doing you're...

mysql - Update Query not working. Always catch syntax is running -

i want update record. every time tried update. goes catch statement. unable find query syntax invalid. it goes catch statement i have no idea either query wrong or error in syntax. if (ispost) { var value = request.form["value"]; var student_reg_no = request.form["student_reg_no"]; var student_name = request.form["student_name"]; var father_name = request.form["father_name"]; var temporary_address = request.form["temporary_address"]; var permanent_address = request.form["permanent_address"]; var phone_no = request.form["phone_no"]; var blood_group = request.form["blood_group"]; var email_address = request.form["email_address"]; if (validation.isvalid()){ try{ var db = database.open("site_data"); var updatecommand = "update site_data_table set student_reg_no =@0, student_name=@1, father_name=@2, te...

java - How to find import statements that are required for the block/method declaration in AST Eclipse JDT? -

this code snippet, here try create new class extracted block class. need find import statements required in method extracted has added generated class. private void generateclass() throws ioexception { ast ast = ast.newast(ast.jls8); compilationunit unit = ast.newcompilationunit(); typedeclaration type = ast.newtypedeclaration(); type.setinterface(false); type.modifiers().add(ast.newmodifier(modifier.modifierkeyword.public_keyword)); type.setname(ast.newsimplename("generatedclass")); methoddeclaration methoddeclaration = identifyastnode.getmethoddeclaration(); methoddeclaration = (methoddeclaration)astnode.copysubtree(ast, methoddeclaration); type.bodydeclarations().add(methoddeclaration); unit.types().add(type); writetofile(unit.tostring()); }

reporting services - MSBI SSRS List Property -

i creating report using msbi ssrs. choose list , inside list added 2 tables. used list splitting tables according id. problem facing if there exist repeated/ same values in tables, able see value once (as unique value in table), display values present in table rather hiding repeated values. tried finding property of list unable display values able see while executing mdx. thanks in advance help. since provide general description. general answer. if have lower granularity column, add column group inside list. or add rownumber dataset, if possible, , group rownumber instead.

html - Getting table structure with div with grouped divs -

i want tabular data in groups. wanted cells of equal width. please refer code below. .details { display: table; width: 100%; } .row { display: table-row; } .cell1, .cell2, .cell3 { width: 100%; display: table-cell; border: 1px solid gray; } .groups { border: 1px solid red; } .group-name { font-weight: bold; } <div class="details"> <div class="groups"> <div class="group-name"> 1 </div> <div class="list"> <div class="row"> <div class="cell1"> cell1 </div> <div class="cell2"> cell2 </div> ...

vba - Create excel attachment Object using VB or macros in a cell of Excel -

Image
please advise how can create object in cell of excel using macros. please refer below image: [ i want attach attachment in image using script or kind of formulas. thanks here's sample created using method described in comment: excel macro 'select cell should contain object range("b5").select 'add object given cell activesheet.oleobjects.add(filename:= _ "c:\users\de12668\documents\zeichnung1.vsd", link:=false, displayasicon:= _ true, iconfilename:= _ "c:\windows\installer\{90140000-0057-0000-0000-0000000ff1ce}\visicon.exe", _ iconindex:=0, iconlabel:="a sample"). _ select update 1 if paths elements provided in first column, use add appropriate links: dim myrange range dim longlastrow long dim counter long set myrange = worksheets(1).range("a1") longlastrow = cells(rows.count, myrange.column).end(xlup).row counter = 1 longlastrow range("b" & counter).select ...

android - Stop main thread and show progress dialog -

hello guys having async task points online , depending on these points must decide popup window should show on main thread . example if points less should show "buy points" screen else show "buy item" screen .i want show progressdialog until points loaded if main thread stops until points loaded progress dialog won't show string str_result= new jsontask().execute("my url" + uid).get(); if progress dialog shows points loaded wrong new jsontask().execute("my url" + uid); my async taks class jsontask extends asynctask<string, string, string> { progressdialog pdia; @override protected void onpreexecute() { super.onpreexecute(); pdia = new progressdialog(popupactivity.this); pdia.setmessage("loading..."); pdia.show(); } @override protected string doinbackground(string... params) { // points here return null; } @override protec...

macros - Breadcrumb not showing in Umbraco Site -

Image
i created partial view macro file in umbraco backoffice breadcrumb. inserted macro masterpage , ran site, couldn't see anthing. no breadcrumb navigation, no errors, jsut nothing. wrong? please see breadcrumb code below @inherits umbraco.web.macros.partialviewmacropage @* snippet makes breadcrumb of parents using unordered html list. how works: - uses ancestors() method parents , generates links visitor can go - outputs name of current page (without link) *@ @{ var selection = currentpage.ancestors(); } @if (selection.any()) { <ul class="breadcrumb"> @* each page in ancestors collection have been ordered level (so start highest top node first) *@ @foreach (var item in selection.orderby("level")) { <li><a href="@item.url">@item.name</a> <span class="divider">/</span></li> } @* display current page last item in list *@ ...

javascript - Add scroll in the responsive menu -

i trying customize responsive menu "bootstrap" , stuck on 1 final point. i content menu id "menunavbar" scrollable, can surely not because of positions "absolute"? #slide-nav #slidemenu { background: #f7f7f7; right: -100%; width: 300px; min-width: 0; position: absolute; padding: 0 10px; z-index: 2; top: -8px; margin: 0; box-shadow: 1px 1px 12px #555; border-radius: 0 0 0 10px; } #slide-nav.navbar { height: auto; border-bottom: 2px solid #c0b0aa; } #slide-nav #menunavbar { padding-top: 80px; } codepen $(document).ready(function () { // scroll minim header $(window).scroll(function() { if($(document).scrolltop() > 50) $('#slide-nav').addclass('shrink'); else $('#slide-nav').removeclass('shrink'); }); ...