Сообщения

Сообщения за июль, 2018

Subclassing Numpy Array - Propagate Attributes

I would like to know how custom attributes of numpy arrays can be propagated, even when the array passes through functions like np.fromfunction. For example, my class ExampleTensor defines an attribute attr that is set to 1 on default. import numpy as np class ExampleTensor(np.ndarray):     def __new__(cls, input_array):         return np.asarray(input_array).view(cls)     def __array_finalize__(self, obj) -> None:         if obj is None: return         # This attribute should be maintained!         self.attr = getattr(obj, 'attr', 1) Slicing and basic operations between ExampleTensor instances will maintain the attributes, but using other numpy functions will not (probably because they create regular numpy arrays instead of ExampleTensors). My question: Is there a solution that persists the custom attributes when a regular numpy array is constructed out of subclassed nump...

I have a .enc file from an Android Game/App, how do i extract/open it?

So basically, I found a game/app on the Play Store that uses a dynamic image(or some sort of GIF) when you view a character in the game. I want to be able to use that dynamic image in one of my projects(non-commercial, personal). So i went through the trouble of scanning all of the game files from the folders just to find it as a ".enc" file. How do I get the image from the .enc file? -Also posted on SuperUser, but I think i might get better answers here

parse String color without java

i have a code like this : String hex = String.format("0x%02x%02x%02x", r * 0.5, green * 0.6, blue * 0.7)); 0.5 and 0.6 and 0.7 are variables and i want to set background color of a view from variable hex : v.setBackgroundColor(Integer.parseInt(hex, 16)); When i try to convert it to Hexadecimal integer it throws exceptions like java.lang.NumberFormatException how can i do this?

create autocomplete input lightning component

How can I create an autocomplete input text in lightning component Please help either by suggest library or create one from scratch I tried this: https://gist.github.com/peterknolle/ef17727d994332a8ef6b#file-autccomplete-cmp but it said that ' $j is not defined' and also tried the one in lightning design system but it does not work and even its style is bad ( see image): https://www.lightningdesignsystem.com/components/lookups/

how to compare the runtime input with text file

I want to compare the input and text file word. The text file has: one two three Run time input assigned to a variable var: read -p " enter the value : " var while read first do   a=$first   if [ "$a" == "$var" ]   then     echo  " $var is found "   else     echo " $var is not found "     read -p " please enter correct value " $var   fi done < word.txt I tried above code in my script, but it is not working.

Plausible reason why my time machine can only go to certain points in time?

So, I have built a Time-Traveling machine. It’s a prototype, and I’ve noticed a few kinks in the machine. If the control pad gets jammed in home mode, the universe will repeat the same day for all eternity. Also, I noticed that my machine can only go back in time within a limited range. I can go anywhere in time between August 12th, 1941 and the present. This is very important to the plot of my story, and I want to give a logical reason why it is that way. My question is, what is a plausible reason why my time machine is limited like this?

What is considered 'insulting a Muslim'? And is it a sin? If so, is it a minor or major scene?

Assalamu 'Alaikum, My question is kinda lengthy here. So, the important question is regarding a situation. So, there was this guy who bought a wrong book, since it had the same name but the book had a different number on it. Everybody was laughing, not as insult though, just because the situation was funny when he realised he was doing the wrong sums from the wrong book. So, when everybody was commenting on it, someone said, obviously as a joke, "can't you read numbers?" and laughed it off. The guy who bought the wrong book obviously didn't mind and now, he probably doesn't even remember about that remark since everybody was talking. Now, it is not even a valid insult because it has nothing to do with him not being able to read numbers. He didn't specify the book number and that's how he got the wrong book. The insult is kinda like jokingly calling Albert Einstein stupid because he forgot his pen or something. And the person who "insulted...

Noise while not touching guitar strings or metal parts

I get a buzzing noise from my guitar when idle. However, when I touch the strings or touch any metal parts (strings, bridge or the metal portion near the output jack), the noise goes away completely. What is the reason for this and how can I completely eliminate this. I understand it may be grounding issue. I am connecting my guitar to a roland cube20xl amp. I tried with a different guitar and the noise was much lesser. Could something be wrong in my guitar?

Youtube API returns empty items list

I have been trying to wrap my head around this. So I am livestreaming to Youtube through OBS (Open Broadcast[er] Software) and it's working just fine. Now I tried to create an interface to check the status of the stream towards youtube to keep me updated. I did get the API call working, but it is always returning me an empty dataset where the stream information is supposed to be. So I'm making a GET request to https://www.googleapis.com/youtube/v3/liveBroadcasts endpoint, and this is the response that I get: {    "kind": "youtube#liveStreamListResponse",    "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/5kFXSBljnknEhZeBh_drVCsPVKo\"",    "pageInfo": {        "totalResults": 0,        "resultsPerPage": 5    },    "items": [] } So the problem is that items is not supposed to be empty. It is supposed to give me information regarding the stream and its state. I'm passing my Youtube cha...

