Posts

Showing posts from July, 2010

asp.net mvc - Windows 10 Maximum TCP-IP Connection Limit -

hi have made windows 10 app. typically hosts website inside using iis hostable web core. app uses asp.net web api odata , signalr connect devices in local network. the app should able connect atleast 300 devices @ once. have hit maximum connection limit in window systems. im being able connect 10 devices maximum on windows pro system. on reading issue came across many articles stating http.sys internal window driver responsible connection limit. meant if can bypass http.sys can bypass maximum connection limit. two places was 1. kestrel 2. nodejs kestrel being server .net code require me update whole of code .net 1.0 core isnt viable solution edje.js opensoure project allows me run owin application inside expressjs has own http stack , hence not use http.sys free connection limit enforced windows. my problem there no more available else. correct if iam able working using expressjs owin server ill able bypass connection limit?

How can I know when a redux-saga function has completed in the calling code -

react, redux, redux-saga i dispatch action, create_requested store. redux-saga runs, , makes async call server. after saga completes, i.e. blocks next create_requested want execute additional code, container/component first create_requested initiated. // pseudo code class cmp extends react.component { oncreateclick(id) { const record = {id, name: 'alabala'} // missing .then() part this.props.dispatch({type: 'create_requested', record}).then(created => { console.log(created) } } } is there way that? how? if not, how supposed design task? one approach pass (resolve, reject) options along action, , make saga call them on succcess/failure. seems ok. https://github.com/yelouafi/redux-saga/issues/161

polymer - Detect Firebase Authorization Failure With Polymerfire -

