Posts

foreach - For Each Loop Unable to assign value to a variable -

i have execute sql tasks gets missing ids , stores them objectvariable(missingids of datatype object).using each loop container wanna insert data multi tenant architecture db based on id's name(which name of schema). i've used each ado enumerator , used objectvariable(missingids) ado objectsourcevariable , enumeration mode "rows in first table".in variable mappings mapped variable(companyid) of datatype string index 0. in each container,i wish name of id , store in variable called schema(datatype string).i've used execute sql task getting error. error: 0xc002f309 @ getting schema name accountid, execute sql task: error occurred while assigning value variable "schema": "single row result set specified, no rows returned.". task failed: getting schema name accountid i've used breakpoints , able see data available accountid. anyone knows issue be? thanks vijay

java - com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize out of START_ARRAY token -

i'm getting start_array error following model. i'm expecting object of inputdetails class inputdetails{ public list<eachfielddetails> fielddetails; } class eachfielddetails{ public string fieldname; public string value; } json input follows: [{"fieldname":"sitename","value":"warehouse"},{"fieldname":"ponumber","value":"po1"},{"fieldname":"itemcode","value":"itemcode1"},{"fieldname":"asdnserialno","value":"null"}] can provide me solution. here class public response setwhdetails(@beanparam requestbean requestbean,inputdetails saveinputs) { //do operation } your json specifies array while you're trying deserialize object. if json like: { "fielddetails" : [ {"fieldname":"sitename","value":"warehouse"}, {...

java - How can I add security header in message? -

i wanto built simple soap client in java call soap java web service. have import wsdl in project ad built client. if try run code, have erro: avvertenza: unable find required classes (javax.activation.datahandler , javax.mail.internet.mimemultipart). attachment support disabled. axisfault faultcode: { http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd }invalidsecurity faultsubcode: faultstring: error: no security header found in message faultactor: faultnode: faultdetail: { http://xml.apache.org/axis/ }stacktrace:error: no security header found in message @ org.apache.axis.message.soapfaultbuilder.createfault(soapfaultbuilder.java:222) @ org.apache.axis.message.soapfaultbuilder.endelement(soapfaultbuilder.java:129) @ org.apache.axis.encoding.deserializationcontext.endelement(deserializationcontext.java:1087) @ com.sun.org.apache.xerces.internal.parsers.abstractsaxparser.endelement(abstractsaxp...

ruby - Rails polymorphic comments ajax - 500 (Internal Server Error) -

Image
i used tutorial making polymorphic comments https://gorails.com/episodes/comments-with-polymorphic-associations it works fine when set remote true comments form got 505 error(the new comment not appended list) when trying add new comment. but when reload page new comment appears in list. what can wrong here? i got files in views/comments folder: create.js <% unless @comment.errors.any? %> $("ul.comments").append('<%= j render "comments/comment" %>') $("#new_comment")[0].reset(); <% end %> _form.html.erb <%= simple_form_for([commentable, comment.new], remote: true) |f| %> <%= f.input :body, label: false %> <%= f.button :submit, "submit" %> <% end %> comments_controller.rb def create @comment = @commentable.comments.new(comment_params) @comment.user = current_user @comment.save respond_to |format| format.html { redirect_to @commentable, notice:...

html - Trying to align input field with labels -

Image
i want align input fields shown below, keep using <label> in correct way. the code below: <form action="add.php" method="post" enctype="multipart/form-data"> <label for="refno">field1 name (long)</label> <input id="refno" type="text" name="refno" value="" /><br> <label for="name">field2 name</label> <input id="name" type="text" name="name" value="" /><br> <input type="submit" value=":: add ::" name="addbtn" /> </form> i thinking separate <label> tags in <div> , input fields in , floating manipulation make intended alignment, correct way? how form > label { min-width: 185px; display: inline-block; } <form action="add.php" method="post" enctype="multipart...

linux - Thread management in a cloned process with CLONE_VM flag set -

i need thread management inside cloned process. point need create , destroy threads inside cloned process asynchronously ( pthread_cancel_asynchronous set). fine if clone_vm not set, need because main , child process must share same address space. below example demonstrate question. being compiled clone_vm flag program hangs @ pthread_join while without clone_vm fine. there ways deal problem? p.s. tried @ debian gnu/linux versions 7,8 , unstable (kernels 3.2, 3.16, 4.0). #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <pthread.h> #include <sched.h> #include <string.h> #include <signal.h> #include <sys/types.h> #include <sys/wait.h> /* compile # gcc -o pthread_test -lpthread pthread_test.c */ #define clone 1 pthread_mutex_t mutex = pthread_mutex_initializer; void *thread_test(void *unused) { pthread_setcanceltype(pthread_cancel_asynchronous, null); pthread_setcancelstate(pthread_cancel_...

php - Data taken from mysql display division if the date by day is changed -

Image
currently have code takes data mysql , displays text , tried make underline bar if date day changed, no luck the first picture shows code , second 1 i'm trying do. tried check if current date different new 1 no luck. how detect date change current code, can make break between same day easy viewing? <?php chdir(__dir__); error_reporting(e_strict | e_all); ini_set('display_errors', true); ini_set('display_startup_errors', true); require_once 'config.php'; $mysqli = new mysqli($server, $db_user, $db_password, $database); if ($mysqli->connect_error) { die("connection failed: " . $conn->connect_error); } $sql_list = "select date, name, quantity, 0 price, 'download' source downloads union select date, name, quantity, price, 'sale' source sales order by(`date`) desc"; $result_list = $mysqli->query($sql_list); $ans_lists = array(); while($row = $result_list->fetch_assoc()){ $sourc...