Márcio

1

votes
3

answer
1.9k

views

Redirect stdout to fifo immediately

I have, for example, a c program that prints three lines, two seconds apart, that is: printf('Wait 2 seconds...\n'); sleep(2); printf('Two more\n'); sleep(2); printf('Quitting in 2 seconds...\n'); sleep(2); I execute the program and redirect it to a pipe: ./printer > myPipe On another terminal cat <...
Márcio Paiva
1

votes
1

answer
725

views

Xamarin Forms Drag Image between Views

I have an application in Xamarin Forms, and I need that the user can choose one image from below and drag anywhere he wants to in the top view, the idea is: The below view with the images are the home rooms, and the top view is the Houseplant, the user can create his houseplant by dragging and rotat...
Marcio E. H
1

votes
1

answer
60

views

What do these horizontal lines represent in the PhpStorm IDE?

They do not appear when I put the condition inside the try {}
Marcio Zebedeu
1

votes
1

answer
111

views

How to display “Browser.msgBox” when a value of a cell increase?

I am trying to create a script on Google Sheets to receive a message alert whenever the value of the B10 cell increases. Something like this: Static oldVal As Variant oldVal = Me.Range('B10').Value If Me.Range('B10').Value > oldVal Then Browser.msgBox('hello world'); End If There is a way?
Marcio Mathias
1

votes
2

answer
165

views

Mocha testing Promises remains stuck in the process (locked)

I'm using Mocha to test my Node.js code. This particular test is checking if some stub returns an Array of filled objects. The test is good, the result returns filled as expected and everything is 'green lighted'. But when it was expected to Mocha finish its process, it remains stuck. The only way t...
Marcio Martins
1

votes
0

answer
131

views

How to log success requests in GraphQL?

I'm using makeExecutableSchema from graphql-tools and I'm using the logger parameter to log errors. However, the logger is never called in success requests. Is there a way to log success requests?
Marcio Affonso
1

votes
0

answer
92

views

The fastest way to connect to a known BLE device with firemonkey

the examples I have seen of BLE connection with Delphi / Firemonkey always start with a search for devices, then go to a service discovery to only then do the pairing. This entire process takes about 5 seconds. I wonder if there is a faster way to connect to an already known device with known servic...
Marcio Dias
1

votes
0

answer
20

views

How to make a reconnection with socket

