Posts

Showing posts from August, 2014

sql server - How to retrieve as a text the value of a very long varcharmax in SSMS -

i can't find exact solution problem. have sql script creates long script in different steps. what is, along script, add new pieces of script varchar(max) using concatenation. final script long it's difficult me it. use following final instruction: select [processing-instruction(x)] = @myscript xml path(''), type; in way can manage quite long results result long seems ssms runs out of memory. i tried saving variable @myscript selecting , saving result text or file saves less 20k characters. have set xml max output length unlimited , seems work when click on result cell blue content (the xml script) ssms freezes. the nice thing appearently script generated quite fast (i logging print different steps) can't see results of efforts. is there way can hold of content of lengthy varchar(max) ? thanks create procedure selects variable output. select @myscript xmldata xml path(''), type; then go command line , execute: bcp "e

mime - Domino R9.0.1 FP4: disable logging related to ImportConvertHeaders? -

recently, installed fp4, , there lots of messages on console. happens when mailed document opened or saved browser, using xpages. rich-text fields in mail in mime format. lots of lines appear referring importconvertheaders, like: 25/06/2015 17:02:38,90 importconvertheaders> before parallellist() 25/06/2015 17:02:38,97 importconvertheaders> sendto: > [cimpimsg.cpp, 2559] 25/06/2015 17:02:39,03 importconvertheaders> after parallellist() 25/06/2015 17:02:39,09 importconvertheaders> sendto: > [cimpimsg.cpp, 2575] 25/06/2015 17:02:39,15 importconvertheaders> inetsendto: > [cimpimsg.cpp, 2576] 25/06/2015 17:02:39,22 importconvertheaders> originalto: > [cimpimsg.cpp, 2577] 25/06/2015 17:02:39,28 importconvertheaders> resent_to: > [cimpimsg.cpp, 2578] 25/06/2015 17:02:39,34 importconvertheaders> apparently_to: > [cimpimsg.cpp, 2579] 25/06/2015 17:02:39,40 importconvertheaders> altsendto: > [cimpimsg.cpp, 2580] 25/06/2015 17:02:3

Constant timer in JMeter delays every sample -

i have jmeter script n samplers. intend add constant timer of 1000 ms between 2 samplers. noticed delaying 1000 ms before every sampler. i'm working jmeter 2.13 . using bad or there error in last version of jmeter? to apply timer single sampler, add timer child element of sampler. timer applied before sampler executed. apply timer after sampler, either add next sampler, or add child of test action sampler http://jmeter.apache.org/usermanual/component_reference.html#timers

javascript - Map isn't loading on Cordova -

i have code google maps, in emulator see yellow pegman icon. else grey , map isn't loading. function onload() { document.addeventlistener("deviceready", ondeviceready, false); } function ondeviceready() { } var map; function initialize() { var mapoptions = { zoom: 14 }; map = new google.maps.map(document.getelementbyid('map-canvas'), mapoptions); // try html5 geolocation if(navigator.geolocation) { navigator.geolocation.getcurrentposition(function(position) { var pos = new google.maps.latlng(position.coords.latitude, position.coords.longitude); var infowindow = new google.maps.infowindow({ content: 'contentstring' }); var marker1 = new google.maps.marker({ position: pos, map: map, title: 'ciao!' }); google.maps.event.addlistener(marker1, 'click', function

Where are Ksh User-Defined Variables stored on UNIX machine? -

where kornshell (ksh) user-defined variables (udv) stored on aix (advanced interactive executive) machine? sample commands: @:/dir #variable=foovalue @:/dir #echo $variable foovalue so there file on aix server "foovalue" in text? value stored in memory? can variable sniffed out anyway? the shell running process own little chunk of memory gets dealt operating system. as define , set variables, shell stores names , values inside own process memory. when shell process exits, memory released operating system, , variables , values lost.

list - Remove all Elements With a Custom Null Value Java -

so i've been working on code , have custom class named word. here have list of words (dupewordlist) , remove words list have value of null. keep in mind, value variable inside word class. word class contains following stored values: frequency (int) value (string) is there anyway remove words when call word.getvalue() returns null? surely there way this. if loop through entire list , process. code: list<word> dupewordlist; dupewordlist = new arraylist<>(wordlist); dupewordlist.removeall(collections.singleton(null)); in java 8 do dupewordlist.removeif(e -> e.getvalue() == null)