what best practice detect when authorization fails due firebase security rules. example if security rules in firebase database not allow current logged in user below access "/path/to/data" how can detected? <firebase-document id="document" app-name="notes" path="/path/to/data" data="{{data}}"> </firebase-document> as of polymerfire 0.9.5 document , query elements emit "error" event when read access denied: <template> <firebase-document id="document" app-name="notes" path="/path/to/data" data="{{data}}" on-error="handleerror"> </firebase-document> </template> <script> polymer({ handleerror: function(e, err) { // handle error } }); </script>

java - Add a customized setting into Info.plist using javaFx ant task -

i want add following setting in info.plist of application bunld osx(yosemite). <string>disable app nap express</string> <key>nsappsleepdisabled</key> <true/> we use javafx ant task build our application bundle this: <fx:application name="${macosx_app}" mainclass="${mainclass}" version="1.0"> </fx:application> <fx:bundleargument arg="mac.cfbundleversion" value="1.0"/> <fx:resources> <fx:fileset type="jar" dir="package/macosx/"/> <fx:fileset type="jar" dir="lib"/> </fx:resources> <fx:platform j2se="7.0"> <fx:jvmarg value="-xdock:icon=$appdir/java/${macicon}" /> <fx:jvmarg value="-xms128m" /> <fx:jvmarg value="-xmx1024m"

database performance - How can I write to MYSQL DB as if i were writing to a regular file -

i want write mysql db table same speed if writing regular binary file ofstream example. normally, writing 100m bytes file using ofstream takes less 1 second. while in mysql, inserted these 100m bytes in more 9 seconds long time ( used myisam table , multiple-row insert statements). in other words, want configure mysql such makes no (checks,parsing,....etc), writing table if binary file so, there method achieve that? edit 1: here table want populate, create table frames ( f1 varchar(8) not null , f2 varchar(6) not null , f3 varchar(6) not null , f4 varchar(2) not null , f5 varchar(4), f6 varchar(16000), f7 varchar(4) not null ); edit 2: here snippet code used insertion max defined 10000 for (int c = 0; c < 100; ++c) { string query("insert frames (f1,f2,f3,f4,f5,f6,f7) values"); (int = 1; <= max; ++i) { query += "('aaaaaaaa','000001','000002','05','5005','0000000001000000000100000000010

delphi - How can I get the reference to TDSServerClass in TDSServerClass.OnCreateInstance event handler? -

i'm using datasnap build middleware, , business logic independent. support different client apps, encapsulate business logic multiple subclasses of tdatamodule, , expose them client rest api. number of subclasses , class types dynamically changing, , loaded plugin. according delphi xe's design pattern, need create 1 tdsserver instance "server", , multiple tdsserverclass instances, worked adapters, each serve 1 of tdatamodule subclasses. the chain of classes are: 1 tdsserver -> multiple tdsserverclass(es) -> tdatamodule subclasses my problem find correspondence of tdsserverclass instances , tdatamodule subclasses in tdsserverclass.oncreateinstance event handler. to setup chain , keep correspondence, if have 10 subclasses, example: i created 1(one) tdsserver instance, , created 10 tdsserverclass instances , each instance serve 1 tdatamodule subclass (i have stored id of subclass in tdsserverclass.tag property. i created 10 pools every subclasses on

recording - Why Bigbluebutton Recorded Session takes several hours to appear in Moodle -

i working bigbluebutton configuration moodle through api. working after meeting over, recorded sessions takes several hours takes 24 hours appear in playback session. question is, why takes many hours appear in playback should appear after meeting over. there way make appear after meeting. appreciable. we see you've posted same question multiple forums. we've responded question here https://groups.google.com/d/msg/bigbluebutton-dev/6ie622xnyhk/zhf_ozunawaj

node.js - WARNING in Critical dependency: require function is used in a way in which dependencies cannot be statically extracted -

after upgrading webpack webpack2, i'm getting warnings in console: warning in ./~/reflect-metadata/reflect.js 841:28 critical dependency: require function used in way in dependencies cannot statically extracted here's code: package.json: { "name": "myapp", "version": "1.0.0", "description": "myapp", "main": "index.js", "scripts": { "test": "echo \"error: no test specified\" && exit 1", "typings": "typings", "start": "webpack-dev-server --inline --progress --port 3000" }, "author": "", "license": "isc", "dependencies": { "@angular/common": "2.0.0-rc.4", "@angular/compiler": "2.0.0-rc.4", "@angular/core": "2.0.0-rc.4", "@angu

Bash grep file for string and use each as a variable in another commands -

in ha configuration checking periodically vip address on eth0, (lets call 2.2.2.2). if up, need bring group of ip address defined eth0 in /etc/network/interfaces configuration file: up ip addr add **1.2.3.34** dev $iface ip addr add **1.2.3.40** dev $iface ip addr add **1.2.3.48** dev $iface and pass each ip group of commands: ip a **1.2.3.34/32** dev eth0 ip a **1.2.3.40/32** dev eth0 ip a **1.2.3.48/32** dev eth0 what i've done far is: #!/bin/bash status=$(ip s eth0 | grep inet | awk '{print $2}' | sed 's/addr://') if ip s eth0 | grep inet | awk '{print $2}' | sed 's/addr://' | grep 2.2.2.2/27 ; cat /etc/network/interfaces | grep -o "up ip addr add [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" > /tmp/ext_ip.txt now need how pass each line command mentioned above (ip a 1.2.3...), have no idea how properly. optionally i'd revert operation if vip not present in system - in case

spring - The requested resource is not available when wanna map to .html file -

i'm using spring mvc, , wanna make web app send json data client , client should visualized them using js. i have questions: 1-my project have *.html beside *.jsp file how can handle both without web.xml. code had written work fine *.jsp give "the requested resource not available." error mapping html files. 2-as said service have send list of object in json form client, when want parse json string on server in *.jsp file code like myclass data = new gson().fromjson(mylist.get(0).tostring(), listtype) ,i face many problems, decide job in client side in *.html file, want know how should handle parsing job when don't want client know the structure class? or plz tell if have share class client, how should send stucture of html file? 3-how should access data created in restapi.jsp on usersideapp.html file? these files: appinitializer.java public class appinitializer implements webapplicationinitializer { public void onstartup(servletcontext container

How to create a dialog using JFXDialog of JFoenix in JavaFX -

i search example jfoenix jfxdialog has working demo of jfxdialog dialog = new jfxdialog(); jfxdialog has 3 different constructors: jfxdialog() , jfxdialog(stackpane dialogcontainer, region content, dialogtransition transitiontype) , jfxdialog(stackpane dialogcontainer, region content, dialogtransition transitiontype, boolean overlayclose) the first 1 sets animationtype center . the second 1 sets parent( dialogcontainer ), content( content ) , animationtype( transitiontype ). the third 1 sets same second 1 + if dialog should close if click on overlay( overlayclose ). for parent of dialog need stackpane . for content can use child, grandchild, ... of region . suggest use jfxdialoglayout extends stackpane , makes easier style dialog. for transitiontype have 5 different ones: dialogtransition.top dialogtransition.right dialogtransition.bottom dialogtransition.left dialogtransition.center if want close clicking on overlay set overlayclo

gridpane - Javafx grid layout leaving big spaces -

i making text based game gui. using javafx trying line elements using grid panes. trying making this: example . here code , looks @ moment import javafx.application.application; import static javafx.application.application.launch; import javafx.geometry.insets; import javafx.geometry.vpos; import javafx.scene.scene; import javafx.scene.control.label; import javafx.scene.control.listview; import javafx.scene.control.textarea; import javafx.scene.layout.gridpane; import javafx.stage.stage; public class test extends application { stage window; listview<string> listview; textarea descarea = new textarea(); label healthlabel = new label("health:"); label manalabel = new label("mana:"); label healthdisplay = new label("100/100"); label manadisplay = new label("100/100"); public static void main(string[] args) { launch(args); } @override public void start(stage primarystage) throws ex

html - jQuery-mobile popup won't appear at all -

i'm trying sign in pop directly copy-pasted " http://demos.jquerymobile.com/1.4.2/popup/ ". copied , pasted have go in listed navigation , when click on link nothing happens. url recognizes go .../#popuplogin, there no pop up. html segment: <div data-role="page" id="page_home"> <div data-role="navbar" id="navbar"> <div data-role="collapsible" data-collapsed-icon="bars" data-expanded-icon="bars" id="navbar_links"> <h3>menu</h3> <a href="#popuplogin" data-rel="popup" data-position-to="window" data-transition="pop">sign in</a> <a href="#page_home" >products</a> <a href="#page_about">about</a> </div> </div> <div data-role="popup" id="popuplogin" data-theme="a" class="ui-corner-

newtype behaviour in Haskell -

i have discovered can 1 :: product int , product {getproduct = 1} result. product newtype defined in data.monoid . have tried defining own newtype : newtype stuff = stuff {getstuff :: a} deriving (show) but if try 1 :: stuff int error : <interactive>:20:1: error: * no instance (num (stuff int)) arising literal `1' * in expression: 1 :: stuff int in equation `it': = 1 :: stuff int do have put num constraint on a or something? why doesn't work? you can 1 :: t if , if t instance of num . 1 :: product int works because product defines instance instance num => num (product a) (i.e. if a instance of num , product a instance of num ). do have put num constraint on or something? you have define num instance stuff int (or better num => stuff a ). you can either manually (using instance ) or automatically using deriving num , generalizednewtypederiving extension, define num instance num => stuff a acts num instan

gruntjs - .jshintrc with Gulp, Jhipster -

when want set "underscore" (i used use 'grunt') , put in .jshintrc. "globals": { "_": false, now version 3.5.1 of jhipster use gulp , not know how configure because there no file .jshintrc. ans gives me error angular.js:13550 referenceerror: _ not defined can me. thank you. jhipster replaced jshint eslint in this change . because of this, should add globals section file .eslintrc.json same in .jshintrc . ( similar issue ) based on referenceerror angular, looks don't have underscore dependency in index.html. run bower install underscore --save download , install underscore (this adds bower.json), run gulp inject:dep inject dependencies index.html automatically.

javascript - Can you change the order of error messages in a validation summary? -

can change order in error messages appear in validation summary based on order. i have jquery re-arranges panels on page based on external input. since re-ordering done javascript on client side doesn't reflect changes in position of each validator in validation summary. i've looked @ each of validator messages in validation summary on client side , there no id's assigned individual error messages organizing them way not possible. is there method of organizing validator messages after switching of panels on client side? if not if on server side position of validators reflected in validation summary in same order displayed?

fluentvalidation error message contains c# property name and not client side json property name? -

i have c# webapi project , using fluentvalidation.webapi package validation of client inputs. below model class code has c# property named "ispremium". same property has json name "isluxury" clients. [serializable, jsonobject, validator(typeof(productvalidator))] public class product { [jsonproperty("isluxury")] public bool? ispremium { get; set; } } and validator class looks like: public class productvalidator : abstractvalidator<product> { public productvalidator() { rulefor(product => product.ispremium).notnull(); } } so request like: http://localhost:52664/api/product request body:{ "isluxury": "" } i following error: { "message": "the request invalid.", "modelstate": { "product.ispremium": [ "'is premium' must not empty." ] } } fluent here picking c# property name m

ios - How do I avoid type lost? -

enum media { case image case video } struct uploadmanager { static func upload(mediatype: media, data: anyobject, completion: response -> void) { switch mediatype { case .image: uploadimage(data as? uiimage, completion: completion) case .video: uploadvideo(data as? nsurl, completion: completion) } } static func uploadimage(image: uiimage, completion: response -> void ) { let imagedata = uiimagepngrepresentation(image)! nsdata let options = ["resourcetype": "image"] //api call } static func uploadvideo(filepath: nsurl, completion: response -> void ) { let options = ["resourcetype": "video"] //api call } } sample call be: uploadmanager.upload(.image, data: data, completion: { }) here im making request uploadmanager .image type , data. concern image , data mutual exclusive , prone error. say, passed .image instead of .video , while downcasting lead crash. w

Software design guidance needed (Android Library Project) -

i have app main activity ("mainactivity") i have view in "android project library". use view in several apps, thats why added view in library. i can use view app but comes problem. i interact apps mainactivity view. if view in app insteed of library call... (mainactivity)context.myfunction() ... in view. but in case of library, view doesn't know mainactivity, because out of project-scope. how can interact activity view, placed in library ? hints ? not sure if solution, post here. others. i created interface in library project : public interface interactactivity { public void interact(string scommand, list<object> objects); } i implemented interface on activity : @override public void interact(string scommand, list<object> objects) { // todo auto-generated method stub if(scommand.equals("mycommand")){ ... } } then call method view (which in library proje

Relative layout for Windows Phone Application using XAML C# -

i creating windows phone app , in app need deal webview control , custom keyboards. need use custom views keyboard there system keyboard used ok problem how achieve relative layout. in app have grid in page , 2 rows , have set height of first row "*" , second row height 0. in first row there webiew , in second row there keyboard. when custom keyboard height of second row changed 0 value appears keyboard due height of first row decreases want keyboard should overlap webview 6:4 ratio. want height of webview should remain same , custom keyboard should overlap it. thank you! canvas control can used such requirement have.please follow link https://msdn.microsoft.com/en-in/library/windows/apps/jj207042(v=vs.105).aspx happy coding :)

java - Android prompt notification automatically code -

here i'm try develop android application prompt user notification reminder automatically. notification prompts user when meet condition. for case, application personal recorder application, requires user record data everyday. if whole day application detects there no data entry, prompt reminder @ specific time remind user launch application , enter data. for example, @ 10.00pm, user never launch application day, application prompt reminder "please make sure data updated!". how code work? have refer many tutorial seem not want. thank you. the android documentation suggests should use alarm manager register intent fire @ specified time if application may not running. and when happens, fire notification. m_notificationbuilder = new notificationcompat.builder(this) .setcontenttitle(title) .setcontenttext(textmessage) .setsubtext(subtextmessage) .setsmallicon(r.drawable.ic_launcher_notifica

Programmatically add multiple images to a single product in magento -

the product id given multiple images need added in magento. $count = 0; $imgarray = array($fpath.'configurable.png'); foreach ($imgarray $image){ $imgurl = _save_image( $image,$objectmanager ); if ($count == 0){ $configproduct->addimagetomediagallery( $imgurl , $mediaattribute, true, false ); }else { $configproduct->addimagetomediagallery( $imgurl , null, true, false ); } $count++; } $objectmanager = \magento\framework\app\objectmanager::getinstance(); $product = $objectmanager->create('magento\catalog\model\product')->load($productid); // load product object $mediaattribute = array ('thumbnail','small_image','image'); $mediadir = $objectmanager->get('magento\framework\app\filesystem\directorylist')->getpath('media');// im magento 2 $mediadir = mage::getbasedir('media');// in magento 1 //case 1: when image files alredy in server $fpath =

php - Integrity constraint violation: 1062 Duplicate entry 'Portable tools' for key 'UNIQ_63B58042B36786B'" -

i'm trying insert data in given table, i'm using entity repository define function that's create entity if it's not existing, of find if it's exist. entity file following: /** * semantictag * * @orm\table(name="semantictag") * @orm\entity(repositoryclass="vcycle\semantictagsbundle\repository\semantictagrepository") */ class semantictag { /** * @var int * * @orm\column(name="id", type="integer") * @orm\id * @orm\generatedvalue(strategy="auto") */ private $id; /** * @var string * * @orm\column(name="title", type="string", length=255, unique=true) */ private $title; /** * @var \datetime * * @orm\column(name="created_at", type="datetime") */ private $createdat; public function __construct() { $this->createdat = new \datetime(); } /** * id * * @return integer */ public function getid() { return $thi

selenium - Exposing ports in Docker won't work -

i'm trying setup automated testing platform docker , selenium grid. in diagram below can see structure i'm using. on top ubuntu server running on compute engine. on left docker container running ubuntu 14.04. container runs our project on localhost:8080 google app engine. on right selenium hub 2 nodes running on port 4444. docker , selenium setup this output when running docker ps: container id image command created status ports names f5ac6e3c8270 xxxxx/ubuntuport:14.04 "/bin/bash" 3 days ago 13 seconds 0.0.0.0:32777->8080/tcp drunk_kalam 4246ca0790db eu.gcr.io/xxxxxx/selenium-chrome "/bin/sh -c 'rm -rf /" 4 weeks ago 3 days evil_mahavira 8d06f90a1a84 eu.gcr.io/xxxxxx/selenium-firefox "/bin/sh -c 'rm -rf /" 4 weeks

Unable to compile procedure(oracle) in Symfony 1.2 -

my procedure script :- $person_id='****'; $branch_code='****'; $dbh = propel::getconnection('propel'); $stmt = $dbh->prepare("begin create_retired_employment(:p_person_id,:p_branch_code,:p_error); end;"); $stmt->bindparam(':p_person_id', $person_id, pdo::param_str, 1000); $stmt->bindparam(':p_branch_code', $branch_code, pdo::param_str, 1000); $stmt->bindparam(':p_error', $v_status, pdo::param_str|pdo::param_input_output, 10000); $stmt->execute(); no error show in log file procedure working fine direct run in pl/sql :- set serveroutput on; declare v_err_ms varchar2(200); begin create_retired_employment( '****', '****', p_error=>v_err_ms); dbms_output.put_line('data=>'||v_err_ms); end; / please me wrong in symfony 1.2 procedure code i have fixed issue.third variable use if error in procedure not error in proce

visual studio code - Passing arguments to C++ programme for debugging in VSCode -

i want debug c++ project in vscode (on mac, using either gdb or lldb). program takes command line arguments like ./prog -input cf file_x.txt this works fine when starting debugging session in gdb on command line. in vscode, tried adapt launch.json read (only relevant lines shown): "program": "${workspaceroot}/build/prog", "args": [ "-input cf", "path_to/file_x.txt" ] with this, @"unknown option: \"-input cf\"\r\n" in output , process not debugged; alternatively, tried 1 argument so: "program": "${workspaceroot}/build/prog", "args": [ "-input cf path_to/file_x.txt" ] resulting in same message. have missed important? try "program": "${workspaceroot}/build/prog", "args": [ "-input",

android - How to stop receiving same SMS multiple times? -

i have built following receiver class within messaging app, receives sms messages anytime: public class receiver extends broadcastreceiver { public void onreceive(context context, intent intent) { bundle extras = intent.getextras(); smsmessage[] smgs = null; string infosender = ""; string infosms = ""; if (extras != null) { // retrieve sms message received object[] pdus = (object[]) extras.get("pdus"); smgs = new smsmessage[pdus.length]; (int = 0; < smgs.length; i++) { smgs[i] = smsmessage.createfrompdu((byte[]) pdus[i]); infosender += smgs[i].getoriginatingaddress(); infosms += smgs[i].getmessagebody().tostring(); } } } } the problem sometime receives same message multiple times, suspecting it's because receiver not unregistered , destroyed, checks incoming messages often. he

javascript - Using ajax on webpage loaded from disk in WPF WebBrowser - CORS blocked -

i using ajax via xmlhttprequest on webpage loaded disk in wpf webbrowser. xmlhttprequest.onerror handler called every time , url correct guess request blocked disabled cors - cross origin resource sharing. have idea serving local page means of php , set header access-control-allow-origin. can problem solved way, please?

MySQL Stored Procedure 'range' as input parameter, cannot access the value -

i've found interesting problem stored procedure @ new company have joined. see below, table pxvehiclehistory has column called range . range reserved word in mysql developer surrounded ticks. stuff, apart when insert executed range column null. as stored procedure executing insert i've moved our code , boss off back. i wondering, possible value of range in parameter? create `pxvehiclehistory_insert`( in pxvehiclehistoryid char(38), in regno varchar(50), in makeid char(38), in modelid char(38), in rangeid char(38), in derivativeid char(38), in colour varchar(50), in transmissionid char(38), in fueltypeid char(38), in customerid char(38), in enginesize varchar(50), in engineno varchar(50), in dfr datetime, in createdby

structure - Python ctypes.BigEndianStructure can't store a value -

i in trouble ctypes.bigendianstructure. can't value set 1 fields. code this. import ctypes class mystructure(ctypes.bigendianstructure): _pack_ = 1 _fields_ = [ ('fx', ctypes.c_uint, 7), ('fy', ctypes.c_ubyte, 1) ] x = mystructure() it prints 0 excepted: print x.fy # prints 0 then set value still prints 0: x.fy = 1 print x.fy # still prints 0 i don't know why doing doesn't work , strange behavior. think alternative code works. import ctypes class mystructure(ctypes.bigendianstructure): _pack_ = 1 def __init__(self): self.fx=ctypes.c_uint(7) self.fy = ctypes.c_ubyte(1) x = mystructure() x.fy = 7 print x.fy # prints 7 or without constructor:: import ctypes class mystructure(ctypes.bigendianstructure): _pack_ = 1 fx = ctypes.c_uint(7) fy = ctypes.c_ubyte(1) x = mystructure() x.fy = 7 print x.fy # prints 7 i have never used fields attribute can't speak odd be

vba - Paste Lotus Notes email body with Hyperlink to Word Document -

i trying paste lotus notes email body word document , i'm successful in doing that. when paste content word not show hyperlinks, paste text. below have tried far. want hyperlinks body of email pasted word document. set nsession = createobject("notes.notessession") set nmaildb = nsession.getdatabase("", "") if not nmaildb.isopen nmaildb.openmail end if set ndocs = nmaildb.getview(view) ndocs.clear if filtertext <> "" ndocs.ftsearch filtertext, 0 end if set ndoc = ndocs.getfirstdocument until left(ndoc.getitemvalue("posteddate")(0), 8) <> left(now(), 8) set nnextdoc = ndocs.getnextdocument(ndoc) if left(ndoc.getitemvalue("posteddate")(0), 8) = left(now(), 8) if instr(3, ndoc.getitemvalue("from")(0), "from", vbtextcompare) > 0 set nitem = ndoc.getfirstitem("body") set wrdapp = createobject("word.application")

html - Select2 with bootstrap example of multiple selection is not working -

i work on laravel app, have probleme select2 multiple selection want use in tags, search solution in last 3 days still dont fixed .. in head section : <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> in view: <div> {!! form::label('tags','select tags:') !!} @foreach ($tags $tag) <option value='{{ $tag->id }}'>{{ $tag->name }}</option> @endforeach </select> $(.'select2-multi').select2({ multiple:true }); // $('select2-multi').attr( 'aria-hidden', 'true',); but still have enter image description here instead of result enter image description here

typescript - How to apply a type guard for jQuery instance? -

i'm trying apply type guard variable might jquery instance. however, jquery interface jquery.d.ts , can't use instanceof . following code doesn't seem work, guess because ts doesn't "know" being instance of jquery means being "an instance" of jquery interface. var stringorjquery: string | jquery; ... if (stringorjquery instanceof jquery) { ... // here stringorjquery still string | jquery ... } i'm using ts 2.0 beta. you can check string case: if(typeof stringorjquery === 'string') { // string case } else { // jquery case case } alternately, can determine jquery object indirect checks the ones described in question's answers , such as: if(stringorjquery.jquery !== undefined) { ... // jquery object the jquery field of jquery object contains jquery version , should defined.

regex - Tcl regular expression to detect square brackets -

i have .csv files many rows have 1 of field values this: scl[0] scl[1] scl[2] sda[1] sda[2] sda[3] i storing them in variable while reading csv files in line line format,like: set string [$m cell 0 1] now when regexp check whether cell has scl[0] unable pass square bracket regular expression: gave syntax: if{[regexp "scl\[0\]" $string]} { ... } but if condition doesn't executed. if in case of scl(0) , i.e () instead of {} in csv file, gave {[regexp "scl\[(\]0\[)\]" $string]} worked. same format tried apply square brackets still doesn't evaluated. am missing something? please help. thanks note \ has special meaning inside double quotes. do: regexp "scl\\[0\\]" $string or: regexp {scl\[0\]} $string

How to uninstall .exe packages which are installed by executing an installer through wix -

i prepared installer on execution install .exe packages while uninstalling installer .exe packages not getting uninstalled. you using detect condition wrong. detect condition used check whether package present or not on system already. a condition determines if package present on target system. condition can use built-in variables , variables returned searches. condition necessary because windows doesn't provide method detect presence of exepackage. burn uses condition determine how treat package during bundle action; example, if condition false or omitted , bundle being installed, burn install package. generally use registry search looking key added exepackage. use result="exists" in search set variable true or false use in detectcondition. additionally, need supply uninstallcommand the command-line arguments provided exepackage during uninstall. if attribute absent executable launched no command-line arguments. prevent exepackage being unins

How to make MySQL table primary key auto increment with some prefix with current year -

i have table this create table student( `regdno` varchar(20) not null auto_increment, `name` varchar(30) not null, `fathername` varchar(30) not null, `dob` varchar(30) not null, `course` varchar(30) not null, `address` varchar(100) not null, `contacthome` varchar(30) not null, `contactpersonal` varchar(30) not null, `coursefee` int(20) not null, primary key (regdno) ) i want increment id field '25/yerar/200','25/yerar/201','25/yerar/202'... etc . should have that? please let me know possible way. dont try that, instead better idea create table student( `regdno` int not null auto_increment, `regdno_fluf` varchar(20) not null, //<- new col stuff `name` varchar(30) not null, `fathername` varchar(30) not null, `dob` varchar(30) not null, `course` varchar(30) not null, `address` varchar(100) not null, `contacthome` varchar(30) not null, `contactpersonal` varchar(30) not null, `coursefee` int(20) not nul

caching - how can i implement offline storage in android using cache? -

hi want implement offline storage in android using cache( kinvey api)?can share step wise implementation same?i searched lot don't information android cache. cache cache = appcontroller.getinstance().getrequestqueue().getcache(); cache.entry entry = cache.get(api); if (entry != null) { try { string data = new string(entry.data, "utf-8"); jsonobject jobj = new jsonobject(data); filewriter file = new filewriter(cxt.getfilesdir().getpath() + "/" + filename); string jsonstring = jobj.tostring(); file.write(jsonstring); file.flush(); file.close(); // preparelistdata(jobj); } catch (unsupportedencodingexception e) { e.printstacktrace(); } }

What is the Theme name of selected text in Visual Studio (2015) -

Image
i want change colour of selected text in visual studio cannot find out name under in themes ? can see ? dark navy colour want change, can't see code when selected try out.. go tools->options(at bottom)->environment->fonts , colors on right hand side of menu find selected text option , change item background

visual studio - what type of a c# project to choose for creating a telegram bot -

i starting learn how make telegram bot.i want using c#. dont know type of project create in visual studio. these options when choose c# project you can select windows->c#->console application that's all, need write telegram bot. after - go nuget packages , download telegram.bot library , you're ready!

Julia - Transferring methods between workers -

i've been using sendto() method send variables between workers i under impression in julia, functions 'first class citizens', cannot transfer functions between workers using sendto() method what recommended way of transferring predefined methods between workers? update i seem able use sendto() method send anonymous functions a = function(x) x*2 end sendto(2,a=a) remotecall_fetch(2,a,5) 4 as opposed to function g(x) x*2 end sendto(2,g=g) remotecall_fetch(2,g,10) error: on worker 2: function g not defined on process 2 this suffices in cases, need able send defined functions over, of them complex , defined in scripts included when starting julia there no way send subset of methods in package machine. methods refer other types , functions in same module, system have @ least send dependencies well. work, bigger problem deciding responsibility distribute code, , when. example, library might decide send (or parts of itself) other nodes, user migh

ios8 - Missing DYSM Error on multiple Target in Fabric and Objective C -

Image
in app there 2 targets: target 1 : myapp - com.app.myapp target 2 : myappqa - com.app.myappqa email id used fabric registration same both targets. i have created 2 apps using fabric mac app . in myapp target fabric catching crash , working fine. when run using target myappqa getting missing dysm file error. i not able why crash not captured in second target. here method tried: bitcode - disabled (although not using bitcode crosschecked) debug information format - set dwarf dsym file (both release , debug) tried uploading manually dysm file (i got dysm file archiving project , selection showpackagecontents right clickmenu) i have tried possible solution available on internet. , don't want manually update dysm don't have itunesconnect account right now. step integrate crashlytics:- 1.add below cocoa pod pod 'fabric' pod 'crashlytics' 2.add run script build phase(for step must have login fabric api key) "${po

aem - How does versioning and version control management work in Oak? -

can oak 1.4 provides versioning , version control management features out of box? if so, how ? imply same features available aem authors i.e. exposed top layer ? jackrabbit has provided version management @ core. in oak implementation packaged under org.apache.jackrabbit.oak.jcr.version . the details around functional aspect of jackrabbit versioning (it holds true oak well) can found in wiki here the core concept revolves around mixin type mix:versionable , in oak node mixing type mix:versionable can versioned maintain change history. key aspect implementation versionmanager class provides api version relation operations. in aem, core concepts of versioning jcr extended , provided in more restricted way. aem allows versioning of pages only , limited providing own implementation of versionmanager in package com.day.cq.wcm.core.impl.versionmanagerimpl, refer documentation here by default in aem, version page created on activation of page. aem provides gui interface

Python pandas remove rows where multiple conditions are not met -

lets have dataframe this: id num 0 1 1 1 2 2 2 3 1 3 4 2 4 1 1 5 2 2 6 3 1 7 4 2 the above can generated testing purposes: test = pd.dataframe({'id': np.array([1,2,3,4] * 2,dtype='int32'), 'num': np.array([1,2] * 4,dtype='int32') }) now, want keep rows condition met: id not 1 , num not 1. want remove rows index 0 , 4. actual dataset easier remove rows dont want rather specify rows want i have tried this: test = test[(test['id'] != 1) & (test['num'] != 1)] however, gives me this: id num 1 2 2 3 4 2 5 2 2 7 4 2 it seems have removed rows id 1 or num 1 i've seen number of other questions answer 1 used above doesn't seem working out in case if change boolean condition equality , invert combined boolean conditions enclosing both in additional parentheses desired behaviour: in [14]:

android - Kindle Fire Push Notifications Example App -

Image
i implementing push notifications amazon sns , don't understand why in mobile-hub, under platforms see "android", "ios" not "kindle". how can download example project start building kindle fire app push notifications configurated did android version? p.s: it's incredible need build amazon app use push notifications , can't use android version because google play services not available fire tablets. thank feedback. sample kindle fire projects not on mobile hub's immediate road map make point duly add our backlog. unblock yourself, recommend use aws sdk android. please refer article details - https://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html can refer sample applications uploaded in folder reference code - https://docs.aws.amazon.com/sns/latest/dg/samples/snsmobilepush.zip

java - FileUpload not supported with primefaces 5.1 or higher -

i have strange issue. use fileupload via prime face , works perfectly. use primefaces 5.0. wanted upgrade primefaces 6.0, got error in following: import org.primefaces.event.fileuploadevent; import org.primefaces.model.uploadedfile; it says: package org.primefaces.event.fileuploadevent doesn't exist i use maven: <repository> <id>prime-repo</id> <name>prime repo</name> <url>http://repository.primefaces.org</url> </repository> <dependency> <groupid>org.primefaces</groupid> <artifactid>primefaces</artifactid> <version>6.0</version> </dependency> i got same error if use version higher 5 (5.1, 5.2,...) it strange have no idea why. i dont know if got fixed - suspect problem primefaces 6.0 not in repository - <repository> <id>prime-repo</id> <name>prime repo</name> <url>http://repository.primefaces.