kernel

1

votes
1

answer
231

views

Binary Security Token from p12 vs Binary Security Token from jks

I need to obtain the BinarySecurityToken to authenticate to Soap WebApi, I know that BinarySecurityToken is certificate content encoded in Base64. When I test api in SoapUI the Binary sec token is generated from jks file from my certificate, everything works. The problem is when I need to connect to...
john.kernel
1

votes
1

answer
230

views

What contract is used in Istanbul consensus mechanism in JP Morgan Quorum?

In '7nodes' installation example from JPMorgan Quorum github is used such a genesis file ('istanbul-genesus.json'): { 'alloc': { '0x0000000000000000000000000000000000000020': { 'code': '0x606060405236156100c45760e060020a60003504631290948581146100c9578063284d163c146100f957806342169e481461013057806348...
Nick Kernel
1

votes
0

answer
34

views

postgres foreign data wrappers not seeing new table

I'm using postgres 9.5.9. I have setup a FDW to a remote host. This all works ok. But when a new table is added to the remote host schema, the FDW does not see it. Usually I can do this... IMPORT FOREIGN SCHEMA public LIMIT TO(new_table_name) FROM SERVER production INTO public; But for some reason t...
kernel-trick
0

votes
2

answer
16

views

How to make this code reusable in SQL Server 2016 (except Union all)

I am trying to snap data for past. Let's say today in employee table when I snap I can see 1000 employees count. But this was not the case yesterday. 2 new employees joined today hence I am getting count 1000. If I want snap for yesterday I should get 998 an so on for last 60 days. I have tried UNIO...
P Kernel
1

votes
1

answer
602

views

Copy data from a table to another one has different structure

I have two tables with different structure: TableSource: intId(not null), txtSummary, strDetail TableDesc: guidId(not null), guidFK(not null), Name, Detail I want to migrate data from two fields of tableSource(txtSummary, strDetail) to two fields of tableDesc(Name, Detail). guidId is auto generation...
Kernel
1

votes
1

answer
879

views

Silex: sessions and closures

I have a problem with this code in Silex. I am programming a tiny webcart and i dont understand how session object works in Silex. This is my code and it always die with: Fatal error: Function name must be a string session In this lines: $amount = $app['calculate_amount']($app['session']->get('cart'...
kernel_panic
1

votes
1

answer
933

views

How to get TableCell Value from TableRow in Table at FlowDocument in WPF?

I want to get all the data from a TableRow, when row is clicked in WPF. currentRow = tab.RowGroups[0].Rows[r]; currentRow.MouseLeftButtonDown += new MouseButtonEventHandler(test); void test(object sender, System.Windows.Input.MouseButtonEventArgs e) { try { TableRow tr = sender as TableRow; // Afte...
Kernel
1

votes
1

answer
1k

views

Clock frequency of the CPU & measuring time elapses

I wanted to know how much time '1ms sleep' takes. Ran this quest in kernel module: rdtscl(aj); msleep(1); rdtscl(b); printk(KERN_INFO 'Difference = %lu', (b-a));// Number of clock cycles consumed Output i got: Difference = 13479219 Output for cat /proc/cpuinfo cpu MHz : 1197.000 With that, I calcula...
Kernel
1

votes
1

answer
2.2k

views

Symfony 2 - Home page routing

I want to do a route for home page, so if it is / or /index or /index.php send to same controller(to Index controller) So i wrote this homepage: pattern: / defaults: { _controller: DprocMainBundle:Index:index} homepage_1: pattern: /index defaults: { _controller: DprocMainBundle:Index:index} homepa...
App Kernel
1

votes
1

answer
1.1k

views

How to compress json request data in browser? [closed]

I want to send a some large json data from browser to our server (around 40KB). Is there any methods that I can compress it in javascript, and decompress it in Ruby on Rails? I was doing this because when the client connection is slow, it takes around 20 seconds to send the POST data from client to...
ming.kernel
1

votes
1

answer
102

views

Confirming a bash script is in the right folder with wildcards?

Can an if statement in a bash script confirm its current folder based on wildcards? I am making a script to quickly place a drupal site in maintenance mode, ask if you want to keep the .htaccess file, keep the sites folder and the .htaccess file (if requested), update modules and the database then t...
Kernel Fergus
1

votes
3

answer
44

views

Passing a variable (php) between html

I am trying pass a parameter in action tag in form, just the way I am doing in href tag but this isn't working can I know why? or should I just use a href tag in form, will that overwrite action in form? Here is my code:
kernel
1

votes
2

answer
42

views

Jquery and Ajax inside ASP.NET How to update div with model

In my app I am sending post request with string value with Jquery, then in controller, passed string value is used to get some data from API. Next controller returns a view and model with data from API inside. That data from model I want to put inside values of few textboxes. The main problem is...
john.kernel
1

votes
1

answer
1.1k

views

Angular 4 - Working with HTMLCanvasElement

Hy every one, I'm starting to learn Angular and I've decided to start with the implementation of the Langton Ant algorithm. Project The source of the standalone viewer is here: https://github.com/Phreno/langton The source of the Angular version is here: https://stackblitz.com/edit/langton-ng?embed=...
Kernel Panik
1

votes
1

answer
70

views

Correct use of is/2 predicate in Prolog recursion

I am a Prolog beginner with an imperative programming background. While solving assignments from this site, I bumped into two exercises: the first one regards finding the k-th elements of a list, the second one is about finding a list's length. Those are classical list-processing problems with a pre...
kernel_panic
1

votes
2

answer
283

views

Live preview in Xcode

Is there a way to preview my changes live in Xcode? For example, I have button that I moved 5 pixels to the right, and I want to see the result that I build my app to see the result on the simulator. Is it possible to view the changes without running the app every time?
Kernel
1

votes
1

answer
0

views

Matplotlib contour hatching not working if only two levels was used

I am trying to plot hatches over contours lines that statisfy certian criteria folliwng the example found here. Yet, I got regular contours (the yellow lines) instead of the hatches. Any ideas how to resolve that. Thanks import matplotlib.pyplot as plt import numpy as np # invent some numbers, turn...
kernel
1

votes
3

answer
0

views

Python: Get the class, which a method belongs to

Do python class-methods have a method/member themselves, which indicates the class, they belong to? For example ...: # a simple global function dummy WITHOUT any class membership def global_function(): print('global_function') # a simple method dummy WITH a membership in a class class Clazz: def met...
kernel_logger
1

votes
2

answer
0

views

How does gdb interpret `main` when no debug symbols loaded?

... Reading symbols from /root/ctest/printf...(no debugging symbols found)...done. (gdb) disas main Dump of assembler code for function main: 0x0000000000400498 : push %rbp 0x0000000000400499 : mov %rsp,%rbp 0x000000000040049c : sub $0x10,%rsp How does gdb interpret main when no deb...
kernel
1

votes
2

answer
0

views

How do I extract x86 related files from kernel source code?

I am trying to create a cscope index for x86 kernel source files only. I need to know what files may be needed to work with just x86 source code. How can I do this?
kernel_os
1

votes
2

answer
2.6k

views

Is it possible to read data from the text browser of QT GUI

i'm trying to make a chat application in QT . Is it possible to read data from the text browser of QT GUI(which shows conversations) so that i can maintain a chat history...?plz help..Thank You
kernel
1

votes
1

answer
288

views

segmentation fault in SSE when -O3 is on

I found a very strange behaviour when using gcc's -O3 or -O2 option. When my program is running under debug mode (-g), it is fine; but it raises a segmentation fault when I turned on -O3 or -O2. The segmentation happens when it is running a function with SSE2 macro inside; like _m128i polynomial =...
ming.kernel
1

votes
1

answer
397

views

difference results between 10**-2 and E-2

The following program print 1 for 100E-2 and gives 0 for 100*10**(-2), that means that the operator exponent doesnot work for negative **, is that correct. Thanks in advance program testme implicit none print*,100E-2 print*,100*10**(-2) end program
kernel
1

votes
3

answer
4k

views

need delay function in c#

I have a problem using Thread.sleep(seconds), it pauses all my execution in sleeping state. But I tried another solutions also using for loop, however what I'm expecting it's not working. When the login button is clicked: Action report='on progressing'; After another 2 seconds it will be 'trying t...
Kernel
1

votes
2

answer
45

views

Powershell parameter passing to function

I'm facing with an annoying problem: my script seemingly doesn't pass any argument to a function I've defined. $server = 'http://127.0.0.1:8080' Function Get-WorkingDirectory([string]$address) { #echo $address $content = Get-Content -path C:\....\file.txt $content -contains $address } #end Get-Work...
Kernel
1

votes
1

answer
600

views

Python feedparser return URL of first media item in first entry

I'm working with python for the first time and I am a bit stuck. Using feedparser to parse a RSS feed, I want to get the URL of the first media item of entry 0 and load it into a variable. The below seems to work, but I have to hit enter twice to run it and it returns the URLs for ALL media items in...
Quantum_Kernel
1

votes
1

answer
237

views

Show ComboBox for bool and Enum columns in DataGridView

I have a DataTable which contains columns of various data types - int, string, bool, Enum( like Severity in below example): hostTable = new DataTable(); hostTable.Columns.Add('Suspended', typeof(bool)); hostTable.Columns.Add('Succ Tests', typeof(int)); hostTable.Columns.Add('Unsucc Tests', typeof(in...
Quantum_Kernel
1

votes
1

answer
475

views

Which operation in the FFT that is disturbed with the NAN values

I know that FFT function cannot work with NAN values. We used either inerpolation to get ride of those NAN or we replace the NAN with zeros. Yet, I am wondering why FFT cannot work with NAN?. FFT basically makes a summation of the time series after multiply with different harmonics, and most librari...
kernel
1

votes
2

answer
1.5k

views

Matplotlib fill between method and datetime

I am trying to use the matplotlib fill_between function, yet I got the following error 'TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''' I am using the pandas datetime in my x-axe...
kernel
1

votes
1

answer
42

views

signal SIGABRT when navigate to other page

I created some signup button that when a user clicks it should navigate to other page, but when I click this button in the simulator I'm getting Thread 1: signal SIGABRT` error Here main.storyboard: The error is in AppDelegate: If something missing in post, please let me know and I will add.
Kernel
1

votes
2

answer
79

views

For loop producing unexpected results in C

I just started doing the cs50 course but having trouble with the first problem sheet. The aim is to produce right aligned steps (steps you use in Mario just before finishing the level and jump on the flag pole). The code I have written produces the steps but not right aligned. But why does my code p...
Kernel Pource
1

votes
1

answer
58

views

Castle Windsor register error with RestSharp.RestClient constructor

I try to register RestSharp dependencies using CastleWindsor. the RestClient class got three constructors: public RestClient(); public RestClient(Uri baseUrl); public RestClient(string baseUrl); The problem occured when I pass parameter to constructor: container.Register(Component.For().Implemented...
john.kernel
1

votes
1

answer
2.1k

views

Howto serialize an array'd checkbox in jQuery

It's pretty awkward that I couldn't find a thread with a similar problem... Well then, let's assume I have a standard HTML form with checkboxes (that will be parsed as an array in PHP), notice the brackets in the name attribute: Fact 1 Fact 2 ... And now I want jQuery to serialize the content of the...
kernel
1

votes
1

answer
301

views

Why do we use a different web server for static files?

I am a newer in web development. Why should I avoid having the same web server handle both Django and static media files, like style sheets or JavaScript?
ming.kernel
-3

votes
2

answer
25

views

Random Number Generation in C# errors out

So i am trying to generate a random number and if the number is 3 or 8 i what something to happen , it this case to add 1 to one of the 2 integers keep in mind i really am only going off a book in C# and some knowledge in VB int Number1 = 0; int Number12 = 0; string text; string text2; Exexs: Rando...
Kernel
-2

votes
0

answer
26

views

Python script runs from home directory

I have a pyinstaller executable (pyinstaller -F script.py) and .db file. Both in /home/dev/dist directory. This script can't find .db file despite it locates in the same directory. I figured out that script always runs from /home directory. How to change path from /home to actually dir where the scr...
Kernel Panic
1

votes
2

answer
422

views

How do Chef and Docker work together

I am trying to migrate my applications from Heroku to AWS, and I want to use Chef/Docker on AWS. I may need several servers to do the migration for web server, app server, db, redis... I want my deployment flow to be as simple as heroku; and I want to minimize the configuration of the servers on AWS...
ming.kernel
1

votes
3

answer
4.7k

views

unity raycast , on raycast leave , how to ? c#

i have a problem understanding how to keep a reference to an object that has previously been hit by a raycast . for example i can have a raycast script put on the camera of my 1rst person controller going from the camera position to the forwad vector * some value this script is attached to the came...
Line Kernel
2

votes
2

answer
3.3k

views

@Media print css

I have my HTML page with this structure: .... navigation menu My div to display in print mode ....content.... .... HTML elements If a user tries to print the page, I want only the content of the DIV with class to-print to be printed. How can I achieve that?
Kernel Med
1

votes
4

answer
740

views

Multithreading issue while using Mutex in SerialCommunication C++

I am developing a serial communication software using windows functions. In this CSerialCommhelper is class which handles all the serial communication functions and CphysicalLayer is one which make use of that class. class CSerialCommHelper : public CCommAgent { HANDLE m_pPortHandle; //Han...
kernel

View additional