c# - WebActivatorEx causing ArgumentException on Application Start -

i keep getting following argumentexception when trying visit page after installing webactivatorex nuget package. server error in '/pharmadotnet/ux' application. type pharma.mvc.startup doesn't have static method named configuration description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: system.argumentexception: type pharma.mvc.startup doesn't have static method named configuration source error: unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below. stack trace: [argumentexception: type pharma.mvc.startup doesn't have static method named configuration] webactivatorex.baseactivationmethodattribute.invokemethod() +166 webactivatorex.activationmanager.runactivationmethods(boolean designermode) +445 webactivatorex.act

.net - Async.fromBeginEnd with WinForms Begin/EndInvoke -

i'm trying write async wrapper on top of function called listcontrols extracts list of forms controls starting root control. plan implement in terms of control.begininvoke, control.endinvoke , async.frombeginend the code below: type private listcontrols = delegate of unit -> control list let asynclistcontrols (root:forms.control) : async<control list> = let begininvoke (_, _) = new listcontrols(fun () -> listcontrols root) |> root.begininvoke let endinvoke result = root.endinvoke result :?> control list async.frombeginend (begininvoke, endinvoke) the behavior i'm getting endinvoke never executed. knows doing wrong? there better approach? edit just make clear, computation executed async.runsynchronously. also if replace code /// code below reproduced memory , might not compile let asynclistcontrols (root:forms.control) : async<control list> = let ctx = windowsformssynchronizationcontext.cur

c++ - Safe array deletion -

i'm new c++ , i'm not absolutely sure how deal arrays , pointers in safe way. in class got member called items : item * items; in class method called read() open file , read items file. allocate space accordingly: items = new item[item_count]; item_count given variable in file , read in advance before creating items. in deconstructor in class release memory again: delete[] items; but if call method read() twice before deconstructor executed memory first array not released properly. release in read method in advance before allocating new memory. how check if memory allocated array items ? edit: know there many other possibilities out there more 'modern' approachs , more comfortable solutions. in case explicitly told use pointers , arrays (education purpose only). in c, initialize pointer null can check whether or not points valid memory, , after deallocation set null . failing so, may cause problems, dereferencing deallocated pointer (

node.js - npm install bcrypt is not working -

i trying install bcrypt npm in app in node version v0.10.25 , npm version 2.11.1. encountering error me this. in advance jayanth@devilsown:~/documents/rupeek-web/app$ npm install bcrypt | bcrypt@0.8.3 install /home/jayanth/documents/rupeek-web/app/node_modules/bcrypt node-gyp rebuild usage: gyp_main.py [options ...] [build_file ...] gyp_main.py: error: no such option: --no-parallel gyp err! configure error gyp err! stack error: `gyp` failed exit code: 2 gyp err! stack @ childprocess.oncpexit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16) gyp err! stack @ childprocess.eventemitter.emit (events.js:98:17) gyp err! stack @ process.childprocess._handle.onexit (child_process.js:797:12) gyp err! system linux 3.13.0-49-generic gyp err! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp err! cwd /home/jayanth/documents/rupeek-web/app/node_

c++ - Find the shortest path with Floyd algorithm -

i have adjacency matrix contains number 0s , 1s. if there no edge 1 node another, field 0, otherwise field marked 1. then, if field in adjacency matrix 0, there no edge between nodes, otherwise there edge weight of 1. now, have applied floyd algorithm find out shortest path node each other node. don't right solution. here floyd algorithm implementation. void floyd_warshal(int graph[nodes][nodes], int d[nodes][nodes]) { (int = 0; < nodes; i++) { (int j = 0; j < nodes; j++) { if (graph[i][j] == 0) { graph[i][j] = int_max; } d[i][j] = graph[i][j]; } } (int k = 0; k < nodes; k++) { (int = 0; < nodes; i++) { (int j = 0; j < nodes; j++) { if (d[i][j] > d[i][k] + d[k][j]) { d[i][j] = d[i][k] + d[k][j]; } } } } } i have set 0's int_max in order build standard matrix algorithm

windows - Issue with batch script with vbscript command in the batch file -

i new batch scripting , vbscript. want convert .xlsx excel files .csv excel files, in multiple directories (recursively). example: main directory subdirectory1 file1.xlsx file2.xlsx subdirectory2 file3.xlsx file4.xlsx i have made batch script: for /r %%a in (*.xlsx) ( set filename=%%a exceltocsv.vbs %filename% *.csv ) inside loop exceltocsv.vbs. got code thread convert xls csv on command line , , have tried top 2 answers (both don't require downloading anything). if wscript.arguments.count < 2 wscript.echo "error! please specify source path , destination. usage: xlstocsv sourcepath.xls destination.csv" wscript.quit end if dim oexcel set oexcel = createobject("excel.application") dim obook set obook = oexcel.workbooks.open(wscript.arguments.item(0)) obook.saveas wscript.arguments.item(1), 6 obook.close false oexcel.quit wscript.echo "done" the error saying exceltocsv.vbs file cannot ac

c# - Azure build include implicit project dependencies -

i have solution azure workerrole , few more projects use via reflection (no explicit reference). how can include projects in azure package (build projects automatically , have in azure package)? that best article problem found far: https://luisfsgoncalves.wordpress.com/2011/05/02/azure-service-packages-with-unreferenced-assemblies/

java - Background Service thread -

i have started background service. aware started on main thread , have create new thread/runnable within background class. i seem spending lot of time managing how prevent thread , background service continuing, leading me believe may better off using intent service , run @ specified timer interval main activity. background service performing network operation once every 10 seconds , sleeping. uses broadcast intent send info listening activities. my question is: when kill background service (either stopself(); or if use bound service 'unbind' command, kill created thread without me explicitly calling thread.interrupt? efficient way of utilising background service given added need threading?

openedx - EDX : How to set default advanced components for newly created course -

i have created xblock, want set xblock default xblock advanced component every newly created course automatically. thanks. you need add xblock list of advanced components. in cms settings file, add: advanced_component_types.append('your_xblock')

javascript - State of Ajax request on response.getWriter().write() -

i have spring mvc webapp, have following controller @resourcemapping("getpermission") @responsebody public modelandview getpermission(resourcerequest request, resourceresponse response){ . .do something.. . iterator<string> iterator = permissionlist.iterator(); while(iterator.hasnext()){ string perm = iterator.next(); if(perm.equalsignorecase("create")){ response.getwriter().write("true"); } } return null; } and ajax request $.ajax({ url:availableurls.permurl, success:function(result){ if(result=='true'){ something.. } } }); now when response.getwriter().write("true"); ajax request closed? or if permissionlist has got more 2 values create , write true twice? will request closed once wri

c# - Sending an update statement to sql-server using Dapper without all properties having values -

i have simple update function in data access layer uses dapper , updates product. public static void updateproduct(product product) { using (var connection = getopenconnection()) { stringbuilder updatesql = new stringbuilder(); updatesql.appendline("update proformaassumption "); updatesql.appendline("set categoryid = @categoryid "); updatesql.appendline(" ,purchasedate = @purchasedate "); updatesql.appendline(" ,type = @type "); updatesql.appendline("where id = @id;"); connection.execute(updatesql.tostring(), product); } } lets have create product scratch in code , want update existing product based on , know existing product's id. want update category, not other fields object not have fields set. product product = new product(); product.id = 325; product.categoryid = 16; productdal.updateproduct(product); i getting 2 errors: purchasedate: error - sqldatetime overflow. must between

sql server - SSIS: using parameters from configuration file -

Image
i have ssis package contains 1 data flow task has several data sources several destinations. package takes data fro 1 table , inserts another. want transfer source table destination table records belong particular collectionid. added parameter "collectionid" of type string project , added parameter configuration file. i select data source table via sql command. how can sql command use parameter added configuration file? understand need add clause, how point clause parameter in config file? you need create variable , map configuration value. assuming using ole connection type, map variable value sql statement ? placeholder. select * table columnvalue = ? finally, map variable in executesql task: if parameter doesn't have name can use 0, make sure data type correct. if text data type, need give proper length, not -1.

Can not connect to LDAPS server from PHP 5.5.4 on Windows 7 64bit, Apache 2.4 -

i can not connect ldaps server (3rd party) php ( php 5.5.4, apache 2.4, windows 7 64bit ). when i'm trying ldap_bind() function userdn , password, receive - unable bind server: can't contact ldap server. i have self-signed certificate ldaps server, don't know put pem file (base64) or conf.file (i have read many answers this, nothing works me - e.g. c:\openldap\sysconf\ldap.conf , tls_reqcert never etc.). development folder d:\webdev inside \www folder projects , \binaries folder \apache folder , \php folder. php module apache , apache started httpd.exe --standalone --console . openssl s_client -connect xxxx -cafile xxxx ldaps server works good, return code 0 . without -cafile fet code 19 (self-signed certificate in certificate chain) . ldap without ssl works fine me, i've tried free online ldap test server. the problem solved. notice: there no openldap installation on machine. solution set windows system variable ldapconf, value e.g. c:\u

SilverStripe Images - How to get images with original dimensions? -

i have page has images in many_many relation. how images original dimensions? i'm using below code <code><% loop images %> $setsize(250,250) <% end_loop %></code> <% loop images %> $me <% end_loop %> $me how access current item of loop (it's bit $this in php). another way $fortemplate , that's bit inelegant.

tomcat - Recommended way to save uploaded files in a servlet application -

i read here 1 should not save file in server anyway not portable, transactional , requires external parameters. however, given need tmp solution tomcat (7) , have (relative) control on server machine want know : what best place save file ? should save in /web-inf/uploads (advised against here ) or someplace under $catalina_base (see here ) or ... ? javaee 6 tutorial gets path user (:wtf:). nb : file should not downloadable means. should set config parameter detailed here ? i'd appreciate code (i'd rather give relative path - @ least tomcat portable) - part.write() looks promising - apparently needs absolute path i'd interested in exposition of disadvantages of approach vs database/jcr repository one unfortunately fileservlet @balusc concentrates on downloading files, while answer on uploading files skips part on save file. a solution convertible use db or jcr implementation (like jackrabbit ) preferable. store anywhere in accessible location

sql server - Asp.net calling SQL stored procedure that returns MultipleRecordset with heading -

i have stored procedure below select 'result first' select name, starttime, endtime, datediff( minute , starttime, endtime) gap, id ,type mytable t1 id in (select id idtable starttime between @min , @max) , name = 'resultfirst' order id desc select 'result second' select name,min(starttime) starttime, max(endtime) endtime myt2 (id = @id ) group name select 'result third' select name, min(starttime) starttime, max(endtime) completedtime, datediff(mi,min(starttime),max(endtime)) diff myt3 count(*) success (id = @id2) group name the sp returns multiple tables-formats respective heading. have code in asp.net mvc have context above db. tried create class manually matching above result set (though looks odd) , try execute sp below var lrdetails = this.context.database.sqlquery<mycustomeclass>("exec myresultsetsp @number", param).tolist(); foreach (var item in lrdetails) { var = item;

biztalk - cannot retrive a document specification using this name -

running biztalk 2013r2 , have send port custom pipeline. first component in pipeline standard "flat file assembler" component. properties default except " documentspecname " have given http://bts.go.store6.schemas.bt.transactionheader_ff#transactionheader i have checked schema deployed once checking admin console running following sql query: select msgtype, assemblyid, clr_namespace, clr_assemblyname bt_documentspec msgtype = 'http://bts.go.store6.schemas.bt.transactionheader_ff#transactionheader' this select returns following single row: http://bts.go.store6.schemas.bt.transactionheader_ff#transactionheader 7517 bts.go.store6.schemas.bt bts.go.store6.schemas, version=1.0.0.0, culture=neutral, publickeytoken=0a9764041befeb8b i have checked in .net4 gac , can confirm publickeytoken of assembly bts.go.store6.schemas v1 0a9674041befeb8b i have tried: undeploying application , ensuring relevant assemblies removed .net4 gac checked as

Android.mk Undefined Reference to "xxxx" -

i trying create 2 file ndk-build libkdu_jni.so uses libkdu_v75r.so i can create libkdu_v75r.so couldnt create libkdu_jni.so here android.mk: local_path := $(call my-dir) include $(clear_vars) local_module := libkdu_v75r local_src_files := kdu_arch.cpp \ kdu_threads.cpp \ mq_encoder.cpp \ mq_decoder.cpp \ block_coding_common.cpp \ block_encoder.cpp \ block_decoder.cpp \ encoder.cpp \ decoder.cpp \ ssse3_coder_local.cpp \ avx_coder_local.cpp \ compressed.cpp \ codestream.cpp \ blocks.cpp \ kernels.cpp \ messaging.cpp \ params.cpp \ colour.cpp \ ssse3_colour_local.cpp \ avx_colour_local.cpp \ avx2_colour_local.cpp \ analysis.cpp \ synthesis.cpp \ multi_transform.cpp \ ssse3_dwt_local.cpp \ avx2_dwt_local.cpp \ roi.cpp \ neon_coder_local.cpp \ neon_colo

c# code for simple calculation -

could me c# code. want calculate new a value- value calculated in way: a=a-2*b, see if result less zero , if in range (0,a) . doing in few steps, have found code on internet looks better mine, , explanation of problem code solves mine, not sure if code written in proper way or not, because doesn't give me correct result. also, there no reported error in code. = - 2 * b < 0 ? 0 : a; is code ok thing need, or not? your code this: int a; if((a - 2 * b) < 0) { = 0; } else { = a; } which doesn't make sense, because set a = a . think want this: a = (a - 2 * b) < 0 ? 0 : (a - 2 * b);

ruby on rails - How to detect how many active Unicorn workers are busy? -

i using ruby unicorn, , have configured have 15 worker processes. how tell how many workers processing work (are not idle, waiting work) @ current time? if need infomation on command line, check how cpu each using: ps aux --sort=-pcpu | grep '%cpu\|unicorn' ps aux --sort=-pcpu - gets list of processes running, sorted in cpu usage order reversed (highest cpu first) | - pipes output of previous command next grep '%cpu\|unicorn' - returns lines contain %cpu (the first line) or unicorn. \| or symbol in grep pattern. you should output this, cpu usage in 3rd column, memory usage in 4th: user pid %cpu %mem vsz rss tty stat start time command vagrant 4444 33.2 45.0 349988 152892 ? sl 13:43 0:03 unicorn master -c /vagrant/config/unicorn.rb -e development -d vagrant 4449 0.0 15.9 362204 162716 ? sl 13:44 0:01 unicorn worker[0] -c /vagrant/config/unicorn.rb -e development -d high cpu usage means in use, tiny

java - Restrict which requests a ServletDispatcher processes -

can control requests specific dispatcherservlet instances allowed issue? have defined 2 dispatchers, 1 service requests /public/public* , private/private* . here dispatchers @springbootapplication public class application extends springbootservletinitializer { public static void main(string[] args) { applicationcontext ctx = springapplication.run(application.class, args); } @override protected springapplicationbuilder configure( springapplicationbuilder application) { return application.sources(application.class); } @bean public dispatcherservlet dispatcherservletpublic() { return new dispatcherservlet(); } @bean public servletregistrationbean dispatcherservletpublicregistration() { servletregistrationbean registration = new servletregistrationbean(dispatcherservletpublic(), "/public/public*"); registration.setname(dispatcherservletautoconfiguration.default_dispatcher_servlet_registrati

c# - Scheduler job on configurable time on Window Azure -

we have multi-tenant application (being developed on azure) user can configure events based on time(configurable minute level). we have create background running job should fire these events. planning create worker role main thread provide tick event ( using timer.tick ) every minute. consumer of thread check if there events configured @ time. if event found, create multiple threads using parallel library , wait events complete. is there issue in approach proposed above? can improve further? is there paas offering can utilized achieve same? thanks have checked out azure scheduler? see http://azure.microsoft.com/en-us/services/scheduler/

How to retrieve recursively any files with a specific extensions in PowerShell? -

for specific folder, need list files extension .js if nested in subfolders @ level. the result output console should list of file names no extension line line copy , pasted in application. at moment trying this, in output console several meta information , not simple list. get-childitem -path c:\xx\x-recurse -file | sort length –descending could please provide me hints? if sorting length not necessity, can use -name parameter have get-childitem return name, use [system.io.path]::getfilenamewithoutextension() remove path , extension: get-childitem -path .\ -filter *.js -recurse -file -name| foreach-object { [system.io.path]::getfilenamewithoutextension($_) } if sorting length desired, drop -name parameter , output basename property of each fileinfo object. can pipe output (in both examples) clip , copy clipboard: get-childitem -path .\ -filter *.js -recurse -file| sort-object length -descending | foreach-object { $_.basename } | clip if want

jQuery / AngularJS - Upload file with AJAX -

somebody can answer please, once , all , if possible upload files using ajax ? i read few posts on web stating file upload using ajax impossible ! if possible, can please provide working piece of code of ajax request? i tried 10 examples found on web , no 1 working. please not refer me plugins. understand how works , implement myself. thanks in advance! try this, html <input id="pic "type="file" name="file" onchange="javascript:this.form.submit();"> js: $("#pic").change(function() { var file_data = $('#pic').prop('files')[0]; var form_data = new formdata(); form_data.append('file', file_data) alert(form_data); $.ajax({ url: 'upload.php', datatype: 'text', cache: false, contenttype: false, processdata: false, data: form_data, ty

php - Dynamic laravel SQL query builder -

i'm trying create dynamic query laravel whereby if conditions met add query. here have attempted far. guidance please? $tasks = task::leftjoin('task_recipients', 'tasks.task_id', '=', 'task_recipients.recipient_task_id'); if ($filterassignedtome !== null) { $tasks->where('task_recipients.recipient_user_id', '=', $user_id); } if ($filterassignedbyme !== null) { $tasks->where('tasks.created_by', '=', $user_id); } $tasks->groupby('task_id'); $tasks->get(); here go: $tasks = task::leftjoin('task_recipients', 'tasks.task_id', '=', 'task_recipients.recipient_task_id'); if ($filterassignedtome !== null) { $tasks = $tasks->where('task_recipients.recipient_user_id', '=', $user_id); } if ($filterassignedbyme !== null) { $tasks = $tasks->where('tasks.created_by', '=',

javascript - Too many parallax images -

i'm making static website on have many parallax images. each section separated parallax image. problem i'm facing is, i'm building website , adding sections , more parallax images, of images near bottom of website moving out of frame. mean is, images starting @ wrong position, , scroll, end moving out of div or frame , see empty space underneath image. this not happening images though; images near bottom of website experience problem. furthermore, lower image is, more pronounced problem is. here code inserting parallax images: <div class="section parallax light-translucent-bg parallax-bg-5"> <div class="container"> <div class="call-to-action"> </div> </div> </div> here css div: .parallax-bg-5 { background: url("../images/parallax-bg-5.jpg") 50% 0px no-repeat; } use background-attachment: fixed example * { padding: 0; margin: 0; box-sizing:

javascript - bind component method from callback to child component -

i new react js , unable pass parent component method child in foreach loop.my code is below app component.i trying show data got api in table looping child component recordrow . var app= react.createclass({ qwerty: function(name) { alert("qwerty"); alert(name); }, render:function(){ /* table header , border */ //alert("result2:"+this.state.result) var rows = []; var data = this.state.result; if(data){ data.foreach(function(data2,i){ rows.push(<recordrow data={data2} key={i} fun ={this.qwerty}/>) }); } return( <table classname="table table-bordered"> <tr> <th>zipcode</th> <th>shortcode</th> <th>

c# - Asp .Net, sorting grid view error -

on click of email fiend in gridview, nothing happens. here code. please help. new asp .net. i have set onsort = "gvdetails_sorting" , sorting =true front end : <asp:templatefield headertext="email id"> <itemtemplate> <asp:label id="lblemailid" runat="server" text='<%# bind("email_id") %>' wrap="true" width="100%" sortexpression="email_id"> </asp:label> </itemtemplate> back end : #region "properties" public sortdirection gridviewsortdirection { { if (viewstate["sortdirection"] == null) { viewstate["sortdirection"] = sortdirection.ascending; } return (sortdirection)viewstate["sortdirection"]; } set { viewstate["sortdirection"] = value; } } #endregion protected void

php - Laravel change password right after email confirmation view not working -

when user created random password (and auth code) created , send email user. when clicked on link in email user status 1 (so active) , user able change password right away. now doesn't work want to. usercontroller: public function store(createuserrequest $request, user $user, attribute $attribute) // unnecessary code if ((input::get('usertype_id')) > 1) { $randompassword = str_random(8); $user->password = hash::make($randompassword); $authentication_code = str_random(12); $user->authentication_code = $authentication_code; $user->active = 0; }; $user->save(); if ((input::get('usertype_id')) > 1) { // email sturen met verficatie code $email = input::get('email'); mail::send('emails.user', ['user' => $user, 'password' => $randompassword, 'authentication_code' => $authentication_code], function ($message) use ($email) { $message->to($email, 

java - JPA DAO Update row without full row context -

have table >70 columns. i use 8 of these columns .java object, including id - not sure if matters. my id column has following: @column(name = "pseudonym", nullable = false) @basic(fetch = fetchtype.eager) @id my question this: if want update row using xxxdao.store(updatedrow) - need specify reference row id or missing here? i'm getting following exception: debug: org.springframework.web.servlet.dispatcherservlet - not complete request javax.persistence.persistenceexception: org.hibernate.exception.dataexception: not execute jdbc batch update .. ~(adding in here)~ not valid month hopefully have explained enough. let me know if haven't. thanks in advance some pseudo code reference: item = dao.getitembyid(123); item.setupdatetime(thetime); dao.store(item); store: return getentitymanager().merge(itemtostore); to clarify i getting exception above not valid month . because trying update oracle table had column defined timestamp. trying

list - Ordering Ajax Calls -

i want ajax calls being made in particular order, let me explain further using code. var feed_urls = [ 'url_1', 'url_2', 'url_3', ... ... 'url_n', ]; i making ajax calls using jquery's getjson method so $.each(feed_urls,function(index,value){ $.getjson(value, function(data) { $.each(data.feed.entry,function(i,val){ list.push(val.content.src); }); }); }); the problem facing since ajax calls asynchronous content of list not in same order. there anyway solve ? the preferable order of ajax calls url_1 followed url_2 followed url_3 , on till url_n use ajaxsetup() async :false, in re: $.ajaxsetup( { data: &q

winforms - C# Reflection. Set TableAdapter ConnectionString -

i hope can one. i've been trying create new base class winform. want have base class go through tableadapters has on , update connection strings without adding code form. put tableadapters on form , don't worry connection string settings it's handled in base class. the problem i'm having reflection code can find property fine can't set it. can help? below code (updated) public class cformws : form { public string connectionstringtouse { get; set; } public cformws() { load += cformws_load; } void cformws_load(object sender, eventargs e) { initilisetableadapters(); } private void initilisetableadapters() { var listofcomponents = enumeratecomponents(); foreach (var itemcomp in listofcomponents) { if (itemcomp.tostring().tolower().endswith("tableadapter")) { var itemcompprops = itemcomp.gettype().getruntimeproperties()

javascript - $(document).on('click', .... is not working on file inclusion -

i have header.jsp file $(document).ready(function() { alert("calling in header"); $(document).on('click', '#get-info-list', function(event) { event.preventdefault(); alert('hiiiiiii'); $.get('getnotification', function(data) { console.log(data); $("#infolist").append(data); }); }); }); some in code <li class="dropdown"> <span id="info-count"></span> <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="get-info-list"> <i class="fa fa-list-alt" ></i> </a> <ul class="dropdown-menu" id="infolist" role="menu"> </ul> </li> i have test.jsp file in header div id have added above header.jsp <div id="header"> <jsp:include page="/pages/commo

regex - How to use separate() properly? -

i have difficulties extract id in form: 27da12ce-85fe-3f28-92f9-e5235a5cf6ac from data frame: a<-c("name_27da12ce-85fe-3f28-92f9-e5235a5cf6ac_thomas_myr", "name_94773a8c-b71d-3be6-b57e-db9d8740bb98_thimo", "name_1ed571b4-1aef-3fe2-8f85-b757da2436ee_alex", "name_9fbeda37-0e4f-37aa-86ef-11f907812397_john_tya", "name_83ef784f-3128-35a1-8ff9-daab1c5f944b_bishop", "name_39de28ca-5eca-3e6c-b5ea-5b82784cc6f4_due_to", "name_0a52a024-9305-3bf1-a0a6-84b009cc5af4_wis_michal", "name_2520ebbb-7900-32c9-9f2d-178cf04f7efc_sarah_lu_van_gar/thomas") basically thing between first , second underscore. usually approach by: library(tidyr) df$a<-as.character(df$a) df<-df[grep("_", df$a), ] df<- separate(df, a, c("id","name") , sep = "_") df$a<-as.numeric(df$id) however time there many underscores

angularjs - values not getting displayed using angular directive -

i trying add directive in angular , use same display values. values not getting displayed. my html code <!doctype html> <html> <head> <link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" /> <link href='https://fonts.googleapis.com/css?family=playfair+display:400,400italic,700italic|oswald' rel='stylesheet' type='text/css'> <link href="css/main.css" rel="stylesheet" /> <script src="js/vendor/angular.min.js"></script> </head> <body ng-app="pizzaplanetapp"> <div class="header" > <h1><span>pizza</span><span>planet</span></h1> </div> <div class="main" ng-controller="maincontroller"> <div class="container"> <h1>specials {{ today | date }

node.js - Nodejs d3 package gives error -

i getting below error while trying use d3 package on node.js. { "ingestiontime": 1435227001159, "timestamp": 1435227000775, "message": "\n/var/task/node_modules/d3/d3.js:562\n" }, { "ingestiontime": 1435227001159, "timestamp": 1435227000775, "message": " return n.queryselector(s);\n" }, { "ingestiontime": 1435227001159, "timestamp": 1435227000775, "message": " ^\n" }, { "ingestiontime": 1435227001159, "timestamp": 1435227000835, "message": "typeerror: cannot call method 'queryselector' of undefined\n" }, { "ingestiontime": 1435227001159, "timestamp": 1435227000835, "message": " @ d3_select (/var/task/node_modules/d3/d3.js:562:14)\n&q

Spring Batch Integration using Java DSL / launching jobs -

i've working spring boot/batch projet containing 2 jobs. i'm trying add integration poll files remote sftp using java configuration / java dsl, , launch job. the file polling working i've no idea on how launch job in flow, despite reading these links : spring batch integration config using java dsl and spring batch integration job-launching-gateway some code snippets: @bean public sessionfactory sftpsessionfactory() { defaultsftpsessionfactory sftpsessionfactory = new defaultsftpsessionfactory(); sftpsessionfactory.sethost("myip"); sftpsessionfactory.setport(22); sftpsessionfactory.setuser("user"); sftpsessionfactory.setprivatekey(new filesystemresource("path key")); return sftpsessionfactory; } @bean public integrationflow ftpinboundflow() { return integrationflows .from(sftp.inboundadapter(sftpsessionfactory()) .deleteremotefiles(boolean.false)

html - Using CSS { white-space: nowrap } with Outlook -

Image
i have report lots of wide columns emailing directly out of sql. generating html dynamically have come across issue column widths. i have inserted following css: #tablemain th { text-align: center; white-space: pre; border: 1px solid black; padding: 0; border-spacing: 0; border-collapse: collapse; background-color: #f0f0f0; font: 11pt bold arial sans-serif; } now while html generated renders fine in ie, insists on wrapping cell contents onto 2 rows in outlook. in internet explorer: in outlook outlook our company wide email client don't need support multiple clients, need work nicely here. and suggestions gratefully received. that fact outlook uses word (not ie) rendering html markup of emails. supported , unsupported html elements, attributes, , cascading style sheets properties may find described in following articles in msdn: word 2007 html , css rendering capabilities in outlook 2007 (part 1 of 2) word 20

c - Explaination for printf with comparing variables as arguments -

main(){ int = 5; int b = 6; printf("%d %d %d",a==b,a=b,a<b); } output in testing 1 6 1 in above program expecting output 0 6 0 . in compilers giving output (e.g. xcode) in other compilers giving output 1 6 1 . couldn't find explanation . case of sequence point. consider below program main(){ int = 5; int b = 6; printf("%d %d %d",a<b,a>b,a=b); printf("%d %d",a<=b,a!=b); } output in testing 0 0 6 1 0 this below program giving correct output expecting 0 0 6 1 0 why above program not giving output 060 in of compilers c standard says: c11: 6.5 (p2): if side effect on scalar object unsequenced relative to either different side effect on same scalar object or a value computation using value of same scalar object, behavior undefined [...] this means program invokes undefined behavior. in statements printf("%d %d %d",a==b,a=b,a<b); and printf(&quo

c# - Why is my DropDownList not working? -

i display dropdownlist isn't working yet. asp.net code: <asp:panel id="pnlchannel" runat="server"> <asp:sqldatasource id="sdschannel" runat="server"></asp:sqldatasource> <asp:dropdownlist id="ddlchannel" runat="server"> <asp:listitem id="limdefault" runat="server"></asp:listitem> </asp:dropdownlist> </asp:panel> and codebehind: public panel getdropdownlist() { // create drop down list , data source panel pnlchannel = new panel(); dropdownlist ddlchannel = new dropdownlist(); listitem limdefault = new listitem(); sqldatasource sdschannel = new sqldatasource(); // configure data source sdschannel.connectionstring = configurationmanager.connectionstrings["cr_sql"].connectionstring; sdschannel.selectcommand = "select * table"; sdschannel.id = "sdschannel"; // configur