on-internet

PHP XOR strings

I saw this code from an answer on PPCG: echo BeeABBeeoBodBaBdOdPQBBgDQgDdp^"\n\n\t8b\n\n\t\nb&\nb b \n%%nb%%%\n%\nQ"; I know PHP casts undefined constants into strings, so the equivalent code is: echo 'BeeABBeeoBodBaBdOdPQBBgDQgDdp' ^ "\n\n\t8b\n\n\t\nb&\nb b \n%%nb%%%\n%\nQ"; The output of those are: Holy Hole In A Donut, Batman! Can someone explain to me how the XOR of those two strings produce that line of output?

Join the discussion →

Cannot import "visual" in vpython due to NumPy import error

I just downloaded vPython for Python 2.7.9 and got the following error when importing the visual library: Traceback (most recent call last): File "Untitled", line 1 from visual import * File "C:\Python27\Lib\site-packages\visual\__init__.py", line 3 from visual.visual_all import * # this statement not included in vis/__init__.py File "C:\Python27\Lib\site-packages\visual\visual_all.py", line 10 from visual_common.cvisual import vector ImportError: numpy.core.multiarray failed to import To avoid confusion I tried reinstalling both Python and vPython and made sure that it is the 64-bit version.

Join the discussion →

Execute method on child component