RELLENAR Checkbox por defecto con jsf

No tengo ni idea, he estado buscando para nada. La única forma que tengo es esta: if(selected){ listOdmIds.add(odmId); }else{ listOdmIds.remove(odmId); } Seleccionando los checkbox, pero quiero que estén seleccionados automáticamente.

Python Literal r'\' Not Accepted

r'\' in Python does not work as expected. Instead of returning a string with one character (a backslash) in it, it raises a SyntaxError. r"\" does the same. This is rather cumbersome if you have a list of Windows paths like these: paths = [ r'\bla\foo\bar',           r'\bla\foo\bloh',           r'\buff',           r'\',           # ...         ] Is there a good reason why this literal is not accepted?

Simulation of PWM using timer

I'm currently trying to output a PWM signal from an Arduino Mega using register TCCR4A & TCCR4B manipulation. I'm able to have the attached motor spinning but I strongly doubt it's receiving the correct frequency and duty cycle. What's the best way to simulate the Arduino output? I read there are different software available, but none of them seem able to simulate what I want. I do not own an oscilloscope, but I'd like to debug the code anyway. Thanks! EDIT: for those asking for the code... Although this wasn't the main aim of the question, here is it. #include <avr/interrupt.h> #include <avr/io.h> void setup() {   pinMode(6, OUTPUT);   TCCR4A = 0x00;   TCCR4B = 0x00;   //Mode to 14: WGM43:0 = 1110, fast PWM, page 145 datasheet   //Prescaler: 8, CS42:0 = 010   //TOP value: ICR4 = 9999   //   //Should yield to:   //frequency: f = 16e6/8/10000 = 200 Hz   //Pulse lenght: every clock is Pl = 16e6/8 = 2MHz -...

Differences between creating a Site in SharePoint Dashboard vs. Admin Center

I'm relatively new to SharePoint Online and I'm currently trying to understand site structures and best practices. I'm having difficult in understanding the site creation process within the Admin Console vs that of the SharePoint Online Dashboard. From my understanding so far: Every site you create will always be a sub-site under a site collection root site unless you are creating a new site collection. You can create site collections depending on your needs within the Admin dashboard and then create sub-sites under the site collection root. The Admin Console gives a lot of options as to what sites should be created based on templates and URL. You can also create a new site under the Dashboard which seems to be a root/site-collection, but this approach is more simplistic and basic. Both features seem to instantiate root level sites with no sub-sites from what I can see as indicated by their URLs. Following the previous point, in checking the default site collection t...

Get time in coroutine c#

I work on a simple game in unity3d. I create a coroutine that do somethings after specific time with waitforsecound. But in some states it stops. with stopcoroutine(). I want to know is it possible to get the time of coroutine when has stopped ? I mean when coroutine stop give me a digit number like 23 second or 54 second or something like that. is that possible to get stopped time ?

What are the different types of Ananda

Within the word Sat Chit Ananda is the word Ananda What is the difference between the Red Bindu Ananda the Spiritual Union Ananda and the Golden Loka Ananda

¿Como saber si se ha ejecutado un AJAX y si se ha ejecutado con éxito? - JQuery

