Questions tagged [dc]

dc is an arbitrary precision calculator which reads instructions from standard input or files.

A reverse-polish calculator stores numbers on a stack. Entering a number pushes it on the stack. Arithmetic operations pop 1 to 3 arguments off the stack, depending on the operation, and push the results back onto the stack.

Links

See also

  • (An arbitrary precision calculator)
42 questions
1
vote
0 answers

Do I need to release the DC when the hwnd is NULL?

I'm using HDC dc = GetDC(null); to get the DC from desktop but it isn't clear to me if I must release it with a ReleaseDC() call. If so, how should I do that? ReleaseDC(NULL, dc)?
Jack
  • 16,276
  • 55
  • 159
  • 284
1
vote
2 answers

Is there a good tool to parse/evaluate mathematical expressions?

Argghh: $ echo 2 4 | bc (standard_in) 1: parse error $ echo $? 0 Why on earth would an otherwise perfectly reasonable program succeed when it recognizes a parse error? Clearly, I cannot use bc to evaluate an expression. Personally, I like dc,…
William Pursell
  • 204,365
  • 48
  • 270
  • 300
1
vote
1 answer

How come is this command returning "GET A LIFE!"?

I was going through a list of Funny UNIX Commands when I stumbled with this one: $ echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc GET A LIFE! I had never read about the dc command, so I went through the Wiki page and…
fedorqui
  • 275,237
  • 103
  • 548
  • 598
1
vote
1 answer

dc unix : preserving initial value even after storing new value at the same array index

I'm unable to understand this example given in manpage of dc: $ dc 1 0:a 0Sa 2 0:a La 0;ap 1 To me answer should be 2 because: 1 0:a Here we store 1 at 0th position of array a. 0Sa Now we push 0 to the stack of register a. 2 0:a Now…
rootkea
  • 1,474
  • 2
  • 12
  • 32
1
vote
2 answers

how to prevent dc from breaking the output

I'm using the "dc" command to convert from Hexadecimal to Decimal dc -e "16i$1p" The problem is that it breaks the output on large numbers 795717178255658627448611597034913344160729841275756347904742363029055\ 1952200534008528895 How do I prevent…
Omar Abid
  • 15,753
  • 28
  • 77
  • 108
1
vote
1 answer

dc: '\' (0134) unimplemented

I'm using an obfuscation technique that involves dc. If you pipe a smaller line that doesn't involve a backslash, you get this. root@revolt:~/Working/Bash# cat…
Chirality
  • 745
  • 8
  • 22
0
votes
1 answer

Change input base in shell script with dc?

I'm trying to change the input and the output base using dc in a shell script. I'm having trouble writing down the exact command. I do not have BASH. I've tried variations on this: (input numb) 2i 10o p | dc
user869778
  • 243
  • 1
  • 3
  • 7
0
votes
1 answer

Control fan speed with PCA9685 and a PIC

I would like to control the speed of various motors using a PIC and PCA9685 This following code allow me to start the rotation but it does not reduce the speed void pca9685_Set_rate(int address, int rate) { i2c_start(); …
0
votes
0 answers

How can we extract all the action rules of a project in one single excel from decision center IBM ODM

I need to extract all the action rules in one single excel from decision center.Is there a way to do so?I have already deployed the study. I tried to select the rules and then export but it's extracting all the projects present.
0
votes
0 answers

SetTextColor has a transparent fill

so i have a c++ program that uses dc to draw on screen. I have a text that i want to make black, here's the code RECT textRect; textRect.left = 200;//adjusting the position of the text, x textRect.top = 405;//adjusting the position of the…
marus
  • 57
  • 1
  • 4
0
votes
0 answers

NTP synchro issue

Hello does anyone know the solution to NTP synch from DC , i'm trying to change the source from "Local CMOS Clock " to "time.windows.com,0x9" I mean we can see the NtpServer : time.windows.com,0x9 but the source is always "Local CMOS Clock " (set…
Wejden
  • 1
  • 1
0
votes
1 answer

Add Network Service to Event Log Readers on Domain Controller server

I need to add a Network Service account to the Event Log Readers group which is part of Builtin groups on the Active Directory DC server using PowerShell script. I am using the ActiveDirectory module but once I am running: $user = "NETWORK…
0
votes
0 answers

Take RODC offline and use it in a disconnected LAN

I have the idea of installing a ReadOnlyDomainController on my current domain. And then taking it offline along with a few computers in the domain. The idea is that it would be able to work as a disconnected network for few weeks at a time. But…
PP_GEO
  • 1
0
votes
1 answer

XML Python output not as expected (EAD & DC)

Hello dear Overflowers, I work mainly with Python processing XMLs, mostly EAD but in this case DC. I have to make a comparsion of two datasets 1. EAD and 2. DC. The goal is to remove all duplicates from the DC-dataset based on a list of EAD-IDs. The…
DokiDok
  • 17
  • 5
0
votes
2 answers

Extract from Active Directory last password change and test if 6 month

I try to extract form my DC user list with last password change and compare this date to the current days. Test if 10 Day before 6 month pass my test "if doesn't work, I think there is format date problem But I don't know. Can you help me ? $users =…
Jérémie
  • 73
  • 8