tag:blogger.com,1999:blog-51702293953925461512024-03-08T01:50:30.759-08:003D grphiquesimohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.comBlogger20169125tag:blogger.com,1999:blog-5170229395392546151.post-9146240670670338002017-02-14T01:35:00.003-08:002017-02-14T01:35:16.452-08:00transition effect not working<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42222439" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am trying to get button visibility with animated effect using CSS transition effect on hover but the effect not working.</p>
<p>I am unable to find my mistakes, can anybody help me to solve my issue.</p>
<p>My HTML & CSS Code is as under.</p>
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override">
<code>.prodiv3
{
background-color:#d79e37;
position:relative;
z-index:999;
}
.product-box a
{
text-decoration:none;
}
.prodiv3 h2
{
padding:0px !important;
margin: 0px !important;
color: #fff;
padding-left:15px !important;
}
.prodiv3 p
{
color: #000000;
padding-left:15px !important;
}
.link-icon
{
position:relative;
bottom:120px;
left:10px;
visibility:hidden;
width:60px;
height:60px;
background:url(../images/link-icon.png) no-repeat center center #ff411c;
//display:block;
border-radius:100%;
}
.product-box a:hover .link-icon
{
visibility:visible;
-moz-transition: all 1s ease-in !important;
-webkit-transition: all 1s ease-in !important;
-o-transition: all 1s ease-in !important;
transition: all 1s ease-in !important;
}</code>
</pre>
<pre class="snippet-code-html lang-html prettyprint-override">
</pre></div>
</div>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:34:49Z" class="relativetime">25 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kFxClS">Khetaram</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
transition effect not working
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-83299790463231882152017-02-14T01:35:00.001-08:002017-02-14T01:35:15.846-08:00Checking mail id of distribution list<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42222437" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am developing VBA automation which will forward specific mail to given distribution list which have been saved in one specific worksheet and also i have to check all mail id's of distro if it is correct or not. So Please help to develop a code which will check mail id if they correct or not..</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:34:44Z" class="relativetime">31 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2klXMhB">Achyut Deore</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Checking mail id of distribution list
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com2tag:blogger.com,1999:blog-5170229395392546151.post-87847813170537407802017-02-14T01:15:00.003-08:002017-02-14T01:15:11.910-08:00Python code required<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42222024" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I have a text file containing unstructured data which has record locators and passenger names..I want to fetch all record locators with passenger names. If a record doesn't have passenger name don't fetch it in result. Suppose my file has: Record 1 Record 2 Record 3 John Record 4 Smith</p>
<p>So output file should have Record 3 John Record 4 Smith As output</p>
<p>Please post a python code for the same.</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:14:36Z" class="relativetime">33 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2l37S3U">Kiran Rastogi</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Python code required
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-31655433363797101462017-02-14T01:15:00.001-08:002017-02-14T01:15:10.893-08:00how to get device active user with specific Time-stamp<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42222022" /><span itemprop="upvoteCount" class="vote-count-post">-1</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>How to get Active User in Android Multi-User Support Devices with Sending specific Time-Stamp?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:14:27Z" class="relativetime">42 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kO36sy">kamal hajatmand</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
how to get device active user with specific Time-stamp
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-605163829573797852017-02-14T01:01:00.003-08:002017-02-14T01:01:03.826-08:00T-Sql Find the Employee Count as average by the number of months in the year<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221754" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I have table called "<strong>Employee</strong>"</p>
<p>Employee table has below columns</p>
<pre>
<code>Id (identity)
EmploymentStartDate (datetime),
EmploymentEndDate (nullable datetime),
</code>
</pre>
<p><strong>My query:</strong></p>
<pre>
<code>DECLARE @FromYear int = 2010, @ToYear int = 2017;
WITH YEARS AS
(
SELECT @FromYear As TheYear
UNION ALL
SELECT TheYear + 1
FROM YEARS
WHERE TheYear < @ToYear
)
SELECT
Y.TheYear,
SUM
(
CASE WHEN
YEAR(EmploymentStartDate) <= Y.TheYear
AND (EmploymentEndDate IS NULL OR YEAR(EmploymentEndDate) >= Y.TheYear)
THEN 1
ELSE 0
END
) WorkingEmployeeCount,
SUM
(
CASE WHEN
YEAR(EmploymentStartDate) = Y.TheYear
THEN 1
ELSE 0
END
) StartedEmployeeCount,
SUM
(
CASE WHEN
YEAR(EmploymentEndDate) = Y.TheYear
THEN 1
ELSE 0
END
) SeperatedEmployeeCount
FROM
YEARS Y
CROSS JOIN
Employees E
GROUP BY
Y.TheYear
</code>
</pre>
<p>If ı run above query i get below result</p>
<pre>
<code>TheYear - WorkingEmployeeCount - StartedEmployeeCount - SeperatedEmployeeCount
2010 - 1 - 1 - 0
2011 - 2 - 1 - 0
2012 - 2 - 0 - 0
2013 - 2 - 0 - 0
2014 - 2 - 0 - 0
2015 - 4 - 2 - 1
2016 - 3 - 0 - 0
2017 - 6 - 3 - 2
</code>
</pre>
<p><strong>Question:</strong></p>
<p>I need to use below formula.First i want to find every year's months count than AVG of EmployeeCount per year.</p>
<pre>
<code>EmployeeCount / MonthsCountPerYear than get AVG
</code>
</pre>
<p>If i try below query it is not working for me (I can not create a solution)</p>
<pre>
<code>(AVG(EmployeeCount / (CASE WHEN TheYear = DATE(GETUTCDATE) THAN 2 ELSE 12 END))) AS AvgEmployeeCount
</code>
</pre>
<p>What i want should be as below</p>
<pre>
<code>TheYear - WorkingEmployeeCount - StartedEmployeeCount -SeperatedEmployeeCount - AvgEmployeeCount
2010 - 1 - 1 - 0 - 1,30
2011 - 2 - 1 - 0 - 1,20
2012 - 2 - 0 - 0 - 1,00
2013 - 2 - 0 - 0 - 3,50
2014 - 2 - 0 - 0 - 5,33
2015 - 4 - 2 - 1 - 7-33
2016 - 3 - 0 - 0 - 9-34
2017 - 6 - 3 - 2 - 1,15
</code>
</pre>
<p>How can i find employee count avg for every year according to months in a year.Any help will be appreciated.Thank you</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:00:31Z" class="relativetime">30 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2krBRRg">S.S</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
T-Sql Find the Employee Count as average by the number of months in the year
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-46488773338626221772017-02-14T01:01:00.001-08:002017-02-14T01:01:03.254-08:00Swagger editor doesn't offer relevant code completion<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221750" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>When I use swagger editor (online or local) sometimes it offers code completion of the relevant level and often it starts offering code completion of the root level: definitions, swagger, info, paths, etc. while my cursor is not at the root level, for example when I'm entering properties. There are also no indications that tell that there is something wrong with the document. I cannot see the pattern to find out when this happens, it just happens and it makes the editor very difficult to use as I have to type almost everything.</p>
<p>I wish I could provide more details but for now this problem happens randomly. Does anyone know what can cause this behavior and how to fix it?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 09:00:17Z" class="relativetime">45 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2leG3Ib">Limbo Exile</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Swagger editor doesn't offer relevant code completion
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-19612577632229679742017-02-14T00:45:00.003-08:002017-02-14T00:45:21.836-08:00Can we deconstruct arbitrary type constructors?<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221433" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>In Haskell, or any other programming language supporting pattern matching, can we achieve the following:</p>
<p>Given a type constructor e.g. <code>Left :: a -> Either a b</code> I can extract its argument with</p>
<pre>
<code>let f (Left x) = [x]
</code>
</pre>
<p>Is there any way to achieve the same thing for any type constructor, something like an operator (<code>*</code>) to lift <code>Left x</code> to <code>Apply (λa.Left a) [x]</code> or <code>BinTree x y</code> to <code>Apply (λa,b.BinTree a b) [x,y]</code>, so we could do</p>
<pre>
<code>let extract x = case *x of Apply _ xs -> xs
</code>
</pre></div>
<div class="user-action-time">asked <span title="2017-02-14 08:44:46Z" class="relativetime">33 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kFdUH7">Adam</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Can we deconstruct arbitrary type constructors?
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-8067335344091205062017-02-14T00:45:00.001-08:002017-02-14T00:45:20.627-08:00how do I rename tooltip of echart download icon<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221432" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am using echart</p>
<p><a href="http://ift.tt/2kFmkhA" rel="nofollow noreferrer">enter image description here</a></p>
<p>How do I rename download button tooltip in corner of top-right(written in Chinese language)</p>
<p>I can't find in echart option.</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 08:44:46Z" class="relativetime">33 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2klYLyd">shahab kamali</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
how do I rename tooltip of echart download icon
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-31842648002111441542017-02-14T00:30:00.003-08:002017-02-14T00:30:28.193-08:00How do i append another list within list comprehension<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221185" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am trying to find out unique elements and avoid duplicates , between the lists (using list comprehension)</p>
<pre>
<code>`a = [10 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,9]`
`b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]`
</code>
</pre>
<p><code>dup_list = []</code></p>
<h2>This works , but with duplicates</h2>
<pre>
<code>`final_list = [uniq for uniq in a if a not in dup_list if uniq in b ]`
</code>
</pre>
<p>when i try to append the my dup_list in the last line of the comprehension statement it says invalid syntax i.e this doesn't work. "final_list = [uniq for uniq in a if a not in dup_list if uniq in b dup_list.append(uniq) " I am a newbie in python so apologize for any missed out basic facts .</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 08:30:20Z" class="relativetime">6 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kNYvXq">coolguy6764</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
How do i append another list within list comprehension
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-45767665348073732492017-02-14T00:30:00.001-08:002017-02-14T00:30:27.399-08:00ORACLE-Why WHERE clause is not working on UNION?<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221180" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am working on oracle 11g.But when I add WHERE clause in UNION of two table it shows error:</p>
<blockquote>
<p>ORA-00904: "T8"."ENTRY_DATE": invalid identifier</p>
</blockquote>
<p>This is my query:</p>
<pre>
<code>SELECT * FROM
(
SELECT T1.OUTLET_ID,T1.STATUS,T1.ENTRY_DATE FROM T_ORDER_DETAIL T1
UNION
SELECT T8.OUTLET_ID,T8.REASON,T8.ENTRY_DATE FROM T_NON_PRODUCTIVE_SALES T8
)
WHERE T1.OUTLET_ID = T8.OUTLET_ID AND T1.ENTRY_DATE = T8.ENTRY_DATE
</code>
</pre>
<p>Where's the problem?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 08:30:06Z" class="relativetime">19 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2lL4cUj">OUN Ash</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
ORACLE-Why WHERE clause is not working on UNION?
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-85922983017871854502017-02-14T00:20:00.003-08:002017-02-14T00:20:12.735-08:00create threaded class functions with arguments inside class<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42221014" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I have an object of class <code>AI</code>, which has a private non static void function which has a lot of arguments: <code>minmax(double& val,double alpha, double beta, unsigned short depth, board* thisTurn)</code>; because this is a very time intensive function I want to use a number of threads to run it concurrently, therefor I must create a thread with this function inside another function inside the AI class;</p>
<p>According to<a href="http://ift.tt/2klYgEp" title="Create thread inside class with function from same class">This question</a> to make threads inside member functions containing non static member functions wiht no arguments of said class, one must call:</p>
<pre>
<code>std::thread t(&myclass::myfunc,this);
</code>
</pre>
<p>And according to <a href="http://ift.tt/2kFlhOw" rel="nofollow noreferrer">this tutorial</a> threads of fucntions with multiple arguments can be created as such:</p>
<pre>
<code>std::thread t(foo,4,5)
</code>
</pre>
<p>where the function 'foo' has 2 integer arguments</p>
<p>However I desire to mix these to things, to call a function which has arguments, which is also a non static member function, from inside the class that it is a member of, and i am not sure how to mix these to things.</p>
<p>I have off course tried (remember that it is inside a function inside the AI class):</p>
<pre>
<code>std::thread t(&AI::minmax,val,alpha,beta,depth,thisTurn,,this);
</code>
</pre>
<p>and</p>
<pre>
<code>std::thread t(&AI::minmax,this,val,alpha,beta,depth,thisTurn,this);
</code>
</pre>
<p>But both cases fails with a compile error like this:</p>
<pre>
<code>error: no matching constructor for initialization of 'std::thread'
candidate constructor template not viable: requires single argument '__f', but
7 arguments were provided
</code>
</pre>
<p>My question is therefor, if or if not, it is even possiple to -- from inside a member function of a class -- call a non static member function which has several arguments as a thread, and if this is the case, how it is done.</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 08:20:00Z" class="relativetime">11 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2km2fka">Nikolaj</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
create threaded class functions with arguments inside class
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-17265196865296034432017-02-14T00:20:00.001-08:002017-02-14T00:20:11.975-08:00Devexpress:aspxtextbox text validationsimohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-40862787088232081882017-02-14T00:10:00.003-08:002017-02-14T00:10:54.776-08:00Parse mutually exclusive input arguments with MATLAB's input parser<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42220876" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I have a function that has at least two required input arguments. Depending on the value of the second argument, there might be a third required input argument. I am wondering what is the best way to code a robust function that incorporates these requirements using MATLAB's input parser?</p>
<p>The function may look like this:</p>
<pre>
<code>function vout = test(ReqInpArg1, ReqInpArg2, varargin)
</code>
</pre>
<p><code>ReqInpArg2</code> may hold the following string content:</p>
<ul>
<li><code>'cash'</code></li>
<li><code>'absHurdleRate'</code></li>
<li><code>'none'</code></li>
</ul>
<p>If the user chooses <code>cash</code>, than another input argument <code>numCashTicker</code> needs to be defined as part of <code>varargin</code>, e.g. <code>'numCashTicker', 4</code>. If <code>absHurdleRate</code>has been choosen, a different input parameter has to be defined, e.g. <code>'hurdleRate', 0.2</code>. If, on the other hand, <code>none</code> has been chosen, none of these input parameter must be defined. As a matter of fact, <code>numCashTicker</code> and <code>hurdleRate</code> are mutually exclusive, i.e. they must not be defined at the same time. In addition, if the user didn't chose <code>none</code>, he must define one of the other varargin input arguments.</p>
<p>What is best practice / the best strategy in order to implement these requirements?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 08:10:39Z" class="relativetime">14 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2leyQrE">Andi</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Parse mutually exclusive input arguments with MATLAB's input parser
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-78879618913489610972017-02-14T00:10:00.001-08:002017-02-14T00:10:54.024-08:00DCM4CHE, Network operations,Handling a C-Move callsimohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-15583450060778590672017-02-13T23:00:00.003-08:002017-02-13T23:00:10.896-08:00Which code can swallow interruptedException?<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42219790" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I read concurency in practice. Now I want to understand how to handle <code>InterrruptedException</code></p>
<p>Advices from book:</p>
<blockquote>
<p><strong>- Propagate</strong> the exception (possibly after some task-specific cleanup), making your method an interruptible blocking method, too; or<br />
<strong>- Restore</strong> the interruption status so that code higher up on the call stack can deal with it.<br />
<strong>- Only</strong> code that implements a thread's interruption policy may swallow an interruption request. General-purpose task and library code should never swallow interruption requests.</p>
</blockquote>
<p>First two statements are clear for me but I don't understand third. Can you clarify this? Providing example will be prefered.</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 06:59:50Z" class="relativetime">18 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/1k38MGI">gstackoverflow</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Which code can swallow interruptedException?
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-6388057112851809062017-02-13T23:00:00.001-08:002017-02-13T23:00:10.086-08:00How to prevent react router from re-rendering a previously rendered page?simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-77601442510748278492017-02-13T22:00:00.003-08:002017-02-13T22:00:56.943-08:00In firebase web i want to retrive multiple data in real-time<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218925" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>In firebase web i want to retrive multiple data in real-time. my code is</p>
<pre>
<code>$(document).ready(function(){
var rootRef=firebase.database().ref().child("users");
rootRef.on("child_added",snap=>{
var name=snap.child("Name").val();
var email=snap.child("Email").val();
$("#table_body").append("</code>
</pre></div>
<div class="user-action-time">asked <span title="2017-02-14 06:00:19Z" class="relativetime">35 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kEXIFF">Rahul</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
In firebase web i want to retrive multiple data in real-time
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-82170959327449721962017-02-13T22:00:00.001-08:002017-02-13T22:00:55.834-08:00S3 and Cloudfront throwing error on page reload<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218924" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>Somehow when I'm using the website URL (I've setup Amazon ACM as well), it works fine but when I try to refresh the page, it throws an error such as:</p>
<p><a href="http://ift.tt/2klJhdB" rel="nofollow noreferrer"><img src="http://ift.tt/2klJhdB" alt="enter image description here" /></a></p>
<p>I'm using a reactJS SPA website to host the website on Cloudfront through S3. I've made the necessary changes on S3 for the permissions:</p>
<p>Bucket Policy:</p>
<pre>
<code>{
"Version": "2012-10-17",
"Id": "Policy1485855809339",
"Statement": [
{
"Sid": "Stmt1485855807310",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mydomain.com/*"
}
]
}
</code>
</pre>
<p>I've created two buckets: mydomain.com and www.mydomain.com I've redirected all requests from www.mydomain.com to mydomain.com with the help of S3 redirect.</p>
<p>I've now created a Cloudfront distribution with the help of S3 as the origin and the following configuration:</p>
<p><a href="http://ift.tt/2klJhdB" rel="nofollow noreferrer"><img src="http://ift.tt/2kF18YV" alt="enter image description here" /></a></p>
<p>Please let me know if more information is needed</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 06:00:19Z" class="relativetime">35 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2klK6CY">Karan Shah</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
S3 and Cloudfront throwing error on page reload
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-23759356798530456662017-02-13T21:50:00.003-08:002017-02-13T21:50:25.652-08:00Convert base64 png to jpeg image in Nodejs<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218785" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am using <strong>FabricJS</strong> module in <strong>Nodejs</strong>. There is a Canvas I am trying to export as <code>jpeg</code> but it wont(giving me a hard time). All I am getting is <strong>base64 png</strong> data.</p>
<p>Data that starts like</p>
<pre>
<code>data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t.....
</code>
</pre>
<p>Is there anyway in nodejs that I can convert this image to jpeg? I googled a lot but couldn get a solution</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:49:51Z" class="relativetime">32 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2lEAAvj">Abhinav</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Convert base64 png to jpeg image in Nodejs
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-58154073140833090282017-02-13T21:50:00.001-08:002017-02-13T21:50:24.611-08:00Aspose formula detection<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218784" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I am trying to create placeholders for fields in excel using aspose.cells for java. I know about smartmarkers. The user uses <> to specify placeholders and I would process that to then change it to the '&=' notation. How would I do this for formulae. If I have does aspose have functions to detect if given key is a formula?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:49:50Z" class="relativetime">33 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2l2KEuU">user4790067</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Aspose formula detection
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-2739704763500273312017-02-13T21:40:00.003-08:002017-02-13T21:40:40.637-08:00Create JQuery Light Box With Slide<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218671" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p><strong>Hello</strong> I Work On Create Simple JQuery LightBox With Slide, So What is I Need That When I Click on Any Image, I Want This Image To Added to img Tag That it's Inside Div With Class .lightbox, And When Click On .next The Code Will Get The Next Image of The Current Image:</p>
<br />
<strong>Note:</strong> Please Run Code Snippet In Full screen</div>
<div class="user-action-time">asked <span title="2017-02-14 05:40:18Z" class="relativetime">20 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2krpX9V">Michael Neas</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Create JQuery Light Box With Slide
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-52813801223000698262017-02-13T21:40:00.001-08:002017-02-13T21:40:39.683-08:00How to drop the row?<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218670" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I'm handling my data now.</p>
<p>I got a problems when I using pandas</p>
<p>Here is the code.</p>
<pre>
<code>import pandas as pd
import numpy as np
import os
join_file2 = r'D:\raw data\서울시 공공데이터\5.16년7월분\17.상권-추정매출\tbsm_trdar_selng.txt\tbsm_trdar_selng_utf8.txt'
os.chdir(os.path.dirname(join_file2))
join_data2 = pd.read_csv(os.path.basename(join_file2),sep='|',
header=None ,
usecols=[0,1,2,3,4,11],
names=['STDR_YM_CD', 'TRDAR_CD', 'TRDAR_CD_NM', 'SVC_INDUTY_CD','SVC_INDUTY_CD_NM','THSMON_SELNG_AMT'],
dtype = { '0' : int},
encoding='utf-8' )
join_data2_d = join_data2[(join_data2.SVC_INDUTY_CD != 'CS000000') | (join_data2.SVC_INDUTY_CD != 'CS100000') | (join_data2.SVC_INDUTY_CD != 'CS200000')| (join_data2.SVC_INDUTY_CD != 'CS300000') ]
</code>
</pre>
<p>When I print join_data2.head(), I got this data <a href="http://ift.tt/2lajepd" rel="nofollow noreferrer"><img src="http://ift.tt/2lajepd" alt="enter image description here" /></a></p>
<p>and print join_data2_d, I got this which doesn't drop rows. <a href="http://ift.tt/2krpUef" rel="nofollow noreferrer"><img src="http://ift.tt/2krpUef" alt="enter image description here" /></a></p>
<p>How can I fix it??</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:40:17Z" class="relativetime">21 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2lafAvG;">김지영</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
How to drop the row?
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-45905014900479143852017-02-13T21:30:00.003-08:002017-02-13T21:30:31.677-08:00Which is called first static constructor or private constructor<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218556" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>I was reading a tutorial for implementing Singleton and the code is</p>
<pre>
<code>public class Singleton
{
private static readonly Singleton instance = new Singleton();
static Singleton()
{
Console.WriteLine("Static");
}
private Singleton()
{
Console.WriteLine("Private");
}
public static Singleton Instance { get { return instance; } }
public void DoSomething() {
//this must be thread safe
}
}
</code>
</pre>
<p>When I write Singleton.Instance, the output is Private Static</p>
<p>I was expecting it to be Static Private</p>
<p>Reason being that when I read a MSDN tutorial "<a href="http://ift.tt/1W6pY2n" rel="nofollow noreferrer">http://ift.tt/1W6pY2n</a>"</p>
<p>I saw that public constructor was called before the static constructor.</p>
<p>Why is there a difference?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:29:57Z" class="relativetime">32 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2lElaHo">Rajat Malik</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Which is called first static constructor or private constructor
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-24220104544543195042017-02-13T21:30:00.001-08:002017-02-13T21:30:30.562-08:00email confirmation link should expire after particular time period in servlets?<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218552" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>Little bit confused on how to implement the expiry timeout to email confirmation link..</p>
<p>As i'm fresher can you please help me in what way can we implement?</p>
<p>When i browsed came through the concept listeners,sessions</p>
<p>what is the best approach to implement?</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:29:39Z" class="relativetime">50 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2lEoemH">janu</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
email confirmation link should expire after particular time period in servlets?
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0tag:blogger.com,1999:blog-5170229395392546151.post-75512639705602682562017-02-13T21:20:00.003-08:002017-02-13T21:20:37.726-08:00Twilio "0.11.1" getmessages with "anchor" parameter not working<div><img src="http://ift.tt/2h5dYPh" class="ff-og-image-inserted" /></div>
<div class="vote">
<h3>Vote count:
<input type="hidden" name="_id_" value="42218436" /><span itemprop="upvoteCount" class="vote-count-post">0</span></h3>
</div>
<div class="post-text" itemprop="text">
<p>We are migrating from javascript ipmessaging api version "0.1.5" to "0.11.1". We have been using "channel.getMessagesPaged" which is replaced by "channel.getMessages" in new javascript api.</p>
<p>Problem : The method call with passing parameter "anchor" has started failing now.</p>
<p>We tried to refer the following migration guide: <a href="http://ift.tt/2kNDR9Q" rel="nofollow noreferrer">http://ift.tt/2kNDR9Q</a> The above link doesn't mention a changes in parameters for getMessages from getMessagesPaged.</p>
<p>Earlier, we have been passing the earliest message sid as the "anchor" value and keeping it same. We also followed the comments in un-minified(debug) version. (ref: releases/0.11.1/twilio-chat.js)</p>
<p>For your reference: * Returns last messages from channel * @param {String} [anchor] Most early message id which is already known, or 'end' by default</p>
<p>Every time, we are trying to call method getMessages() with anchor value, we are receiving following exception: "Invalid 'From' query parameter value. Expected an integer" Full exception for reference: <a href="http://ift.tt/2l2DhUi" rel="nofollow noreferrer">http://ift.tt/2l2DhUi</a></p>
<p>Please look at the screen-cast above and help us know if we are missing something here.</p>
<p>It would be great if you provide us some reference for this method with anchor value.</p>
</div>
<div class="user-action-time">asked <span title="2017-02-14 05:20:24Z" class="relativetime">11 secs ago</span></div>
<div class="user-details"><a href="http://ift.tt/2kYYgas">Cipher sumeet</a></div>
<p><strong><a href="http://ift.tt/1Y8ZjkG">Let's block ads!</a></strong> <a href="http://ift.tt/2igZUSx">(Why?)</a></p>
<br />
<br />
Twilio "0.11.1" getmessages with "anchor" parameter not working
simohttp://www.blogger.com/profile/11879418576128892699noreply@blogger.com0