I am trying to do a routine for reconnection with socket without success. When I stop and restart server, the client closes the connection, but I can not reset it. Any suggestion? This is a sample: private void StartSocket(String IP, String port) { execsocket = true; st = new SocketTask(IP, Integer....
Márcio Monteiro
1

votes
1

answer
27

views

meta tags and title doesn't show in google search

hey guys my meta tags like description and title doesnt show up on the search results when i search for my website on google, it shows an old title that i had placed but when i click the link, it enters the site and the title changes to the one ive set in the code, here´s my code , is there anythi...
MARCIO QUITEQUE
1

votes
1

answer
35

views

Java Matcher.find $ matches newline in single line mode

I'm trying the following Pattern: Pattern p = Pattern.compile('^(\\d+)$'); Strangely, IMHO: p.matcher('123\n').find() == true; p.matcher('123\n').lookingAt() == true; // also weird p.matcher('123\n\n').find() == false; // ok p.matcher('123\na').find() == false; // also ok p.matcher('123\n')....
Marcio Lucca
1

votes
0

answer
38

views

Is there any way to configure angular.json to stop attaching chunks to index.html?

I'm trying to make a Angular 7 Boilerplate to export web elements to develop like Micro Frontends style. I already have an project in Angular 5 to use as Base project and my idea is to create Modules project end export to reference from Base project as module like In Modules project. I want to use...
1

votes
1

answer
1.6k

views

mask text inside uitextview/uiwebview

finally I choose to devote some time to find a way/implementation to mask text inside UITextView/UIWebView. By now what I'm able to do is: - add some custom background - add a uitextview/uiwebview with some text - add an UIImageView (with a covering png) or a CAGradientLayer to create a simple...
marcio
1

votes
1

answer
451

views

ImportError when using web.py with new environment

I just recreated all my python environment, reinstalled python and setuptools, and installed virtualenv. I started a test enviroment with virtualenv --no-site-packages test, activated it with Scripts\activate.bat and then easy_install web.py. Then I create a code.py file: import web urls = ( '/.*',...
Marcio Cruz
1

votes
1

answer
1.1k

views

How to better use Opera dragonfly's console methods?

I'm trying to use opera dragonfly for debugging, it seems quite nice, but I'm probably doing things wrong here. First problem comes with the console.log() method: In my JavaScript code I just put something like console.log(someVariable) When I look at the error tab I can only see reports like [objec...
marcio
1

votes
2

answer
1.5k

views

Link paths in Rails

I'm starting on Rails now I have some problem that I can't get through, here's an example: I have a table called Product which have name, photo, etc., and a table called review, which have a name and a product_id. Each product can have many reviews and each review only have one product. When I selec...
Márcio Duarte
1

votes
2

answer
1.3k

views

How to parse Json with jquery having special chars in it?

I got a json structure somehow as below and my question is how can i parse this with jQuery so that i can use it like myJson[0].name and than alert it so that 'M\\xe9t\\xe9o' = Météo. Jquery tells me this is invalid json why ? Json uses double backslash if i use single backslash ('M\xe9t\xe9o') Jq...
Marcio
1

votes
1

answer
2.9k

views

Symfony2 form choice checkbox doesn't function

I am trying to make some input checkboxes for my configuration module but choice widget isn't working. So it works only for radio buttons and menu while for multiple menu and checkboxes I have an error: Expected argument of type 'array', 'string' given The code: $builder->add('value', 'choice', arra...
marcio
1

votes
2

answer
140

views

PHP regex to allow only two chars

I need a regex to recognize only two options, they are 'F' and 'M' chars. I am trying: preg_replace('/([^FM]){1}/', '', $_GET['option']) But if i type 'MF' it returns 'MF', but i am expecting 'M'. Can anybody help me?
Marcio Mazzucato
1

votes
1

answer
140

views

Best structure for multi-modules maven project

I would like to know if there is a best way to group maven projects. If I have more than 1 pom project, how is the best way to set them? Solution 1: groupid:parent:version (pom) groupid.parent:child:version (jar) groupid.parent:subproject:version (pom) groupid.parent.subproject:childOne:version (jar...
Marcio Barroso
1

votes
1

answer
363

views

Ipad NavigationBar Landscape Issue

is there a way to use a different images for the ipad landscape/portrait mode? My navigationbar contains a logo in the middle and while it works great on the iphone with different images, I can't use different images for the iPad so the logo isn't centered when you turn the device. Alternatively, I...
Marcio Arantes
1

votes
1

answer
659

views

Inno Setup add time release to button [closed]

Friends add time 'Button Next or Install' to get released on the page 'Ready' 15 second 15,14,13,12,11,10,9,8,7,6,5,4 time after the button is released to click example
Marcio
1

votes
1

answer
628

views

Programatically read content from terminal emulator

I'm trying to automate some operations in Mainframe. For that I made a C# program that connects to Mainframe using terminal emulator wc3270 and send keys to it. This part works fine. My problem is that I need to read the content displayed in terminal emulator screen so I can take better decisions ab...
2

votes
6

answer
25

views
1

votes
1

answer
637

views

QR-Code reader windows library

I would like to know if there's any library (like zbar for android) for reading QR-Codes in windows store apps? I already know ZXing.Net, but that only decodes from an image, I would like to decode it directly from the camera. Thanks for your help :) Edit: Is there a source code for a demo applicati...
Marcio Oliveira
1

votes
1

answer
956

views

d3 - drag behaviour triggered when clicking

In my svg container, I have a with a rectangle and text. When dragging this group, I want to make the group disappear and just drag a small rectangle across the screen to represent the object. In order to do that, I use a which I make visible when dragging starts. I make my svg group being dragged...
Marcio J
1

votes
1

answer
25

views

How to submit a form that has data for 2 models on Spring and let it validate them?

Suppose I have 2 tables: users and preferences. users table has columns username, password and email. preferences table has columns contact_me_by_email, contact_me_by_phone_call, contact_me_by_sms. Each table has it's own model (User and Preferences). I want to present just one page for users so tha...
1

votes
1

answer
25

views

Hiding and Showing :before thru Jquery or better solution?

Ok, this is driving me crazy. We installed a WP plugin to create a 'Mega Menu'. Now the hover bottom arrow on each menu is being affected on the menus that have the this mega menu applied to ('Connect' and 'Resources'). Originally, it was placed on the middle of its menus, but since the Mega Menus u...
Marcio
1

votes
1

answer
22

views

ObjectDisposedException EF Error

I´m having a problem because always I press the Action Button I got the this Exception. This part is giving me a error public void InserirComCopia(TabelaPreco tabPrec, string copiarDe) { var lista = new List(); var tb = InserirTabelaVazia(tabPrec); var rep = new PrecoRepositorio(); lista = rep.Obte...
Márcio Eric
1

votes
1

answer
407

views

WordPress single page rewrite rule / Adding custom page slug

I would like to change this page: mysite.com/?ct_additional_features=hilltop&search-listings=true to look like this: mysite.com/test Below is what I added to my htaccess: (above the WP main rewrite rules) RewriteEngine On RewriteRule ^test/(.*) index.php/?ct_additional_features=hilltop&search-listin...
Marcio
1

votes
2

answer
830

views

How to add Javascript addEventListener on window scroll

So, I have a nav that when I hover the icon, shows/hide, which is working great! Now, I want to hide the menu when the user scrolls down the widown, then the show/hide on hover functionality takes place again. Below is my working code: byClass('nav-toggle')[0].addEventListener('mouseover', showNav);...
Marcio
1

votes
1

answer
100

views

Is possible to define a random limit for a loop in JAGS?

I am trying to implement a Weibull proportional hazards model with a cure fraction following the approach outlined by Hui, Ibrahim and Sinha (1999) - A New Bayesian Model for Survival Data with a Surviving Fraction. However, I am not sure if it is possible to define a random limit for a looping in J...
Márcio Augusto Diniz
1

votes
1

answer
697

views

Error setting up notifications from S3 bucket to FIFO SQS queue due to required “.fifo” suffix

Folks, I believe I've encountered a minor bug on the newest AWS FIFO SQS, does anyone have a solution for the following error I am getting? I've created a FIFO queue on AWS SQS Management Console (us-west-2 region). To create a FIFO queue, SQS mgmt console requires that you insert a '.fifo' suffix o...
Marcio Buss
1

votes
2

answer
413

views

Python - How to open a file inside a module?

I've something like this in my program: A main script main.py inside a folder named 'OpenFileinaModule'. There's a folder called 'sub' inside it with a script called subScript.py and a file xlFile.xlsx, which is opened by subScript.py. OpenFileinaModule/ main.py sub/ __init__.py (empty) subScript....
1

votes
1

answer
70

views

Cannot understand how libgomp implements the FOR construct

According to the libgomp manual, a code in the form: #pragma omp parallel for for (i = lb; i
Márcio Jales
1

votes
1

answer
270

views

Problems with XSLT: No Tags in the output

I am stuck with a XSL transformation and I've tried many things all day long. Obviously I am not an expert on this. Can you help me to understand what's wrong with my XSL file ? This is my source XML. MPC1234 WOTEST WO123 BEDFORD My XSL file: And this is the transformed XML file... It shows other da...
Marcio Corrêa
1

votes
1

answer
949

views

Passenger using wrong ruby version

I'm running multiple websites on Apache with Passenger 4.0.45 on a CentOS server. I have multiple ruby versions installed too with rvm 1.25.27 and for the past 3 years I'm using Ruby 2.1.2 version. I have now started a new application with Rails 5.1 and I've needed to install Ruby 2.4.2. After deplo...
Márcio Quental
1

votes
1

answer
80

views

Which regular expression is more appropriate? [closed]

I am trying to make models output prettier with pre-defined labels for my variables. I have a vector of variable names (a), a vector of labels (b) and model terms (c). I have to match the vectors (a) and (c) and replace (a) by (b). I found this question that introduced me to the function gsubfn fro...
1

votes
1

answer
274

views

React + Redux - Call a method of a component wrapped for the Redux Provider

Whats'up, I am trying to test some react components that uses redux. The default behavior should load by a rest call a list of options in a select input. This call is on the method componentDidMount() in my component. The component works fine, but I cannot simulate the same behavior in my tests. I c...
Marcio Barroso
1

votes
1

answer
125

views

Odoo: how to delete the saved model on cancelling/leaving form?

I have a form on odoo for scheduling appointments where the user clicks on a button to search available appointment slots. When the button is clicked, the model is saved, that's how odoo works and I could not work around that. But if the user gives up on scheduling the appointment, the model is alre...
Marcio Cruz
1

votes
2

answer
288

views

cloudbuil.yaml does not unmarshall when using base64-encoded value on build trigger

On my cloudbuild.yaml definition, I used to have a secrets section to get environment values from Google KMS. The secretEnv fields had keys mapping to 'encrypted + base64-encoded' values: ... secrets: - kmsKeyName: secretEnv: : I've tried to put this value on a substitution instead, which is repla...
Márcio Jales

View additional