estoy haciendo una función de arrastrar y soltar un elemento para eliminar, en un div especifico (draggable y droppable), y quisiera hacer que cuando suelte el elemento en el div droppable y se ejecuta AJAX, si es verdadera, me haga una animación, sino que me haga un revert: true. Para eso, no lo puedo hacer en el droppable, por la cual pensé que en el draggable en el stop:, hacer una function que si se ha ejecutado AJAX con exito, hacer tal función, sino hacer revert: true, pero sin hacer petición ya que hay otro AJAX en el droppable drop: dejo los códigos aquí: $("[id='actividades']").draggable({   revert: true,   start:function(event){     $(this).css({       "position":"absolute",       "transform":"scale(0.8)",       "z-index":"9999"     });     $(".div_eliminacion").animate({       bottom:"0%"     },700);     $("[id='actividades']").mouseenter(functi...

how to use the libRDF Rapper for java

Anyone know how to use/download the librdf rapper. I tried downloading it and understand it form the website, but no use of it.

References for (especially two-dimensional) general linear groups over *finite* fields

Questions. What are good, citable, detailed sources on general linear groups over finite fields? Especially, GL2(Fp) , and most especially, the following: characterization of normalizers of tori in GL2(Fp) , (I am sorry, but I can't get more specific about this rather special concern, for I want to play by the conventional rules of the reviewing process and not identify myself too much.) detailed classification of when an element A∈GL2(Fp) is diagonalizable. There seem to be detailed results on what field-extensions of Fp the eigenvalues of diagonalizable A∈GL2(Fp) can possibly lie in (this I infer from the assertions I have to check), but within the time I took during a reviewing job, I did not find a good reference. Algebraically closed fields dominate the literature, needless to say, characterization of all elements of PGL(2,Fp) which have order equal to p , classification of the intersection of two distinct tori in GL2(Fp) . Remarks. Motivation for this reference ...

How “forward” whole network into a host in Vagrant setup?

I have setup: Windows (host) => Centos (Vagrant/Virtualbox, guest) => Docker I have docker0 network in the guest machine. docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255         ether 02:42:84:8b:78:31  txqueuelen 0  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 I'd like to make it visible from the host. What kind of network should I set up: Bridge, NAT, or something else?..

Customer ID is null in Observer when customer_save_after triggers

I have this event that fires just fine: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">     <event name="customer_save_after">         <observer name="remago_addcustomertotree" instance="Remago\Customertree\Observer\Addcustomertotree" />     </event> </config> What I am trying to do is get the customer ID so that it can be added in a different table, when I create it in backend. This is how I do it: $customer = $observer->getEvent()->getCustomer(); Now, I am able to get all of his/her data by using $customer->getName() or $customer->getAddress() and everything looks ok. The problem is I can't seem to get anything other than null when I use: $customer->getId() or $customer->getEntityId() or $customer->getData('entity_id') Initia...

Remove My billing and shipping address are the same in Magento2

Can we remove the checkbox and label called "My billing and shipping address are the same" during checkout in Magento2? I don't want to allow customers to enter billing address there. All I need is to hide the checkbox with the label, can it be done? Please anyone help me.

Need assistance: JavaScript Code

Code work whell before i add to code: items[i].get_item("SITE") I can take ID from code, but not a column element. What have I do bad. Here is a code: <input type='button' id='123' value='Pokaż rekordy' onclick="getSelectedItems();"/> <div> <p id="p1"></p> </div> <script language="javascript" type="text/javascript"> function getSelectedItems() { var ctx = SP.ClientContext.get_current(); var items = SP.ListOperation.Selection.getSelectedItems(ctx); var myItems = ''; var i; var siteUrl = '/sites/MCUW-IT/kostka-pilotaze/restauracje-pilotaże/'; document.getElementById("p1").innerHTML=""; for (i in items){     myItems = items[i].id;     var targetListItem;     document.getElementById("p1").innerHTML += items[i].id + " "**+ items[i].get_item("SITE")**;     window.location.href = window.location.pa...

Playing both to headphones and front

It is a simple question but what I found on Internet does not work. I have Ubuntu 18.04 and want to play audio simultaneously to front on the laptop(asus zenbook) and to headphones. Pulseaudio doesnt work because it shows only one device when I insert headphones. How can I do it? It worked on Windows so I dont think it is because of hardware. Thanks in advance

Как открыть ехе фаил

Я не прошу весь код, меня надо просто направить на путь истинный. Вообщем допустим у меня есть фаил nevirus.exe мне надо его открыть с помощью C++ каким образом это можно реализовать?

Update package.json to reflect installed packages

Lets say my package.json looks like this: {   "name": "My Cool project",   "version": "0.0.0",   "scripts": {     "ng": "ng",     "start": "ng serve",     "build": "ng build",     "test": "ng test",     "lint": "ng lint",     "e2e": "ng e2e"   },   "private": true,   "dependencies": {     "@angular/animations": "^6.0.0",     "@angular/common": "^6.0.0",     "@angular/compiler": "^6.0.0",     "@angular/core": "^6.0.0",     "@angular/forms": "^6.0.0",     "@angular/http": "^6.0.0",     "@angular/platform-browser": "^6.0.0",     "@angular/platform-browser-dynamic": "^6.0.0",     "@angular/router": "^6.0.0...

I want to use jooq on a server where the DB environment is dynamic

I want to use jooq on a server where the DB environment is dynamic. I want to use jooq in spring boot 2 gradle environment. But there is a problem. The build.gradle file requires hard-coded DB information but is available. Can I create only JClass like QClass in QueryDSL? I am in the server's external environment Creates a dynamic DataSource such as ClassName, UserName, Password, and URL. Hard-coded jooq can not be used. In jooq jooq{     version = '3.11.2'     sample(sourceSets.main) {         jdbc {             driver = 'org.postgresql.Driver'             url = 'jdbc:mysql//localhost:3306/sample'             user = 'some_user'             password = 'secret' .... =========== The jdbc connection information should be hard-coded as shown. But I want a dynamic jooq setting based on the external server settings. Gener...

Evaluate ∫

1 −1 cot−1 1 √ 1−x2 (cot−1 x √ 1−(x2)|x| )∫ 1 −1 cot−1 1 √ 1−x2 (cot−1 x √ 1−(x2)|x| ) Using ∫ b a f(x)dx=∫ b a f(a+b−x)dx , I got: 2I=2π∫ 1 0 cot−1( 1 √ 1−x2 )dx Then, letting x=sinθ I=2∫ π/2 0 arctan(cosθ)cosθdθ After this I tried integration by parts but it gets really complicated with that? How do I continue?

Why is 去 (“to go”) in 也不去考虑以后会是怎样 (“…and don't think about how it will be in the future”)?

In the book 活着 (audio book, around 6 minutes 55 seconds into 第01集), we have: 我只是感到和她在一起身心愉快,也不去考虑以后会是怎样。 Google Translate gives: I [我] just [只是] feel [感到] happy [身心愉快] with her [和她在一起], and [也] I don't [不] think about [考虑] what it will be [会是怎样] in the future [以后]. It mostly makes sense, but I don't understand why there's a 去 ("to go") in there. Maybe it combines as 不去 ("to not go"), but it still doesn't make much sense to me. Question: Why is 去 ("to go") in 也不去考虑以后会是怎样 ("...and don't think about how it will be in the future")?

JObject converts char to int

The following code runs in LinqPad (I mention this to explain the .Dump() method) var x = new JObject {   ["property1"] = 'a',   ["property2"] = "A",   ["property3"] = -1,   ["property4"] = 9.9, }; x.Dump(); This returns the following values: 97, A, -1, 9.9 How do I stop JSon.Net from converting the 'char' value as an integer?

Error when trying to associate a GitHub branch to IBM Cloud stage configuration

We are running a test server on IBM Cloud and point to a specific GitHub branch as part of the Stage configuration through the Toolchains > Pipeline. When I try to change this branch to a GitHub dropdown branch that I own and click Save I get the error message: A problem occurred while the stage was being saved. NOTE: I am the pipeline owner as well.

Size of holes for salt/pepper/seasoning shakers?

Is there any reference for the sizes of holes for salt shakers? For cooking I should think that the holes would be larger than for table shakers.

Laravel unique request update

Ive read some things about this on laracasts and Stackoverflow. I have an update function with validation: public function update(Customer $customer, StoreCustomer $request) {     $customer->update($request->validated());     exit(); } And the validation rules:  public function rules() {     return [         'code'  => 'required|unique:customers,code',     ] } Now I tried to add a 3rd argument after the unique, so if it would exist it would continue. I tried it like this:  public function rules(Customer $customer)  {     return [         'code'  => 'required|unique:customers,code,'.$customer->code,     ] } but that doesn't seem to do anything. It seems to work if you do the validation in my controller itself, but this looks way cleaner. Any solutions?

Jquery will not let me use counters in css?

I would like to use this style if an if statement runs. However Jquery seems to get confused with the syntax and gives me a bunch of errors. Does anyone know how I can escape the errors so I can still use the styling? The Jquery that is giving errors looks like this:  $("#inject-toc-here > ol > li::before").css("content", "counters(item, ".") " ""); The normal css looks like this: #inject-toc-here li::before {             content: counters(item, ".") " ";        } The part that is giving errors is that second value for the css. The inverted commas by counters(item....).... Thanks in advance :)

Why an internal force cannot move a closed system externally?

Suppose a large box with a man inside.He is standing on a side of the box which he calls as the 'floor'.(This immediately indicates that this is an accelerated frame of reference). Also assume there is vacuum inside as well as outside the box. Now he is going to walk over the floor to punch with his fist an adjacent side of the wall.And then he did punch the wall. Two questions come into my mind. They are: While he is walking the distance on the floor towards the adjacent wall ,would the floor move in opposite direction according to Newton's 3rd law? (like a treadmill?) 2.When he punches the adjacent wall, would the wall move in the direction of punching with he himself getting recoiled away from the wall due to Newtons 3rd law? It would be great if an explanation is also provided. Also does the law of conservation of momentum got to do anything in this scenario?

Distinction of del pezzo surfaces and weak del pezzo surfaces

I am a bit confused about the definition of weak del pezzo surface. Can someone give an example that what kind of weak del pezzo surface is not a del pezzo surface?

Getting SocketException while sending response to client

org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:78) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:356) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:233) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) a...

Create Excel with Java format text

When I download Excel, I get cells with format Numbers I need format text en all Cells. try {             XSSFSheet sheet = workbook.createSheet(eyelash);             XSSFFont font = workbook.createFont();             font.setColor(HSSFColor.WHITE.index);             XSSFCellStyle style = workbook.createCellStyle();             style.setFont(font);             style.setFillPattern(FillPatternType.SOLID_FOREGROUND);             style.setFillForegroundColor(HSSFColor.RED.index);             String[] header = { "name","surname"},                     "Ceco", "Volumen" };             XSSFRow rowhead = sheet.createRow((short) 0);         ...

redirect to another page and display alert message error

i created a login form inside a modal , that the user will input his username pass and his purpose, and when success it redirectly go to homepage, Now my problem is i created another page that if the user type the wrong username or password he will be redirect to another page above the form i want to display an error alert message incorrect username or password. Can you help me work this. advance thanks. here is the sample form that will display the error message: <form class="needs-validation "  action="#" method="post" novalidate >   <h3 class="dark-grey-text text-center">     <strong><i class="fa fa-user"></i> Login</strong>   </h3>   <hr>   <span id="error_message" class="alert alert-danger"></span>   <div class="row" style="margin-left:300px;">     <label>Date:</label>      <span id="date" ...

PEB - NtQueryInformationnProcess is undefined

So, I need to acess the PEB structure to retrieve some information about the process, namely the dwBuildNumber and OSMajorVersion fields. I tried to achieve that with the following code: char nt_func[] = "NtQueryInformationProcess"; HINSTANCE dll_handle; dll_handle = LoadLibrary(TEXT("C:\\Windows\\System32\\ntdll.dll")); if (dll_handle == NULL)    exit(EXIT_FAILURE); else {     cout << "dll handle: " << dll_handle << endl << endl;     HANDLE nt_proc = GetProcAddress(dll_handle, nt_func);     if (nt_proc == NULL)          exit(EXIT_FAILURE);        } HANDLE p_handle = GetCurrentProcess(); NTSTATUS status; PROCESS_BASIC_INFORMATION info_buff; status = NtQueryInformationProcess(p_handle, 0, &info_buff, sizeof(PROCESS_BASIC_INFO), NULL); PPEB p_peb = info_buff.PebBaseAddress; ULONG bn = p_peb->dwBuildNumber; ULONG os_mv = p_peb->OsMajorVers...

Inner tubes - if two tubes match the tire, is bigger or smaller better for durability?

Some of the inner tubes tire thickness ranges overlap. For example Schwalbe often offers tubes in 1.5"-2.4" and 2.1"-3.0" width ranges. Given a tire that fits both ranges, like for example a 2.15" tire, is it better to buy a larger or a smaller tube when it comes to durability? My intuition tells me that a larger tube will be better, because it will be less stretched, hence thicker, but that's just an intuition.

Sum first two results, then the next two

I'm trying to make sum of first two results from MySQL query. Since I need to sum of the first two columns, I need to take the result of the previous and the sum with the next one following result. I tried to use static keyword but was not work as expected. $sum = 0; foreach($test as $key=>$value){ static $q;   $q = $sum+= $value; } echo $q; Schema: When I var_dump($test) results are: array(1) { [0]=> string(5) "21.00" } array(2) { [0]=> string(5) "21.00" 1=> string(5) "19.00" } array(3) { [0]=> string(5) "21.00" 1=> string(5) "19.00" [2]=> string(5) "24.00" } array(4) { [0]=> string(5) "21.00" 1=> string(5) "19.00" etc..

How to control that namespace (before colon) part of SoapHeader?

Specification: Add a new header to an existing integration. The header should look like this: <soapenv:Header>     <soapenv:signature>{$some_data}</soapenv:signature> </soapenv:Header> My naïve implementation: $signature_header = new SoapHeader('soapenv', 'signature', $signature); $SOAP->__setSoapHeaders($signature_header); The result: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"   xmlns:ns1="http://corpwsdl2.oneninetwo"   xmlns:xsd="http://www.w3.org/2001/XMLSchema"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:ns2="soapenv"   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >     <SOAP-ENV:Header>         <ns2:signature>…</ns2:signature...

JavaFX8 - customised EditCell class - how to disable mouse clicks for a TableView while still allowing clicks inside a TableCell that's being edited?

I'm writing an app that will have many data entry windows, each of which has an editable TableView for data entry. I'm using user James_D's very helpful EditCell code https://gist.github.com/james-d/be5bbd6255a4640a5357 as the basis for TableCell editing and have extended it to include numeric and date data types. I'm validating data as it's entered. If there's no error, I let the user move away from the cell by either clicking on another cell or by tabbing or shift+tabbing out of the cell. If there is an error, I don't let the user move away from the cell until the error is corrected. My code is working apart from one thing. I'm using a mouse event handler on the TableView to detect when the user tries to click away from a cell. If there's an error, I consume the click to stop focus from leaving the cell. That part works fine. However, the handler also consumes clicks inside the cell being edited, so if the user wants to click to position the...

Dynamic search of words in jquery

Random words are appended on different positions of the body, (function is continuously run by settimeout()) $('body').append('<span class="box" style="position:absolute;font-weight:bold;color:#'+ color + ';top:'+ top +'px;left:'+left+'px;">'+ randomWords +'</span>'); $("input").keyup(function(){ var textBoxValue = $( this ).val(); //input value is comparing with the elements in the body $("body .box").each(function() {     if($(this).text()==textBoxValue){         $(this).remove();         scoreupdate();     }); }); Here instead of doing this is there any way to dynamically check each word and when typing each letter the correspondence letter should highlight and when the whole word matches the score should update.

Random variable with exponential distribution.

Let X be random variable with exponential distribution E(2) and let Y be another random variable such that Y=max(X2, X+1 2 ) Find the distribution for random variable Y . Distribution for X is fX(x)=2e−2x,x>0 and zero otherwise. Now, for variable Y we have that it's distribution is zero whenever y≤ 1 4 For y=t> 1 2 we have the following: FY(t)=∫ 2t−1 0 fX(x)dx=1−e2−4t Similarly, for y=t>1 we have FY(t)=∫ √ t 0 fX(x)dx=1−e−2 √ t But, i cannot understand what happens in case that y takes random value on interval ( 1 4 , 1 2 ) . It's the black line on the graph. How can i handle situations like this? Any help appreciated!

Validate multiple cell data using VBA

I'm stuck in a bit of a pickle could someone please help. I am trying to check if each property has a particular property_id. Eg:- verify if each of the property has property if "ABC, XYZ, LMN, IJK". Also verify if each of date is > 10-12-2018 | Property | Property_ID | Date       | |----------|-------------|------------| | A        | ABC         | 10/12/2018 | | A        | XYZ         | 08/11/2018 | | A        | LMN         | 12/05/2018 | | A        | IJK         | 15/05/2018 | | B        | ABC         | 13/12/2018 | | B        | XYZ         | 14/10/2018 | | B        | IJK         | 15/12/2018 | | C        | LMN  ...

Is the salesforce full sandbox worth it?

I found an article with regards to the different types of salesforce sandboxes. I was wondering if you have used the full sandbox and can also share your feedback in the following features. what are the purpose of those features?: performance testing load testing and staging

¿Como saber cuando capturan la pantalla de mi pagina web?

Estoy trabajando en un proyecto con html,laravel,php, javascript, jquery y ajax el problema es que quiero saber cuando le tomen captura de pantalla a mi pagina web y mandar una alerta por correo electrónico. he buscado información pero no encuentro nada relacionado, entonces no he probado nada. hay alguna manera de hacerlo o es posible hacerlo? de ante mano gracias.

What is the technique that can be used to identify relation between entities?

from text we need to extract entities and get the relation between them to cluster text further (for example identify the relation between school and Mr.Park - the teacher).

Nested for loops. How do I optimize this?

I'm currently working on an approval system right now using PHP (Codeigniter) and I have this method of getting all the request according to your department group and position depth. The checking of the requests is based upon the user's position depth. 6 being the lowest and 1 being the highest. So basically there will be a maximum of 5 people to check the request. For example my depth is 6, line1 will be 5, line2 will be 4 and so on. The system will find someone with position depths like that and same department group. Lines 3 and 2 will decide to send it to ceo (1) or not so the default is only until 2. Some of my database columns It is designed that people above the line can check the request even if the lower lines havent checked it yet like for example maybe line1 havent checked it yet because he/she is on vacation and line3 cannot wait already so he/she decides to process the request because it is important. Now if the above line processes it already, lower lines cann...

Prevent nested ckeditor interfere with each other

Given I have a ckeditor where user could type rich text and insert many custom built widgets. One of the widgets represents html form where the textareas allows the user to write richtext too. Those textareas components integrate inline ckeditor as well. That ckeditor is configured with just a few plugins (font, bold, italic, lists, color) and is actually being nested in the outer one. The outer editor is configured with much more editor plugins. Now to the problem. When the user focus the inner editor it's toolbar show up and can be used for text formatting, but in the same time the outer editor's toolbar is visible as well, so the user could potentially try to apply formatting or insert widgets which are not applicable in the nested editor thus resulting in errors. So I wonder, if there is a way to prevent nested editors to interfere with its ancestor ckeditor. Any thoughts on a different approach are appreciated as well.

How to pluralize “sexy”?

The anglicism sexy is accepted in Spanish, as you know. When it's an adjective, how is its plural supposed to be build? X persona tiene ojos sexy(s). I'm slightly inclined to think that it remains invariant.

TSQL to tell which network protocol is being used for each active session

Once upon a time, I remember running some TSQL which would display which network protocol (e.g. named pipes, TCP/IP) was being used by each active session - but I can't remember the actual code. Does anyone know how to do this ? An input parameter might have been SPID. The code was useful for diagnostic purposes.

Integration of

1 x2−a2 by trigonometric substitution?∫ 1 x2−a2 dx Now, I know this can be done by splitting the function into two integrable functions, 1 2a ∫( 1 x−a − 1 x+a )dx And then doing the usual stuff. My question is, how can we do this by using trigonometric substitution? The only thing that gets in my mind is x=asecθ , but then got stuck on proceeding further. Any help would be appreciated.

Do values attached to integers have implicit parentheses?

Given 5x/30x2 I was wondering which is the correct equivalent form. According to BEDMAS this expression is equivalent to 5∗ x 30 ∗x2 but, intuitively, I believe that it could also look like: 5x 30x2 I asked this question on MathOverflow (which was "Off-topic" and closed) and was told it was ambiguous. I was wondering what the convention was or if such a convention exists. According to Wikipedia the order of operations can be different based on the mnemonic used.

multiplying the received signal by carrier, in OFDM system`

Sorry for this question, I'm still new in signal processing area. In OFDM system, let x be the received signal, what do we call the process of multiplying the received signal x by e −j2π F c t , where F c is frequency carrier and t is interval 0 : sampling rate: sampling rate * length of signal. So the question, what is that function? and why do we use it.

Can't get a new category attribute value

I have added a new category attribute but after creating attribute, Im not able to fetch value... A custom attribute is visible on the backend but how could I get value. I have followed this tutorial.https://www.atwix.com/magento/add-category-attribute/

Swig unable to convert byte objectof python3 to std::string

I am trying to interface python3 with C++ using SWIG and it keeps throwing the following error >> ipc.sendMessage(q, b'qwe') Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: in method 'sendMessage', argument 2 of type 'std::string'** Below are the attached files: ipc.i file %module ipc %begin %{     #define SWIG_PYTHON_STRICT_BYTE_CHAR     #include "ipc.h"    %} %include std_string.i %include stl.i %include "ipc.h" ipc.h file #include<string> extern int createQueue(); extern bool sendMessage(int, std::string); extern std::string receiveMessage(int); extern bool removeQueue(int); Command used to build >> swig -c++ -python ipc.i >> g++ -fpic -c ipc.h ipc_wrap.cxx ipc.cpp -I/usr/include/python3.5 >> gcc -shared ipc_wrap.o ipc.o -o _ipc.so -lstdc++

Javascript array.filter by element in children

I have an Array of objects (clients) like this: "{"client_id":"AAA1","contracts":[{"contract_id":"CON1-AAA1","revisions":[{"date":"2018-07-30","status":"First Sign"}]}]}" I can filter by client_id with no problem: var query = clients.filter(x => x.client_id == "AAA1"); However, I'd like to filter by revision date or status, I tested doing the following, but it cant access status. var query = clients.filter(x => x.contracts.revisions.status == "First Sign"); Is it possible to do it this way or Im delusional? :)

¿Como saber cuando capturan la pantalla de mi pagina web?

Estoy trabajando en un proyecto con html,laravel,php, javascript, jquery y ajax el problema es que quiero saber cuando le tomen captura de pantalla a mi pagina web y mandar una alerta por correo electrónico. he buscado información pero no encuentro nada relacionado, entonces no he probado nada. hay alguna manera de hacerlo o es posible hacerlo? de ante mano gracias.

mysqlでレコードがない場合のみ挿入したい

mysqlでレコードを挿入する際に、挿入したいデータが既にレコードがある場合は挿入せず、ない場合にのみ挿入したいです。 下記のsqlをコマンドラインから実行しました。 insert into fileinfo (filename, url) values ("a", "aa") where not exists (select * from fileinfo where filename = "a"); 下記のエラーがでました。 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where not exists (select * from fileinfo where filename = "a")' at line 1 どこが間違っているのかわかりません CentOS7 mysql --version mysql Ver 15.1 Distrib 10.1.34-MariaDB, for Linux (x86_64) using readline 5.1 です。 DB構造は下記の通りです。 +----------+--------------+------+-----+---------+----------------+ | Field    | Type         | Null | Key | Default | Extra          | +----------+--------------+------+-----+---------+----------------+ | id       | int(11)      | NO   | PRI | NULL    | auto_increment | | filename | varchar(255) | YES...

Unable to construct Application instance [duplicate]

This question already has an answer here: Unable to construct javafx.application.Application instance 1 answer I am trying to launch in my public class an application defined in another class, earning the "Unable to construct Application instance"-Exception.The example (below) is quite minimalistic. What am I missing?---Clues would be very much appreciated. This question is different than the question Unable to construct javafx.application.Application instance as I would like to have the definition of an application and its launch in separate classes. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class Main {     public static void main(String[] args) {         Application.launch(OKButton.class, args);     } } class OKButton extends Application {     @Override     public void start(Stage stage) {       ...

Difference between 'with reference to', 'with regard to', 'concerning' and 'apropos of'

I spoke few words with reference to this book, 'honesty is the best policy'. I spoke few words with regard to this book, 'honesty is the best policy'. I spoke few words concerning this book, 'honesty is the best policy'. I spoke few words apropos of this book, 'honesty is the best policy'. Notes for the examples mentioned above: When I say with reference to this book, I mean that the book itself says that honesty is the best policy. [I put a reference here] When I say with regard to this book, I have said about the book that honesty is the best policy. Concerning and apropos of also mean the same as with regard to. The Oxford English Living Dictionaries defines it in the following way, that shows that apropos of, with reference to, and concerning have the same meaning: with reference to; concerning I know that there is distinction in preposition choice, as in: with reference to . . . with regard to . . . concerning [zero preposition]. aprop...

Is entanglement an operation or a stored state for qubits?

I am going through this video of Quantum Computing for Computer Scientists. I am not able to understand the entanglement state of qubits. Is entanglement just an operation, or is it a state which can be stored. If it's a state which is stored then how can we send two qubits far apart? But if it is just an operation then isn't the operation somehow affected the probability from 50% to 100% to superimposed states of qubits. Also, what if the operation has 50% chance of assigning the probability. So when measuring multiple times we tend to get 50% probability of qubits collapsing to one of the states.

Makefile include sources and object files from other directory

I have a small project where the directory structure looks like this: . |-- common |   |-- tile.cpp |   `-- tile.hpp |-- editor |   |-- Makefile |   `-- main.cpp `-- game     |-- Makefile     `-- main.cpp I'm trying to configure the Makefiles so that everything in the own subdirectory is compiled and linked to, as well as everything in the common directory. This is my attempt: CC = g++ CMN_DIR = ../common CFLAGS  = -c -I.. SRCS := $(wildcard *.cpp $(CMN_DIR)/*.cpp) OBJS := $(SRCS:cpp=o) all: $(OBJS)     $(CC) -o $@ $(OBJS) $(OBJS): %.o: %.cpp     $(CC) -c $< $(CFLAGS) The problem is that object files get created in the current subdirectory, but we are searching for them in the common directory, where they are supposed to be. g++: error: ../common/tile.o: No such file or directory How to configure the Makefile so that we output the common object files in the common directory...

I have a .enc file from an Android Game/App, how do i extract/open it?

So basically, I found a game/app on the Play Store that uses a dynamic image(or some sort of GIF) when you view a character in the game. I want to be able to use that dynamic image in one of my projects(non-commercial, personal). So i went through the trouble of scanning all of the game files from the folders just to find it as a ".enc" file. How do I get the image from the .enc file?

Pertaining to the required sequence, how can the requested transaction hash be the same as the received transaction hash?

In the IRI Node class, this code segment checks to see if the requested transaction hash is the same as the received transaction hash: https://github.com/iotaledger/iri/blob/dev/src/main/java/com/iota/iri/network/Node.java#L284 //Request bytes    //add request to reply queue (requestedHash, neighbor) Hash requestedHash = new Hash(receivedData, TransactionViewModel.SIZE, reqHashSize); if (requestedHash.equals(receivedTransactionHash)) {      //requesting a random tip      requestedHash = Hash.NULL_HASH; } How is it possible for the request hash to be part of the received transaction hash since the received transaction hash is not known until the transaction is made? Perhaps I am missing some detail - can someone please explain the purpose of this.

Conversion of Additive Noise to Phase Noise

RF Microelectronics by Razavi contains the following snippet in section 8.7.3 concerning the analysis of phase noise in oscillators: We write x(t)=Acos(ω0t)+n(t) where n(t) denotes the narrowband additive noise (voltage or current). It can be proved that narrowband noise in the vicinity of ω0 can be expressed in terms of its quadrature components: n(t)=nI(t)cos(ω0t)−nQ(t)sin(ωot) where nI(t) and nQ(t) have the same spectrum of n(t) but translated down by ω0 (Fig. below) and doubled in spectral density. I don't see how the math adds up though. Taking the Fourier transform of n(t) , Sn(ω)= 1 2 [SnI(ω−ω0)+SnI(ω+ω0)]+ j 2 [SnQ(ω+ω0)−SnQ(ω−ω0)] If the quadrature components are the same as mentioned so SnQ(ω)=SnI(ω) , Sn(ω)= 1−j 2 SnI(ω−ω0)+ 1+j 2 SnI(ω+ω0) Doesn't this show that the spectral density of SnI and SnQ is 2 √ 2 that of Sn rather than double, in order for the magnitude to equal?

Basis for a subspace Proof

If {v1,v2} is a basis for a subspace V show that {v1+v2,v1−v2} is also a basis for V . I know that we must have to prove that v1+v2 and v1-v2 are linearly independent and they also span V because that is a definition for a basis but am unsure how to go about this.