I have a parent component and a child component. I want to be able to call some child method on the child component from some method on the parent component. Is there a way to get a reference to the child component instance on the parent's class and call child's public methods? @Component({ selector: 'child-component' }) @View({ template: `<div>child</div>` }) class ChildComponent{ constructor () { } doChildEvent () { // some child event } } @Component({ selector: 'parent-component' }) @View({ template: ` <child-component #child></child-component> `, directives: [ ChildComponent ] }) class Par

Join the discussion →

ServiceNow UI Action calling client and server code

I have a UI action that I created and I am attempting to use a GlideDialogForm to get and return user input to the UI action. I am new to scripting in general (and ServiceNow in particular) and can't figure out where to stick the paces of my code to make it flow. The below gives me an error. I have reviewed mark.stanger's excellent site SNGuru article http://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/. Thank you in advance for all of your help with my issue. I thought I was done with this UI action, and then I found out it wasn't returning anything to th

Join the discussion →

Erro compilar Android Delphi-10 no Windows 10

Estou com um problema para compilar para android no delphi-10, segue o erro [Exec Error] The command "PATH C:\Program Files\Java\jdk1.7.0_79\bin;C:\Users\Public\Documents\Embarcadero\Studio.0\Bpl;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE7\IDE_spoof;C:\Program Files\Java\jdk1.7.0_79\bin; & "C:\Users\jeffe\Documents\Embarcadero\Studio.0\PlatformSDKs\android-sdk-windows\build-tools.0.1\dx.bat" --dex --output="C:\Users\jeffe\OneDrive\Programação\Mobile\ads100\Android\Debug\classes.dex" "c:\program files (x86)\embarcadero\studio.0\lib\Android\Debug\google-play-services.dex.

Join the discussion →

Checking the items checked in a CheckListBox

As my first instance of the question was too broad, I am going to try and reword this so it is more understandable. I want to be able to change the visibility of a label based on an item in a check box list being checked. I have a loop that goes through my check box list. procedure TFrmSettings.CheckBoxSelected; var i : Integer; begin for i := 0 to CblRequiredFields.Items.Count - 1 do begin if CblRequiredFields.Checked[i] then begin FrmVReg.ReqFields(CblRequiredFields.Items.Strings[i]); end; end; end; Here is just a part of the ReqFields procedure as it would be too long to put into this Q. pr

Join the discussion →

MsgPack Serialization in .Net 2.0

I want to use a fast Serialization for exchange byte data from .NET 2.0 application, .NET 4.0 application and Android application. Scheme The problem is that the NuGet MessagePack packet is only for .NET 4.0 and I can't serialize data whit the .NET 2.0 application. I haven't problem whit Android application.

Join the discussion →

Usar AdMob ou semelhante para Windows Phone [Construct 2]?

Estou usando o Construct 2 para criar jogos, depois que o Unity deu problema. Quero exportar principalmente para a plataforma da Microsoft (Windows e Windows Phone) porém estou enfrentando um problema ao monetizar jogos do Windows Phone, usei o plugin PubCenter para o Windows 8.1 Desktop (esse funcionou), mas não consegui de forma alguma fazer os anúncios aparecerem no Windows Phone, tentei com o AdMob (plugin nativo do Contruct 2) com o PubCenter, mas nada funciona, alguém poderia me ajudar?

Join the discussion →

Problem in sending email with exim in cpanel to extern address

I noticed today that mails do not come through. Since several hours ago, all mails just get stuck in queue. I have tried to deliver them manually, by selecting one mail in WHM Mail Queue Manager and clicking on "Deliver Selected", but after few minutes I just get this error: Code: LOG: MAIN cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1Tli6y-0002Xo-KW delivering 1Tli6y-0002Xo-KW Connecting to foobar.TLD [IP.ADDRESS]:25 ... failed: Connection timed out (timeout=5m) LOG: MAIN foobar.TLD [IP.ADDRESS] Connection timed out LOG: MAIN == [email protected] R=dkim_lookuphost T=dkim

Join the discussion →

Cloudflare - 525 SSL handshake failed

I switched with my Domain to Cloudflare and now I'm trying to use CloudFlare's SSL Feature. I already own an SSL cert from StartSSL so it would be possible to set the settings to 'Full (Strict)' but I don't want to, so I turned it to 'Full'. Now I'm getting 525 Errors, after a 'Retry for a live Version' everything is okay. But I'm getting this Error every time. Has anyone any idea?

Join the discussion →

JavaScript: Comparing the current value to the previous value drawn from Json

I was not sure how to write the question title or what is the correct way to ask for this question. The goal is, I am currently drawing data from an external Json file that have about 700 or more data. What I want to do is, when looping through these data, for example, data 1, data 2, data 3...so on, I want the current value to be compared to the previous value and if it is greater, lesser, or equal to, then do something right now, my code is written like this function myJson() { $.getJSON('JsonData.json', function (response) { setInterval(function () { var TrialCount = response.length; update

Join the discussion →

Getting date from unknown Date format string

If i have a string that contain a date in a format (unknown) "d/MM/YY" or "m:d:YYYY" etc.). How could i parse it and get day,month,year values ? I tried to parse them by filling an array with all format combinations , and try to parse the date with each one of them , i think it's a stupid solution ! Any ideas ?

Join the discussion →

Why do I get the following error : Can't find a codec for class com.mongodb.client.model.geojson.Polygon

I am trying to do a geospatial query using MongoDB's com.mongodb.client.model.geojson.Polygon class and com.mongodb.client.model.geojson.Position class. The client code populates the four double corners in its own boundingBox object. Here is the code snippet: Polygon polygon = new Polygon(Arrays.asList(new Position(boundingBox.getRightLongitude(),boundingBox.getTopLatitude()), new Position(boundingBox.getLeftLongitude(), boundingBox.getTopLatitude()), new Position(boundingBox.getLeftLongitude(), boundingBox.getBottomLatitude()), new Position(boundingBox.getRightLongitude(), boundingBox.getBott

Join the discussion →

jsPDF addHTML get full contents of scrolling element

How do I get jsPDF to create an image/pdf from an element that has overflow set so that it has scrollbars. The following example pasted into the addHTML Have a Play page (http://mrrio.github.io/jsPDF/) will only generate a pdf for the section of the div that is showing, even if I choose the "middle" div: var outer = document.createElement('div'); outer.style.height = "100px"; outer.style.overflow = "scroll"; var middle = document.createElement('div'); for ( var i=0; i<35;i++ ) { var inner = document.createElement('div'); inner.style.border = "thick solid #0000ff"; inner.style.padding = "10px";

Join the discussion →

What difference: -lX11 option vs. target_link_libraries in CMake

I need to use OpenGL as a library in my project on my Ubuntu 15.04 64bit PC, which is built by CMake 3.0.2. I install packages: mesa-common-dev mesa-utils-extra libgl1-mesa-dev libglu1-mesa-dev libglapi-mesa libx11-dev libxi-dev libxinerama-dev libxcursor-dev libxrandr-dev After run cmake and Makefile, I got these link error: /usr/bin/ld: /home/user/CMU462/DrawSVG/asst1_drawsvg/lib/libglfw.a(x11_window.c.o): undefined reference to symbol 'XConvertSelection' /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libX11.so: error adding symbols: DSO missing from command line I checked /usr/

Join the discussion →

make a Placeholder not disappear when typing

I've seen on some occasions people having issues with their placeholders not disappearing when they start typing inside the input. That's actually what I want. On my register form I've got a captcha verification in the shape of " 24 - 3 + 6 = ? " What I wanted to do is having this calcul not outside the input, but actually inside, and the user's answer would be typed after the calcul ( by setting a padding-left in the input to make the text starts after the calcul ). Is it possible to get my placeholder to stick even when the user starts typing ? Others suggestions are welcomed aswell if you h

Join the discussion →

Maven test compile does not find class in classpath

I've got a little project with this pom... <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example.shipcloud</groupId> <artifactId>shipcloud-api</artifactId> <description>The Java API for ShipCloud.</description> <version>1.0-SNAPSHOT</version> <prerequisites> <maven>3.0</maven> </prerequisites> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.compiler.

Join the discussion →

simple sharing code on facebook error OAuthException 104

I'm having a php website with sharing code on facebook and Sharethis buttons and script. The head tag contains the fb:app_id, og:title, og:url,og:image but debugging the URL displays the following error { "error": { "message": "An access token is required to request this resource.", "type": "OAuthException", "code": 104, "fbtrace_id": "GO7opPlWLTI" } } The debug page displays this error fb:app_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when open the share dialog.

Join the discussion →

Python - scapy timeout option not working at all

I am having an issue with scapy's timeout option when sniffing packets. From what I understand, if you use something like this : test = sniff(filter="ip and icmp ", timeout = 2) print(test) your sniffing should time out after 2 seconds. However, this is 100% not working. From what I have gathered, one of the biggest problems as well, is if you set timeout = 5 and run the sniffer, then run a ping google.com in a parallel command prompt, it will capture the 4 packets not displayed until sniff is done then sit there indefinitely, until you send or receive 1 more icmp packet, just one, then it'll

Join the discussion →

Apache Commons CLI 1.3.1: How to ignore unknown Arguments?

I used to work with Apache Commons Cli 1.2. I wanted the parser to ignore arguments if they are unknown (not added to an Options-Object). Example (pseudocode): Options specialOptions; specialOptions.addOption(null, "help", false, "shows help"); specialOptions.addOption(null, "version", false, "show version"); CommandLineParser parser = new DefaultParser(); CommandLine cmd = parser.parse(options, args); //no third argument, since i dont want the program to stop parsing. // run program with args: --help --unknown --version // program shall parse --help AND --version, but ignore --unknown I used

Join the discussion →

'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'

I am using Windows Authentication Mode/Negotiate Server 2012R2 - IIS8.5. windows authentication and asp.Net impersonation is on WebServer is calling an ASMX on serviceServer In case if site is hosted on default web site (URL is http:/Test/access.apx) called the Service server asmx working fine. But if host the website at (http://Test/access.apx) on same and mapped the Domain if http://Test to . it opened the 1st page but calls to is failing. Getting following error. The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the serve

Join the discussion →

Principal component analysis vs feature removal

I'm quite new to machine learning and just got introduced to principal component analysis (PCA) as a dimensionality reduction method. What I don't understand: In which circumstances are PCA any better than simply removing some features from the model? If the aim is to obtain lower dimensional data, why don't we just group those features that are correlated and retain one single feature from each group?

Join the discussion →

Eval Check String Null or Empty

<asp:TemplateField HeaderText="Customer Account Name"> <ItemTemplate> <asp:Label ID="lblRecieverClientAccountName" runat="server" Text='<%#Eval("RecieverClientAccountName").ToString()) ? String.Empty : 'Invalid Account number' ,"RecieverClientAccountName" %>'></asp:Label> </ItemTemplate> </asp:TemplateField> I need to check string is empty and show a custom message .It gives me an error "The server tag is not well formed."

Join the discussion →

getting an error when trying to use Google API with Client Secrets File and OAuth 2.0

I just can't understand what am I doing wrong when using YouTube API, and specifically the client secrets file. I've created a client secrets file by following the steps on the google developers website — go to https://console.developers.google.com/ go to API Manager section go to Credentials tab Add Credentials button -> OAuth 2.0 Client ID Application type -> Web Application The client secret file is ready to be downloaded now, so I download it and place it on my pc Now, I try to run this basic code snippet, presented on the google developers website https://developers.google.com/youtube/v3/

Join the discussion →

How can you get/compare values of a struct in the UserData of a MATLAB/Simulink block

In MATLAB/Simulink I got a Simulink model with blocks, there I have put a struct into the UserData of a block. How can I get or compare something with the data inside the struct? I made it like this: my_struct = struct('Function', 'receive', 'Version', '0.1'); set_param(gcb, 'UserData', my_struct); Now how can i check in my matlab script which of the blocks that i found with: all_blocks = find_system(gcs, 'Tag', 'All_blocks_have_this_tag'); have the value 'receive' in their 'UserData'.'Function'?

Join the discussion →

Not able to load a custom CodeIgniter library sharing the same name as the controller which loads it [closed]

I am unable to load my custom library through auto-loading or through manual loading. I checked this one and Documentation. library/Faq.php class Faq { public function __construct() { $this->load->model('Faq_model'); } public function recentFaqs() { return $this->Faq_model->getFaqs(); } } In my Faq controller, I loaded the library with $this-load->library('faq'); and called its method with $this->faq->recentFaqs();, but I got the following error: A PHP Error was encountered Severity: Notice Message: Undefined property: Faq::$faq Filename: controllers/Faq.php Line Number: 17

Join the discussion →

How to change environment's font size?

Is there a way to change the environment font size in Visual Studio Code? Stuff like IntelliSense box, debug panel, file names, etc. I know how to change the editor's font size but I cannot figure out how to change the environment font size. So I wonder if you can change it somehow.

Join the discussion →

Print Arabic or any Right-to-Left writing-system string to Linux terminal using Python

The very simple example is: city = "‏المكلا‎" print(city) I am expecting the output to be: ‏المكلا‎ But in fact the ouput is the reverse string (the letters look a little different because they have a start-, middle- and end-form). I can't paste it here, because copy-pasting corrects the order of the string again. How can I print Arabic correctly to the Linux terminal? The surounding text is left-to-right (LTR) and only this line needs to be right-to-left (RTL). Is there a UFT-8 character that can tell ther terminal that?

Join the discussion →
Older stories